@vanillagreen/pi-claude-bridge 1.0.1 → 1.0.2

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/bundle/index.js CHANGED
@@ -33642,17 +33642,28 @@ var DISALLOWED_BUILTIN_TOOLS = [
33642
33642
  "Read",
33643
33643
  "Write",
33644
33644
  "Edit",
33645
+ "MultiEdit",
33645
33646
  "Glob",
33646
33647
  "Grep",
33647
33648
  "Bash",
33648
33649
  "Agent",
33650
+ "Task",
33649
33651
  "NotebookEdit",
33650
33652
  "EnterWorktree",
33651
33653
  "ExitWorktree",
33654
+ "CronList",
33652
33655
  "CronCreate",
33653
33656
  "CronDelete",
33654
33657
  "TeamCreate",
33655
33658
  "TeamDelete",
33659
+ "TaskOutput",
33660
+ "TaskStop",
33661
+ "SendMessage",
33662
+ "Skill",
33663
+ "TodoRead",
33664
+ "TodoWrite",
33665
+ "ListMcpResources",
33666
+ "ReadMcpResource",
33656
33667
  "WebFetch",
33657
33668
  "WebSearch",
33658
33669
  "AskUserQuestion",
@@ -33661,6 +33672,11 @@ var DISALLOWED_BUILTIN_TOOLS = [
33661
33672
  "ToolSearch",
33662
33673
  "ScheduleWakeup"
33663
33674
  ];
33675
+ var CLAUDE_BRIDGE_TOOL_ISOLATION = {
33676
+ tools: [],
33677
+ disallowedTools: DISALLOWED_BUILTIN_TOOLS,
33678
+ allowedTools: [`mcp__${MCP_SERVER_NAME}__*`]
33679
+ };
33664
33680
  var sharedSession = null;
33665
33681
  function convertAndImportMessages(session, messages, customToolNameToSdk) {
33666
33682
  const { anthropicMessages, sanitizedIds } = convertPiMessages(messages, customToolNameToSdk);
@@ -34235,8 +34251,7 @@ function streamClaudeAgentSdk(model, context, options) {
34235
34251
  const queryOptions = {
34236
34252
  cwd,
34237
34253
  env: childEnv,
34238
- disallowedTools: DISALLOWED_BUILTIN_TOOLS,
34239
- allowedTools: [`mcp__${MCP_SERVER_NAME}__*`],
34254
+ ...CLAUDE_BRIDGE_TOOL_ISOLATION,
34240
34255
  permissionMode: "bypassPermissions",
34241
34256
  includePartialMessages: true,
34242
34257
  systemPrompt: {
@@ -34418,5 +34433,7 @@ function index_default(pi) {
34418
34433
  }
34419
34434
  }
34420
34435
  export {
34436
+ CLAUDE_BRIDGE_TOOL_ISOLATION,
34437
+ DISALLOWED_BUILTIN_TOOLS,
34421
34438
  index_default as default
34422
34439
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vanillagreen/pi-claude-bridge",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Pi provider bridge that runs Claude Code through the Claude Agent SDK, with opt-in forwarding for Pi prompt context.",
5
5
  "type": "module",
6
6
  "keywords": [
package/src/index.ts CHANGED
@@ -138,15 +138,29 @@ const MODELS = buildModels(getModels("anthropic"));
138
138
 
139
139
  // Disable Claude Code built-ins in the provider path. Pi owns tool execution;
140
140
  // Claude reaches Pi tools through the bridged MCP server instead.
141
- const DISALLOWED_BUILTIN_TOOLS = [
142
- "Read", "Write", "Edit", "Glob", "Grep", "Bash", "Agent",
141
+ //
142
+ // `allowedTools` is a permission auto-allow list in the Claude Agent SDK, not a
143
+ // visibility allowlist. Use `tools: []` to remove the built-in tool set, and keep
144
+ // this disallow list as a belt-and-suspenders guard for SDK/CLI built-ins that may
145
+ // otherwise leak into the model context (e.g. TodoWrite, CronList, SendMessage).
146
+ export const DISALLOWED_BUILTIN_TOOLS = [
147
+ "Read", "Write", "Edit", "MultiEdit", "Glob", "Grep", "Bash", "Agent", "Task",
143
148
  "NotebookEdit", "EnterWorktree", "ExitWorktree",
144
- "CronCreate", "CronDelete", "TeamCreate", "TeamDelete",
149
+ "CronList", "CronCreate", "CronDelete", "TeamCreate", "TeamDelete",
150
+ "TaskOutput", "TaskStop", "SendMessage", "Skill",
151
+ "TodoRead", "TodoWrite",
152
+ "ListMcpResources", "ReadMcpResource",
145
153
  "WebFetch", "WebSearch",
146
154
  "AskUserQuestion", "EnterPlanMode", "ExitPlanMode",
147
155
  "ToolSearch", "ScheduleWakeup",
148
156
  ];
149
157
 
158
+ export const CLAUDE_BRIDGE_TOOL_ISOLATION = {
159
+ tools: [] as string[],
160
+ disallowedTools: DISALLOWED_BUILTIN_TOOLS,
161
+ allowedTools: [`mcp__${MCP_SERVER_NAME}__*`],
162
+ } satisfies Pick<NonNullable<Parameters<typeof query>[0]["options"]>, "tools" | "allowedTools" | "disallowedTools">;
163
+
150
164
  // --- Session persistence ---
151
165
 
152
166
  interface SessionState {
@@ -987,8 +1001,7 @@ function streamClaudeAgentSdk(model: Model<any>, context: Context, options?: Sim
987
1001
  const queryOptions: NonNullable<Parameters<typeof query>[0]["options"]> = {
988
1002
  cwd,
989
1003
  env: childEnv,
990
- disallowedTools: DISALLOWED_BUILTIN_TOOLS,
991
- allowedTools: [`mcp__${MCP_SERVER_NAME}__*`],
1004
+ ...CLAUDE_BRIDGE_TOOL_ISOLATION,
992
1005
  permissionMode: "bypassPermissions",
993
1006
  includePartialMessages: true,
994
1007
  systemPrompt: {