Skip to content

fix(server): restore Pi extension loading - #428

Closed
oxwen11 wants to merge 2 commits into
mainfrom
fix/restore-pi-extensions
Closed

oxwen11 wants to merge 2 commits into
mainfrom
fix/restore-pi-extensions

Conversation

@oxwen11

@oxwen11 oxwen11 commented Oct 1, 2026

Copy link
Copy Markdown
Owner

Requirement

P0: a version change stopped Pie's Pi process from loading the user's Pi extensions. #104 disabled automatic extension discovery for every Pie-owned child, so extension-registered providers never reached the model list. A command an extension handles without a model turn was then rejected as a queued prompt with no active turn.

Expected behavior

  • User extensions and configured packages contribute providers, models, and slash commands in discovery and live sessions.
  • Only an explicitly supplied registered Project is approved for Project-local extensions. Discovery without a projectId does not approve incidental Project-local code, even with defaultProjectTrust: always.
  • Explicit --no-extensions and --extension remain effective in the bundled child.
  • An extension-handled prompt returns an empty, non-started receipt and does not wait for a model turn. A queued admission with no active turn still fails.

Changes and risks

  • Drop the blanket noExtensions opt-out from discovery and session children. Cold discovery still skips themes and context files.
  • The server translates a registered Project into Pi's cwd plus trust (projectTrusted / --approve). Pi still has no Project concept.
  • Preserve prompt disposition so handled is not treated as a queued prompt.
  • Extensions remain trusted executable code with the user's OS permissions, as in Pi. No new storage format. No migration of user settings or credentials.

Verification

Tested locally before push, on the pre-rebase commit, then rebased onto origin/main (4a338cb0).

  • pnpm exec vitest run --project server for list-available-models, list-available-commands, and agent: 32 passed.
  • Not yet verified: CI on this head, a clean-worktree rerun, or a Desktop/Web drive of the model picker. Those follow on this PR.

#104 turned off extension discovery for every Pie-owned child. Extension
providers never reached the model list, and a handled command was rejected
as a queued prompt with no active turn.
@pkg-pr-new

pkg-pr-new Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
npx https://pkg.pr.new/oxwen11/pie/@getpie/cli@428

commit: bbae94d

@oxwen11

oxwen11 commented Oct 1, 2026

Copy link
Copy Markdown
Owner Author

Queue update after verified #423 merge — waiting at CI

Head bbae94d6a4320a18133f8eac67974c0ca2e19193 now contains main/trusted-rules 0920277492d381b108b520b341c449bcc3e3dbd8 (behind_by=0 verified). GitHub performed a conflict-free merge update guarded by the previous exact head; no conflict resolution or source repair.

Required CI for this new head is queued/in progress at this observation, so no old-head review or acceptance is carried forward. New-head full review and affected independent runtime verification remain outstanding.

No merge or deferred auto-merge. Continue only after the applicable blocker is resolved and the new version passes required CI → review → independent acceptance.

@iamdin

iamdin commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator

Closing as a duplicate, superseded by #427. The runtime implementation is equivalent; the additional command-discovery opt-out assertion has been preserved in #427 (commit 3e21e19), with 36 focused tests and pnpm check passing. #427 also retains the bundled-process integration coverage and existing Desktop evidence. No unique production behavior is discarded. Branch retained.

@iamdin iamdin closed this Oct 1, 2026
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