6 Commits

Author SHA1 Message Date
EugeneTes
4fbb5a83a5 Install exact latest pi-claude-code-provider so npm doesn't keep the old ^range 2026-09-25 07:23:58 +00:00
EugeneTes
bdf7aa6b3e Unpin Claude Code CLI and auto-update pi-claude-code-provider on start 2026-09-25 06:33:29 +00:00
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
EugeneTes
92e4df5f84 Let Claude Code MCP servers reach the pi provider
pi-claude-code-provider deliberately isolates its Claude subprocess by
hard-coding --strict-mcp-config, --setting-sources "" and --tools "",
which hides every user-configured MCP server (Google Calendar, etc.)
from the model. Patch those three flag-pairs out of the installed
provider's src/claude-args.ts on every start (idempotent — no-op once
they're gone). Trade-off: Claude can now invoke MCP/web/file tools
invisibly, forfeiting the provider's execution-authority guarantee.
Acceptable for a personal Telegram bot.
2026-09-06 20:17:57 +00:00
EugeneTes
4296157689 Make docker-entrypoint pass through command args
The node:24 base image sets ENTRYPOINT ["docker-entrypoint.sh"]. We
override that script but the ENTRYPOINT still runs on every start, so
compose's `command:` was being handed to our script as args (and
silently ignored — we always exec'd `node dist/main.js`). That made the
`sleep infinity` override useless: the crash-looping app kept running.

Fix by execing "$@" when args are present so compose overrides work,
and set CMD to ["node","dist/main.js"] so normal (no-override) starts
still boot the app.
2026-09-06 17:38:54 +00:00
EugeneTes
8c6b4c1a54 Install pi-claude-code-provider on first container start
The Pi coding agent stores installed packages under $PI_CODING_AGENT_DIR
(=/pi-agent in the image), which is a volume — so anything installed at
build time is masked at runtime. Wrap the CMD in an entrypoint that runs
`pi install npm:pi-claude-code-provider` the first time the volume is
seen and drops a marker so subsequent starts are a no-op.
2026-09-06 17:21:03 +00:00