Files
VolcanicSecretary/docker-entrypoint.sh
EugeneTes dacebf9329 Revert MCP-passthrough patch to pi-claude-code-provider
The provider validates on every session init that Claude launched with
exactly its 10 mcp__pi__* proposal tools. Removing --tools "" and
--setting-sources "" made Claude Code load its built-ins plus every
extension/skill/managed-MCP tool on the user's account, which trips
the "unexpected tool set" isolation check and refuses the session.

Bump the install marker to .installed.v2 and rm -rf the package dir
before install so bind-mounted volumes carrying the previously-patched
copy get a clean reinstall. Google Calendar access via MCP through
this provider is not viable — the provider is adversarially designed
against exactly this. Implement calendar as a native Pi custom tool
if we want it in the bot.
2026-09-06 20:22:18 +00:00

29 lines
914 B
Bash

#!/bin/sh
set -e
PI_DIR="${PI_CODING_AGENT_DIR:-/pi-agent}"
# Marker version bumped from `.installed` to `.installed.v2` so existing volumes with a
# previously-patched pi-claude-code-provider get a clean reinstall (we removed the
# claude-args.ts sed patch — see commit history).
MARKER="$PI_DIR/.pi-claude-code-provider.installed.v2"
if [ ! -f "$MARKER" ]; then
echo "[entrypoint] pi install npm:pi-claude-code-provider"
mkdir -p "$PI_DIR"
# Wipe any previous (possibly-patched) install so pi restores the canonical package.
rm -rf "$PI_DIR/npm/node_modules/pi-claude-code-provider"
if /app/node_modules/.bin/pi install npm:pi-claude-code-provider; then
touch "$MARKER"
else
echo "[entrypoint] pi install failed; will retry on next start" >&2
fi
else
echo "[entrypoint] pi-claude-code-provider already installed"
fi
if [ $# -gt 0 ]; then
exec "$@"
else
exec node dist/main.js
fi