Skip to content

fix(plugins): respect PILOT_HOME paths#191

Open
MicroMilo wants to merge 1 commit into
OpenBMB:mainfrom
MicroMilo:codex/respect-pilot-home-plugin-paths
Open

fix(plugins): respect PILOT_HOME paths#191
MicroMilo wants to merge 1 commit into
OpenBMB:mainfrom
MicroMilo:codex/respect-pilot-home-plugin-paths

Conversation

@MicroMilo

Copy link
Copy Markdown

Summary

  • derive plugin directory and plugins.json from resolvePilotHome()
  • make plugin storage honor PILOT_HOME like the rest of the UI server path helpers
  • add regression coverage for isolated PILOT_HOME plugin paths

Verification

  • npm --workspace ui exec vitest run server/utils/plugin-loader.pilot-home.test.js
  • npm exec -- tsc --noEmit -p tsconfig.json

Notes

This is a real path consistency bug: plugin-loader hardcoded ~/.pilotdeck while ui/server/utils/pilotPaths.js already defines PILOT_HOME-aware home resolution.

@MicroMilo

Copy link
Copy Markdown
Author

Validation note:

This PR fixes a real path consistency bug.

The UI server already has a shared resolvePilotHome() helper for resolving PilotDeck home state. Before this change, plugin-loader bypassed that helper and hardcoded plugin state under ~/.pilotdeck, including both the plugins directory and plugins.json.

That broke PILOT_HOME isolation for plugin state.

This PR changes plugin-loader to derive both paths from resolvePilotHome():

  • plugin directory: <PILOT_HOME>/plugins;
  • plugin config file: <PILOT_HOME>/plugins.json.

The regression test verifies this directly by setting PILOT_HOME to a temporary directory, writing plugin config, and reading it back from the same isolated home.

Validation commands used by this PR:

npm --workspace ui exec vitest run server/utils/plugin-loader.pilot-home.test.js
npm exec -- tsc --noEmit -p tsconfig.json

The scope is also clear: this PR fixes plugin-loader path resolution specifically. It does not claim that every UI/server path is now fully PILOT_HOME-clean.

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.

1 participant