CLI dev: load bundled plugins from ROOT/plugins#407
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 68d68035a1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 23e9cbb376
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let plugins_dir = match std::env::current_dir() { | ||
| Ok(cwd) => cwd.join("plugins"), |
There was a problem hiding this comment.
Anchor debug bundled-plugin lookup to workspace root
In debug builds this now resolves bundled plugins from current_dir()/plugins, so any plugin-enabled CLI command run inside an unrelated repo that happens to contain a plugins folder will load those directories as bundled plugins; PluginManager::new then auto-registers bundled dirs as enabled: true and boots them. This makes plugin execution depend on shell CWD instead of the Yaak workspace and can execute unintended code when developers run the debug CLI outside this repo.
Useful? React with 👍 / 👎.
| let vendored_plugin_dir = if is_dev() { | ||
| resolve_workspace_plugins_dir().unwrap_or(bundled_plugin_dir) |
There was a problem hiding this comment.
Keep dev workspace plugins in watch mode
By assigning vendored_plugin_dir to the workspace plugins path in dev mode, bundled plugin directories now satisfy the vendored check in PluginManager::add_plugin and boot with watch: false; this removes hot-reload behavior for local plugin development and forces app restarts after edits. The bundled-source override should not also change vendored classification, or dev mode should explicitly preserve watch for workspace plugins.
Useful? React with 👍 / 👎.
Summary
yaak-cliuse the workspacepluginsdirectory for bundled plugins in debug/dev buildspluginscannot be resolveddev_modeintoPluginManager::newso behavior matches app dev modeTesting