@jameslovespancakes/pi-plus 1.0.19 → 1.0.21
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/README.md +133 -246
- package/package.json +3 -2
- package/src/core/claude-remote/LICENSE.md +22 -0
- package/src/core/claude-remote/UPSTREAM.md +40 -0
- package/src/core/claude-remote/bridge.ts +392 -0
- package/src/core/claude-remote/protocol.ts +83 -0
- package/src/core/env.ts +7 -1
- package/src/domains/claude-remote/auth.ts +25 -0
- package/src/domains/claude-remote/index.ts +183 -0
- package/src/domains/claude-remote/picker.ts +36 -0
- package/src/domains/models/provider-picker.ts +3 -46
- package/src/domains/setup/index.ts +12 -1
- package/src/domains/workflows/index.ts +56 -104
- package/src/domains/workflows/runtime/advisory-challenge.ts +3 -3
- package/src/domains/workflows/runtime/agent-attempt.ts +3 -3
- package/src/domains/workflows/runtime/agent-options.ts +18 -0
- package/src/domains/workflows/runtime/agent-runner-types.ts +7 -3
- package/src/domains/workflows/runtime/agent-runner.ts +14 -6
- package/src/domains/workflows/runtime/agent-session.ts +34 -3
- package/src/domains/workflows/runtime/cancellation.ts +5 -0
- package/src/domains/workflows/runtime/engine.ts +19 -40
- package/src/domains/workflows/runtime/journal.ts +4 -4
- package/src/domains/workflows/runtime/live-agent.ts +37 -0
- package/src/domains/workflows/runtime/model-profiles.ts +2 -6
- package/src/domains/workflows/runtime/progress-types.ts +3 -1
- package/src/domains/workflows/runtime/progress.ts +69 -42
- package/src/domains/workflows/runtime/review/review-fix-workflow.ts +3 -3
- package/src/domains/workflows/runtime/types.ts +16 -15
- package/src/domains/workflows/runtime/ui/agent-transcript.ts +59 -0
- package/src/domains/workflows/runtime/ui/workflow-format.ts +6 -2
- package/src/domains/workflows/runtime/ui/workflow-inspector.ts +75 -61
- package/src/domains/workflows/runtime/ui/workflow-widget.ts +26 -66
- package/src/domains/workflows/runtime/workflow-advisory-utils.ts +5 -5
- package/src/domains/workflows/runtime/{background-workflows.ts → workflow-lifecycle.ts} +91 -75
- package/src/domains/workflows/runtime/workflow-management.ts +66 -0
- package/src/domains/workflows/runtime/workflow-run-controller.ts +16 -20
- package/src/domains/workflows/runtime/{workflow-run-background.ts → workflow-run-delivery.ts} +3 -3
- package/src/domains/workflows/runtime/workflow-run-record.ts +7 -4
- package/src/domains/workflows/workflows/code-review.ts +1 -1
- package/src/domains/workflows/workflows/diagnose.ts +1 -1
- package/src/domains/workflows/workflows/perf-review.ts +1 -1
- package/src/domains/workflows/workflows/refactor-scout.ts +1 -1
- package/src/domains/workflows/workflows/research.ts +4 -4
- package/src/ui/settings-picker.ts +26 -0
- package/src/domains/workflows/runtime/background-workflow-tool.ts +0 -75
package/README.md
CHANGED
|
@@ -2,326 +2,213 @@
|
|
|
2
2
|
|
|
3
3
|
<img src="images/pi-plus.svg" alt="pi-plus" width="160">
|
|
4
4
|
|
|
5
|
-
**
|
|
5
|
+
**Remote control, shared subscriptions, and multi-agent tools for [pi](https://pi.dev/).**
|
|
6
6
|
|
|
7
7
|
[](https://www.npmjs.com/package/@jameslovespancakes/pi-plus)
|
|
8
8
|
[](https://github.com/jameslovespancakes/pi-plus/actions/workflows/ci.yml)
|
|
9
9
|
[](LICENSE)
|
|
10
|
-
[](https://pi.dev/packages)
|
|
11
10
|
|
|
12
11
|
[Changelog](CHANGELOG.md) · [Releases](https://github.com/jameslovespancakes/pi-plus/releases)
|
|
13
12
|
|
|
14
13
|
</div>
|
|
15
14
|
|
|
16
|
-
---
|
|
17
|
-
|
|
18
15
|
## Install
|
|
19
16
|
|
|
20
|
-
Requires **pi 0.87.
|
|
17
|
+
Requires **pi 0.87.1+**.
|
|
21
18
|
|
|
22
19
|
```sh
|
|
23
|
-
pi install npm:@jameslovespancakes/pi-plus
|
|
24
|
-
pi install git:github.com/jameslovespancakes/pi-plus # git
|
|
25
|
-
pi install /path/to/pi-plus # local checkout
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
Then run **`/pi-plus`**. It shows what is configured and what is not, and enter
|
|
29
|
-
on any row starts that setup.
|
|
30
|
-
|
|
31
|
-
```
|
|
32
|
-
──────────────────────────────────────────────────────────
|
|
33
|
-
pi-plus
|
|
34
|
-
› ● Subscriptions 2 accounts · quota-aware
|
|
35
|
-
● Model Information catalogue cached
|
|
36
|
-
● Providers 2 allowed · 4 need approval
|
|
37
|
-
● Agent Board not configured
|
|
38
|
-
● Remote Workers 1 worker
|
|
39
|
-
|
|
40
|
-
Enter to set up · Esc to close
|
|
41
|
-
──────────────────────────────────────────────────────────
|
|
20
|
+
pi install npm:@jameslovespancakes/pi-plus
|
|
42
21
|
```
|
|
43
22
|
|
|
44
|
-
|
|
45
|
-
Nothing else is required, every feature configures itself from within pi.
|
|
23
|
+
Run **`/pi-plus`** to see your setup and configure each feature.
|
|
46
24
|
|
|
47
25
|
---
|
|
48
26
|
|
|
49
|
-
##
|
|
27
|
+
## Remote Control
|
|
50
28
|
|
|
51
|
-
|
|
29
|
+
**Keep working from your phone.** Message your local pi session from the Claude
|
|
30
|
+
app or [claude.ai/code](https://claude.ai/code). Prompts queue while pi is busy;
|
|
31
|
+
the app's Stop button stops the agent. Your selected model still runs through pi.
|
|
52
32
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
/accounts add anthropic work
|
|
59
|
-
/accounts add gemini personal
|
|
60
|
-
/routing quota-aware
|
|
33
|
+
```text
|
|
34
|
+
──────────────────────────────────────
|
|
35
|
+
Remote Control
|
|
36
|
+
› ● Remote Control On
|
|
37
|
+
──────────────────────────────────────
|
|
61
38
|
```
|
|
62
39
|
|
|
63
|
-
|
|
40
|
+
**`/claude-remote`** toggles On/Off. On connects now and auto-starts in future
|
|
41
|
+
interactive sessions; Off disconnects and disables auto-start. The footer dot
|
|
42
|
+
is green when connected and red otherwise.
|
|
64
43
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
weekly ███████████████░░░░░░░░░░░ 58% 3d weekly ████████████████████████░░ 93% 6d
|
|
69
|
-
Fable ████████████░░░░░░░░░░░░░░ ~47% 3d
|
|
70
|
-
Work 72% · Personal 58%
|
|
71
|
-
```
|
|
44
|
+
Off by default. Requires your primary Anthropic OAuth login via `/login`.
|
|
45
|
+
Experimental: text input and completed-message mirroring, not token streaming.
|
|
46
|
+
Remote model changes and permission approvals are not supported.
|
|
72
47
|
|
|
73
|
-
|
|
74
|
-
|
|
48
|
+
**Privacy:** enabling uploads new messages, thinking, images, and tool
|
|
49
|
+
arguments/results to Anthropic and lets that Claude account control your local
|
|
50
|
+
agent. Past history and system prompts are not mirrored. Turning it off does
|
|
51
|
+
not delete uploaded content. Set `PI_CLAUDE_REMOTE_ALLOW_INBOUND=0` for read-only;
|
|
52
|
+
accounts requiring device verification can supply `CLAUDE_TRUSTED_DEVICE_TOKEN`.
|
|
75
53
|
|
|
76
|
-
|
|
77
|
-
swaps to Gemini while a `gemini/*` model is selected: one bar per quota family
|
|
78
|
-
(Flash, Pro, and Claude or GPT-OSS), pooled across your Gemini accounts, with
|
|
79
|
-
the active family highlighted. Whether a family resets weekly or every five
|
|
80
|
-
hours depends on the account's plan; the reset time shows which. Kimi and Grok
|
|
81
|
-
publish no usage endpoint, so their column shows only the last rate-limit
|
|
82
|
-
reading, if any.
|
|
54
|
+
## Messaging Board
|
|
83
55
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
56
|
+
**Keep agents coordinated across sessions and machines.** Shared project rooms,
|
|
57
|
+
direct messages, live presence, and coordinator assignments let agents exchange
|
|
58
|
+
progress without duplicating work.
|
|
87
59
|
|
|
88
|
-
|
|
60
|
+
```text
|
|
61
|
+
Messaging Board · Active
|
|
62
|
+
repo:project │ reviewer │ builder
|
|
89
63
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
provider is ported from [`pi-antigravity`](https://github.com/Rahularya01/pi-antigravity).
|
|
93
|
-
`/login` → **Gemini** signs in through the browser (callback on port 51121; on
|
|
94
|
-
a headless machine, paste the callback URL when asked).
|
|
64
|
+
reviewer Tests pass. Ready for review.
|
|
65
|
+
builder Picking up the next task.
|
|
95
66
|
|
|
67
|
+
Message >
|
|
96
68
|
```
|
|
97
|
-
/login gemini
|
|
98
|
-
/accounts add gemini personal
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
Models include Gemini 3.x Flash and 3.1 Pro, plus the Claude and GPT-OSS
|
|
102
|
-
models the backend also serves; each thinking level routes to the backend's own
|
|
103
|
-
runtime model. The list refreshes from your account, so newly enabled models
|
|
104
|
-
appear without an update, and `/models-refresh` forces it.
|
|
105
69
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
70
|
+
**`/board setup`** configures a local or SSH-hosted board server.
|
|
71
|
+
**`/board`** opens the chat. Presence stays out of model context; only requested
|
|
72
|
+
board data and actual messages are delivered.
|
|
109
73
|
|
|
110
|
-
|
|
111
|
-
the metered `google/*` still asks.
|
|
74
|
+
## Subscriptions
|
|
112
75
|
|
|
113
|
-
|
|
76
|
+
**Use your available capacity instead of managing accounts by hand.** Pool
|
|
77
|
+
multiple subscriptions, route by account order or remaining quota, and see
|
|
78
|
+
usage in the footer. Supports Anthropic, OpenAI Codex, Gemini, Kimi Code, and xAI.
|
|
114
79
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
model bill quota intel code tbHard $/1M tok/s code/$
|
|
121
|
-
anthropic/claude-opus-5 sub 74% 71.2 76.4 42.1 - - -
|
|
122
|
-
openai-codex/gpt-6-astra sub 81% 69.8 74.1 39.6 - - -
|
|
123
|
-
openrouter/glm-5 paid - 64.3 68.9 31.2 0.62 88.4 111.1
|
|
80
|
+
```text
|
|
81
|
+
Claude Σ2 · 2/2 ready
|
|
82
|
+
5h █████████████░░░░░░░ 65%
|
|
83
|
+
weekly ███████████░░░░░░░░░ 58%
|
|
84
|
+
Work 72% · Personal 58%
|
|
124
85
|
```
|
|
125
86
|
|
|
126
|
-
|
|
127
|
-
|
|
87
|
+
**`/accounts`** adds, reauthorizes, and toggles accounts.
|
|
88
|
+
**`/routing quota-aware`** uses reported capacity; **`/routing sequential`**
|
|
89
|
+
follows account order. **`/usage`** refreshes the bars.
|
|
128
90
|
|
|
129
|
-
|
|
91
|
+
Quota visibility depends on the provider. Where no usage endpoint exists,
|
|
92
|
+
pi-plus shows the last observed rate-limit reading rather than inventing one.
|
|
130
93
|
|
|
131
|
-
|
|
132
|
-
instructions, so it covers workflow subagents too. `/provider` shows every
|
|
133
|
-
provider you have credentials for and toggles each one:
|
|
94
|
+
## Model Information
|
|
134
95
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
Providers
|
|
138
|
-
› ● Anthropic Allowed
|
|
139
|
-
● OpenAI Codex Allowed
|
|
140
|
-
● OpenRouter Needs Approval
|
|
141
|
-
● Google Needs Approval
|
|
96
|
+
**Choose on evidence, not guesswork.** Compare Artificial Analysis benchmarks,
|
|
97
|
+
price, speed, and remaining subscription quota in one catalog.
|
|
142
98
|
|
|
143
|
-
|
|
144
|
-
|
|
99
|
+
```text
|
|
100
|
+
Benchmarks + price + speed + quota
|
|
101
|
+
↓
|
|
102
|
+
Better-informed selection
|
|
145
103
|
```
|
|
146
104
|
|
|
147
|
-
|
|
105
|
+
**`/model-info setup`** connects your benchmark key. **`/models`** opens the
|
|
106
|
+
ranked catalog; the **`list_models`** tool gives agents the same information.
|
|
148
107
|
|
|
149
|
-
|
|
150
|
-
toggle which are eligible. No SSH config? It generates a dedicated key, shows
|
|
151
|
-
the one line to run, and verifies.
|
|
108
|
+
## Provider Controls
|
|
152
109
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
Remote Workers
|
|
156
|
-
› ● build-box READY CPU 4% MEM 12% GPU 0% · 0 jobs
|
|
157
|
-
● gpu-node READY CPU 9% MEM 31% GPU 0% · 0 jobs
|
|
158
|
-
● old-laptop UNREACHABLE connection timed out
|
|
110
|
+
**Decide which providers may spend.** Gate metered providers at the request
|
|
111
|
+
boundary, including workflow subagents—not just through prompt instructions.
|
|
159
112
|
|
|
160
|
-
|
|
161
|
-
|
|
113
|
+
```text
|
|
114
|
+
──────────────────────────────────────
|
|
115
|
+
Providers
|
|
116
|
+
› ● Anthropic Allowed
|
|
117
|
+
● OpenRouter Needs Approval
|
|
118
|
+
──────────────────────────────────────
|
|
162
119
|
```
|
|
163
120
|
|
|
164
|
-
|
|
165
|
-
reserves a slot, and **deletes the uploaded source the moment the run ends**,
|
|
166
|
-
keeping only `test.log` and `result.json`. Cleanup runs on the worker, so it
|
|
167
|
-
still happens if your laptop sleeps. Worker capacity is queried only by
|
|
168
|
-
`remote_status` or `remote_test`; Pi Plus never injects SSH status into ordinary
|
|
169
|
-
chat turns.
|
|
121
|
+
**`/provider`** opens the picker. Enter or Space toggles access in place.
|
|
170
122
|
|
|
171
|
-
|
|
123
|
+
## Workflows
|
|
172
124
|
|
|
173
|
-
|
|
174
|
-
|
|
125
|
+
**Turn repeatable tasks into coordinated agent runs.** Built-in reviews,
|
|
126
|
+
diagnostics, research, and refactoring workflows support parallel agents,
|
|
127
|
+
worktree isolation, replay, and usage accounting. Every run returns immediately;
|
|
128
|
+
results arrive when it finishes. There is no separate foreground/background mode.
|
|
175
129
|
|
|
130
|
+
```text
|
|
131
|
+
Task → parallel agents → findings → result
|
|
176
132
|
```
|
|
177
|
-
╭────────────────────────────────────────────────────────╮
|
|
178
|
-
│ Messaging Board online · 3 chats │
|
|
179
|
-
│ 1 repo:pi-plus │ 2 reviewer │ 3 direct │
|
|
180
|
-
│ ────────────────────────────────────────────────────── │
|
|
181
|
-
│ reviewer rebased onto main, tests green at a1b2c3d │
|
|
182
|
-
│ builder picking up the parser, leaving lexer alone │
|
|
183
|
-
│ you ack, I will take the CLI surface │
|
|
184
|
-
│ ────────────────────────────────────────────────────── │
|
|
185
|
-
│ Message > _ │
|
|
186
|
-
│ enter send · tab next chat · esc close │
|
|
187
|
-
╰────────────────────────────────────────────────────────╯
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
`/board setup` installs the server locally (pi starts it each session) or onto
|
|
191
|
-
any Mac or Linux host over SSH, where launchd or systemd brings it back after a
|
|
192
|
-
reboot. Board state is returned only when `agent_board` is called or a real
|
|
193
|
-
board message is delivered; background presence snapshots are not added to
|
|
194
|
-
model context.
|
|
195
|
-
|
|
196
|
-
### Orchestrate repeatable workflows
|
|
197
|
-
|
|
198
|
-
The built-in workflow engine runs named or inline multi-agent workflows with
|
|
199
|
-
optional concurrency limits, replay, background runs, worktree isolation, progress,
|
|
200
|
-
and usage accounting. `code-review`, `diagnose`, `perf-review`,
|
|
201
|
-
`refactor-scout`, and `research` ship in this package—no external workflow
|
|
202
|
-
package is installed.
|
|
203
133
|
|
|
204
|
-
```
|
|
134
|
+
```sh
|
|
205
135
|
/workflow code-review HEAD~3
|
|
206
|
-
/workflow research "Compare the
|
|
136
|
+
/workflow research "Compare the available approaches"
|
|
207
137
|
```
|
|
208
138
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
## Commands
|
|
139
|
+
**`/workflow`** opens the running agent board. Enter inspects, Esc goes back,
|
|
140
|
+
and X stops the selected agent from the list. Inspection needs at least 80×24.
|
|
141
|
+
The inspector uses pi's native message/tool rendering and editor. Enter steers;
|
|
142
|
+
Alt+Enter queues a follow-up. `/model provider/model` and `/thinking level`
|
|
143
|
+
affect only that agent. Other parent-session commands are not forwarded.
|
|
216
144
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
| `/usage [on\|off\|text]` | quota bars |
|
|
226
|
-
| `/models [sort]` | ranked catalog |
|
|
227
|
-
| `/model-info <id>` | every benchmark for one model |
|
|
228
|
-
| `/model-info refresh` | force a benchmark refresh |
|
|
229
|
-
| `/model-info setup` | add the Artificial Analysis key |
|
|
230
|
-
| `/provider` | provider toggle picker |
|
|
231
|
-
| `/provider approve \| remove <name>` | grant or revoke |
|
|
232
|
-
| `/remote setup` | worker hub: toggle, add, rename, remove |
|
|
233
|
-
| `/remote add \| rename \| remove` | jump to one step |
|
|
234
|
-
| `/board` | live agent board UI |
|
|
235
|
-
| `/board setup \| restart \| clear \| status` | manage the board server |
|
|
236
|
-
| `/workflow` | open the running workflow agent board |
|
|
237
|
-
| `/workflow <name> [args]` | run a bundled workflow |
|
|
238
|
-
|
|
239
|
-
**Tools available to the agent:** `workflow`, `list_models`, `agent_board`,
|
|
240
|
-
`remote_status`, `remote_test`.
|
|
145
|
+
Every `api.agent()` call requires `label`, `model`, and `thinkingLevel`.
|
|
146
|
+
Built-ins resolve explicit routes with `api.modelProfile("small" | "medium")`;
|
|
147
|
+
configure both routes in `.pi/workflow-models.json` (or the agent-directory
|
|
148
|
+
`workflow-models.json`), each with `model: "provider/model-id"` and
|
|
149
|
+
`thinkingLevel`. Missing routes now fail rather than inheriting the host model.
|
|
150
|
+
The file shape is `{ "profiles": { "small": { "model": "provider/model-id",
|
|
151
|
+
"thinkingLevel": "low" }, "medium": { "model": "provider/model-id",
|
|
152
|
+
"thinkingLevel": "high" } } }`.
|
|
241
153
|
|
|
242
|
-
|
|
154
|
+
The main agent can use `workflow({ action: "list" })`, or `inspect`/`stop` with
|
|
155
|
+
`runId` and optionally `agentId`. Activity is fetched on demand, not injected
|
|
156
|
+
into every turn. Limits on concurrency, agents, time, and output tokens remain
|
|
157
|
+
optional.
|
|
243
158
|
|
|
244
|
-
##
|
|
159
|
+
## Remote Workers
|
|
245
160
|
|
|
246
|
-
|
|
161
|
+
**Run tests and builds on the machine suited to them.** Snapshot your working
|
|
162
|
+
tree to an SSH worker after checking CPU, memory, disk, and GPU capacity.
|
|
247
163
|
|
|
248
|
-
```
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
}
|
|
164
|
+
```text
|
|
165
|
+
Remote Workers
|
|
166
|
+
› ● build-box READY
|
|
167
|
+
● gpu-node READY
|
|
168
|
+
● laptop UNREACHABLE
|
|
254
169
|
```
|
|
255
170
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
171
|
+
**`/remote setup`** selects or adds workers. Agents use **`remote_status`** and
|
|
172
|
+
**`remote_test`** to inspect capacity and execute commands. Uploaded source is
|
|
173
|
+
removed after the run by default; logs and results are retained.
|
|
259
174
|
|
|
260
175
|
---
|
|
261
176
|
|
|
262
|
-
##
|
|
177
|
+
## Configuration
|
|
263
178
|
|
|
264
|
-
|
|
265
|
-
|
|
179
|
+
Feature preferences live in **`~/.pi/agent/pi-plus.json`**. Environment variables
|
|
180
|
+
win over saved values. Credentials, account pools, and caches use separate
|
|
181
|
+
stores; pi remains responsible for its own authentication and session state.
|
|
266
182
|
|
|
267
|
-
|
|
268
|
-
src/
|
|
269
|
-
core/ zero pi imports, pure and unit-testable
|
|
270
|
-
store · config · env · quota · catalog · policy · exec · accounts
|
|
271
|
-
services/ stateful singletons with lifecycle + subscribe()
|
|
272
|
-
usage-service, the single quota poller
|
|
273
|
-
ui/ dumb render primitives: format · usage-bars
|
|
274
|
-
domains/ one pi extension entry each
|
|
275
|
-
setup · subscriptions · models · workflows · agents · remote
|
|
276
|
-
server/ agent board server
|
|
277
|
-
config/ example settings and bundled skills
|
|
278
|
-
```
|
|
183
|
+
For local development:
|
|
279
184
|
|
|
280
185
|
```sh
|
|
281
|
-
|
|
186
|
+
pi install /path/to/pi-plus
|
|
187
|
+
npm install && npm run verify
|
|
282
188
|
```
|
|
283
189
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
## Built on
|
|
287
|
-
|
|
288
|
-
pi-plus is a thin layer over other people's work.
|
|
289
|
-
|
|
290
|
-
| project | what it does here | license |
|
|
291
|
-
| --- | --- | --- |
|
|
292
|
-
| [`pi`](https://pi.dev/) | the host agent and the entire extension API | MIT |
|
|
293
|
-
| [`xxhash-wasm`](https://github.com/jungomi/xxhash-wasm) | vendored into `src/core/anthropic/vendor/` for the billing checksum | MIT |
|
|
294
|
-
| [`pi-workflow-engine`](https://github.com/timbrinded/pi-workflow-engine) | embedded workflow runtime and built-in workflows | MIT |
|
|
295
|
-
| [`pi-antigravity`](https://github.com/Rahularya01/pi-antigravity) | reference for the `gemini` provider: Antigravity OAuth, wire format, model routing and catalogue discovery | MIT |
|
|
296
|
-
|
|
297
|
-
The workflow engine keeps its upstream license in
|
|
298
|
-
[`src/domains/workflows/LICENSE.md`](src/domains/workflows/LICENSE.md).
|
|
299
|
-
|
|
300
|
-
The `gemini` provider in `src/core/gemini/` is ported from `pi-antigravity`
|
|
301
|
-
0.8.0 and adapted to pi-plus's pooled accounts and pi's own Google adapter; its
|
|
302
|
-
upstream license is kept in [`src/core/gemini/LICENSE.md`](src/core/gemini/LICENSE.md).
|
|
303
|
-
|
|
304
|
-
The Anthropic provider, OAuth, quota and routing were originally adopted from
|
|
305
|
-
[`@cortexkit/pi-anthropic-auth`](https://github.com/cortexkit/anthropic-auth)
|
|
306
|
-
(MIT) and have since been reimplemented in this repository.
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
## License
|
|
310
|
-
|
|
311
|
-
MIT
|
|
190
|
+
## Sources & Credits
|
|
312
191
|
|
|
192
|
+
| Project | Contribution |
|
|
193
|
+
| --- | --- |
|
|
194
|
+
| [pi](https://pi.dev/) | Host agent, extension API, session and authentication lifecycle |
|
|
195
|
+
| [claude-remote-lib](https://github.com/clepdn/claude-remote-lib) | Remote Control protocol ([provenance & license](src/core/claude-remote/UPSTREAM.md)) |
|
|
196
|
+
| [pi-claude-remote](https://github.com/clepdn/pi-claude-remote) | Behavior reference for the independently implemented remote adapter |
|
|
197
|
+
| [pi-workflow-engine](https://github.com/timbrinded/pi-workflow-engine) | Embedded workflow runtime ([MIT](src/domains/workflows/LICENSE.md)) |
|
|
198
|
+
| [pi-antigravity](https://github.com/Rahularya01/pi-antigravity) | Gemini provider reference ([MIT](src/core/gemini/LICENSE.md)) |
|
|
199
|
+
| [pi-anthropic-auth](https://github.com/cortexkit/anthropic-auth) | Original subscription integration, since reimplemented (MIT) |
|
|
200
|
+
| [xxhash-wasm](https://github.com/jungomi/xxhash-wasm) | Vendored billing checksum ([MIT](src/core/anthropic/vendor/xxhash-wasm.LICENSE.md)) |
|
|
201
|
+
| [Artificial Analysis](https://artificialanalysis.ai/) | Model benchmark data |
|
|
313
202
|
|
|
314
203
|
## Disclaimer
|
|
315
204
|
|
|
316
|
-
pi-plus is an unofficial, independent project
|
|
317
|
-
|
|
318
|
-
|
|
205
|
+
pi-plus is an unofficial, independent project—not affiliated with or endorsed by
|
|
206
|
+
pi, Anthropic, OpenAI, or other providers. Remote Control uses an unofficial
|
|
207
|
+
protocol that may change without notice.
|
|
319
208
|
|
|
320
|
-
**You are responsible for
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
agreement with that provider and not by this software. Review those terms
|
|
325
|
-
before connecting an account, and keep in mind that they change.
|
|
209
|
+
**You are responsible for complying with each provider's terms**, including
|
|
210
|
+
subscription pooling and remote access. Review those terms before connecting
|
|
211
|
+
accounts. Features that mirror sessions or run remote jobs send data to those
|
|
212
|
+
services or machines.
|
|
326
213
|
|
|
327
|
-
Provided as is, without warranty
|
|
214
|
+
Provided as is, without warranty. [MIT License](LICENSE).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jameslovespancakes/pi-plus",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.21",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "pi and more",
|
|
6
6
|
"license": "MIT",
|
|
@@ -39,7 +39,8 @@
|
|
|
39
39
|
"./src/domains/models/index.ts",
|
|
40
40
|
"./src/domains/workflows/index.ts",
|
|
41
41
|
"./src/domains/agents/index.ts",
|
|
42
|
-
"./src/domains/remote/index.ts"
|
|
42
|
+
"./src/domains/remote/index.ts",
|
|
43
|
+
"./src/domains/claude-remote/index.ts"
|
|
43
44
|
],
|
|
44
45
|
"skills": [
|
|
45
46
|
"./config/skills"
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
claude-remote-lib — MIT License
|
|
2
|
+
https://github.com/clepdn/claude-remote-lib
|
|
3
|
+
|
|
4
|
+
Copyright (c) clepdn
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in
|
|
14
|
+
all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
22
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Claude Remote protocol provenance
|
|
2
|
+
|
|
3
|
+
Protocol reference:
|
|
4
|
+
- [clepdn/claude-remote-lib](https://github.com/clepdn/claude-remote-lib),
|
|
5
|
+
commit `8ee032b3e6907f7ca34bff0a5d508d03db63d2fe` (v0.2.0).
|
|
6
|
+
Its package.json declares MIT. Attribution/license: [LICENSE.md](LICENSE.md).
|
|
7
|
+
- [clepdn/pi-claude-remote](https://github.com/clepdn/pi-claude-remote),
|
|
8
|
+
commit `0602c78af0e1adfad8a20a90bf080c59643735fb` (v0.1.0).
|
|
9
|
+
Used as a behavior reference for the independently implemented pi adapter.
|
|
10
|
+
That repository does not declare a license; its source is not vendored.
|
|
11
|
+
|
|
12
|
+
Only the required CCR v2 protocol is implemented here: create session, bridge
|
|
13
|
+
credentials, worker registration via PUT, SSE input, batched event output,
|
|
14
|
+
heartbeats, delivery ACKs, state, control replies, and worker credential refresh.
|
|
15
|
+
No npm/git runtime dependency on either upstream, generated dist, examples,
|
|
16
|
+
probes, SDK convenience API, or copied pi message definitions are shipped.
|
|
17
|
+
|
|
18
|
+
Differences from the upstream implementations:
|
|
19
|
+
- Explicit opt-in; no uploads just because pi-plus is installed.
|
|
20
|
+
- pi's current ModelRuntime owns auth.json and locked OAuth refresh; no direct
|
|
21
|
+
credential parsing, copied OAuth flow, sidecar credential store, or inference
|
|
22
|
+
account rotation. Upstream's AuthStorage.getApiKey API is no longer public.
|
|
23
|
+
- Startup resolves on SSE headers, not stream EOF, so heartbeat/refresh run.
|
|
24
|
+
- One bounded writer batches events and serializes worker epoch changes.
|
|
25
|
+
Writes retry at most three times; reconnect attempts are bounded. Requests
|
|
26
|
+
have timeouts and cancellation; stop invalidates late callbacks and startup.
|
|
27
|
+
- Queues/dedup/frame sizes are bounded. Overload stops mirroring with a local
|
|
28
|
+
warning rather than growing forever or blocking the local agent.
|
|
29
|
+
- Network work never runs on pi's message dispatch path.
|
|
30
|
+
- Complete messages only, avoiding per-token traffic and a second accumulator.
|
|
31
|
+
- Uses pi's AgentMessage types; no transcript/context rewriting.
|
|
32
|
+
- Static session titles, no hidden Haiku inference or session-title API calls.
|
|
33
|
+
- Read-only also disables remote interruption; unsupported model/permission
|
|
34
|
+
changes return errors instead of falsely acknowledging a local change.
|
|
35
|
+
- No historical replay or persistence of remote credentials/session handles.
|
|
36
|
+
Each local session/branch connection starts a fresh remote mirror.
|
|
37
|
+
|
|
38
|
+
The worker URL is an API endpoint, not a browser link. Users open
|
|
39
|
+
https://claude.ai/code and select the named pi session, as upstream's live
|
|
40
|
+
probe instructs. This is an unofficial protocol and may change without notice.
|