Skip to content

Add Pi package and local extension management - #23

Merged
ScottRBK merged 3 commits into
mainfrom
feat/package-management
Sep 6, 2026
Merged

ScottRBK merged 3 commits into
mainfrom
feat/package-management

Conversation

@ScottRBK

@ScottRBK ScottRBK commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Adds persistent package provisioning so callers can install Pi tools before starting agent runs.
The shared API exposes add_package, list_packages, and remove_package, with Pi as the first
implementation and clear unsupported-operation errors from other adapters.

  • Supports exact npm versions, Git sources with explicit refs, and local extension files or
    package directories. Local sources stay in place and survive removal of their registration.
  • Uses Pi's existing user configuration and native install/remove commands. Fresh AgentShell
    instances load the persisted packages; callers retain responsibility for container isolation.
  • Validates sources and settings, handles timeouts/cancellation, and verifies persistence because
    Pi can exit successfully even when saving settings fails.
  • Documents usage and scope. Per-run resource selection and individual toggles are deferred.

Validation: the full unit/integration suite passed (1,119 tests), followed by all 47 focused package
tests after adding one further CI regression case. Five real Pi 0.85.1 smoke tests passed, covering
local registration, removal, loading by a fresh shell, symlink identity, and settings-write failure.
The smoke tests need no model requests or downloads. npm/Git command handling is covered with mocked
subprocesses.

Independent Astra review at x-high reasoning found one P2 issue: following symlinks changed Pi's
local package identities. The fix preserves link paths, with regression coverage for both linked
configuration directories and extension files. The reviewer verified the fix against real Pi and
reported no remaining actionable findings.

Closes #22.

Comment thread AGENTS.md

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please move the package management specific documentation to ./docs/development/package_management.md and add a pointer to it in the AGENTS.md - this is way too much bloat in an agents.md file

@ScottRBK
ScottRBK merged commit a23b692 into main Sep 6, 2026
2 checks passed
@ScottRBK
ScottRBK deleted the feat/package-management branch September 6, 2026 19:49
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.

Add Pi extension/package provisioning API

1 participant