Skip to content

fix(pi): make local and remote box configuration portable - #400

Open
asantos00 wants to merge 2 commits into
madarco:mainfrom
asantos00:fix/pi-portable-config
Open

asantos00 wants to merge 2 commits into
madarco:mainfrom
asantos00:fix/pi-portable-config

Conversation

@asantos00

@asantos00 asantos00 commented Oct 5, 2026 •

Copy link
Copy Markdown

Summary

  • materialize Pi skill symlinks on the host before Docker volume sync so macOS absolute links and links outside ~/.pi/agent remain usable in Linux boxes
  • seed selected agents' current static config and shared materialized skills into each Remote Docker box, since that provider prepares a shared base rather than a host-specific snapshot
  • add a bake-affecting pi.version setting for exact Pi version or npm dist-tag selection
  • warn when MCP definitions exist outside the Pi config root AgentBox copies, while reporting only fixed paths and counts and never copying or printing MCP contents
  • document Remote Docker sizing and bump the additive provider SDK surface to 4.4.0

Why

Pi configurations often link ~/.pi/agent/skills/* into other host directories. The Docker helper sees the source at /src, so those links lose their host path context and arrive broken. Cloud orchestration also assumed every provider baked static host config during prepare, while Remote Docker only prepared a shared base image. A remote Pi box therefore received neither the host's Pi config nor its skills.

Pi and supporting tool versions also drift when installs always select latest. Finally, MCP definitions may live in shared or Claude configuration outside ~/.pi/agent, which makes a box appear to have lost its MCP setup.

This keeps credential migration explicit: the doctor check points users at the mismatch, but does not copy external MCP files or inspect server names, commands, or environment values. Remote static seeding uses the existing snapshot filters, selects only the requested agents plus shared ~/.agents skills, and runs inside the create cleanup guard.

Validation

  • pnpm typecheck — 48 tasks
  • pnpm lint — 26 tasks
  • pnpm build — 26 tasks
  • pnpm --filter @madarco/agentbox test — 1,662 passed, 1 skipped
  • pnpm --filter @agentbox/sandbox-core test — 564 passed
  • pnpm --filter @agentbox/config test — 237 passed
  • pnpm --filter @agentbox/agent-registry test — 87 passed
  • pnpm --filter @agentbox/agent-pi test — 8 passed
  • pnpm --filter @agentbox/sandbox-remote-docker test — 70 passed
  • focused cloud static-seeding tests — 11 passed
  • provider SDK 4.4.0 build and isolated pack:test
  • focused Prettier checks, JSON schema parse, and git diff --check
  • disposable local Docker trial: pinned Pi 0.85.1, external skill materialized as real files, fake external MCP secret absent from the box and doctor output, 4 GiB/2 CPU limits, custom relay port
  • real host Pi staging: 77 valid skill directories with SKILL.md, zero remaining symlinks; two broken host links were excluded
  • disposable Remote Docker trial on Ubuntu/amd64 over private SSH: pinned Pi 0.85.1, selected external skill materialized, fake MCP secret absent, Docker-enforced 1 CPU/2 GiB limits, repository branch seeded, Chrome/agent-browser smoke passed, valid PNG copied back, private loopback preview passed, stop/start persistence passed, and final container/volume cleanup passed

The monorepo-wide cloud package test command also reaches two existing sandbox-cloud custody tests whose expected normalized GitHub URL differs from this host's result. The focused cloud static tests and other affected suites pass, and this change does not touch custody code.

Materialize host-resolvable skill links before Docker sync, allow Pi's installed version to be pinned, and warn when MCP definitions live outside the synced Pi root without exposing their contents.
@asantos00
asantos00 requested a review from madarco as a code owner October 5, 2026 15:32
@vercel

vercel Bot commented Oct 5, 2026

Copy link
Copy Markdown

@asantos00 is attempting to deploy a commit to the madarco's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

Thanks for your pull request. Before it can be merged, please read our Contributor License Agreement and sign it by posting the comment below. You only ever have to do this once.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@madarco

madarco commented Oct 5, 2026

Copy link
Copy Markdown
Owner

Looks great thanks @asantos00! Need to ask, have you personally tested this code, or is this an AI generated submission?

Remote Docker prepares a shared base rather than a host-specific snapshot, so seed selected agents' static config and shared skills after provisioning. Keep failures inside the create cleanup guard and document the per-box size setting. Bump the additive provider SDK surface to 4.4.0.
@asantos00 asantos00 changed the title fix(pi): make box configuration portable and reproducible fix(pi): make local and remote box configuration portable Oct 6, 2026
@asantos00

Copy link
Copy Markdown
Author

This is an AI-assisted submission. I have not done a separate line-by-line manual review myself, so I do not want to imply otherwise. The branch has been exercised rather than submitted from generated output alone: the affected test suites, full typecheck/lint/build, and provider SDK pack test pass; I also ran disposable local Docker and Remote Docker trials. The remote trial created a real linux/amd64 box over SSH, verified Pi 0.85.1, materialized an external skill, confirmed a fake external MCP secret was absent, enforced 1 CPU/2 GiB limits, passed Chrome/agent-browser smoke and private preview/artifact retrieval, survived stop/start, and then removed the container and volume. The PR body has the full validation list.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants