@vanillagreen/pi-claude-bridge 1.0.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 +12 -0
- package/LICENSE +21 -0
- package/README.md +53 -0
- package/assets/claude-bridge1.png +0 -0
- package/assets/claude-bridge2.png +0 -0
- package/bundle/index.js +34422 -0
- package/package.json +151 -0
- package/src/agents-md.ts +54 -0
- package/src/config.ts +144 -0
- package/src/convert.ts +100 -0
- package/src/extract-tool-results.ts +47 -0
- package/src/index.ts +1225 -0
- package/src/models.ts +25 -0
- package/src/prompt-context.ts +138 -0
- package/src/query-state.ts +80 -0
- package/src/session-verify.ts +38 -0
- package/src/skills.ts +24 -0
- package/src/typebox-to-zod.ts +42 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 1.0.0
|
|
4
|
+
|
|
5
|
+
Initial vstack fork of `elidickinson/pi-claude-bridge`.
|
|
6
|
+
|
|
7
|
+
- Registers Claude Code as a Pi provider via `claude-bridge/*` models.
|
|
8
|
+
- Removes the upstream AskClaude tool; this package is provider-only.
|
|
9
|
+
- Adds vstack extension-manager settings.
|
|
10
|
+
- Adds opt-in forwarding for `APPEND_SYSTEM.md` and recognized Pi `before_agent_start` prompt hooks (`pi-agents-tmux`, `pi-task-panel`, `pi-caveman`).
|
|
11
|
+
- Keeps upstream provider fixes for session sync/rebuild, compact recovery, abort recovery, ID-based tool-result matching, skills forwarding, strict MCP config, cloud MCP suppression, and Opus thinking display.
|
|
12
|
+
- Pins and bundles Claude Agent SDK `0.2.128`, with auto-detection of the local `claude` executable for vstack installs without `node_modules`.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Eli Dickinson
|
|
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
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# pi-claude-bridge
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
Claude Code provider bridge for Pi. It registers `claude-bridge/*` models and routes Pi turns through the Claude Agent SDK while keeping Pi's tools in the Pi TUI.
|
|
6
|
+
|
|
7
|
+
This package is a vstack fork of [`elidickinson/pi-claude-bridge`](https://github.com/elidickinson/pi-claude-bridge). The provider, MCP tool bridge, session sync, streaming, and Claude Code SDK plumbing come from that project; this fork removes the AskClaude tool and adds vstack-controlled prompt-context forwarding.
|
|
8
|
+
|
|
9
|
+
## What it provides
|
|
10
|
+
|
|
11
|
+
- `claude-bridge/claude-opus-4-7`, Sonnet, and Haiku models in `/model`.
|
|
12
|
+
- Pi tool calls bridged to Claude Code through a local MCP server.
|
|
13
|
+
- Session reuse/rebuild so Claude Code follows Pi history across normal turns, `/compact`, forks, tree navigation, and abort recovery.
|
|
14
|
+
- Thinking-level forwarding, summarized Opus thinking display, MCP isolation, and Claude cloud-MCP suppression to reduce token overhead.
|
|
15
|
+
- Optional forwarding of Pi-only context that upstream does not pass to Claude Code.
|
|
16
|
+
|
|
17
|
+
## Prompt context
|
|
18
|
+
|
|
19
|
+
Default behavior matches upstream: append `AGENTS.md` plus Pi's skills block to Claude Code's `claude_code` preset prompt.
|
|
20
|
+
|
|
21
|
+
Extra Pi prompt context is **off by default** and can be enabled in `/extensions:settings` → `Claude Bridge`:
|
|
22
|
+
|
|
23
|
+
| Setting | Default | Effect |
|
|
24
|
+
| --- | --- | --- |
|
|
25
|
+
| `includeAppendSystemPromptMd` | off | Forward project/global `APPEND_SYSTEM.md`, including `.pi/APPEND_SYSTEM.md`. |
|
|
26
|
+
| `includeProjectAgentsHook` | off | Forward recognized `pi-agents-tmux` `before_agent_start` additions such as the Project Agents/Subagents list. |
|
|
27
|
+
| `includeTaskPanelHook` | off | Forward recognized `pi-task-panel` workflow reminders. |
|
|
28
|
+
| `includeCavemanHook` | off | Forward recognized `pi-caveman` response-style prompt additions. |
|
|
29
|
+
|
|
30
|
+
The bridge detects these hook additions from the effective Pi system prompt for the current turn and forwards only enabled recognized blocks.
|
|
31
|
+
|
|
32
|
+
## Settings
|
|
33
|
+
|
|
34
|
+
| Setting | Default | Notes |
|
|
35
|
+
| --- | --- | --- |
|
|
36
|
+
| `enabled` | on | Register the Claude bridge provider; reload required. |
|
|
37
|
+
| `appendSystemPrompt` | on | Forward `AGENTS.md` + skills. |
|
|
38
|
+
| `strictMcpConfig` | on | When Claude Code filesystem settings are loaded, block filesystem MCP auto-loads; Pi owns tool execution. |
|
|
39
|
+
| `pathToClaudeCodeExecutable` | auto | Explicit `claude` binary path; empty auto-detects `claude` or `claude-code` on PATH. |
|
|
40
|
+
|
|
41
|
+
Legacy config files are still read: `~/.pi/agent/claude-bridge.json` and `.pi/claude-bridge.json`. vstack extension-manager settings override them.
|
|
42
|
+
|
|
43
|
+
## Differences from upstream
|
|
44
|
+
|
|
45
|
+
- No AskClaude tool; this package is provider-only.
|
|
46
|
+
- vstack extension-manager settings for prompt forwarding and Claude Code options.
|
|
47
|
+
- Bundled runtime dependencies for vstack installs; the bridge auto-detects the local Claude Code executable.
|
|
48
|
+
- Opt-in delivery of `APPEND_SYSTEM.md` and recognized Pi `before_agent_start` prompt hooks.
|
|
49
|
+
- Keeps upstream provider fixes: ID-based tool-result matching, compact/session rebuild handling, abort recovery, skill read-tool rewriting, strict MCP config, cloud MCP suppression, and Opus 4.7 thinking display forcing.
|
|
50
|
+
|
|
51
|
+
## Debugging
|
|
52
|
+
|
|
53
|
+
Set `CLAUDE_BRIDGE_DEBUG=1` to write bridge logs to `~/.pi/agent/claude-bridge.log` and per-query Claude Code CLI logs under `~/.pi/agent/cc-cli-logs/`.
|
|
Binary file
|
|
Binary file
|