Skip to content

CLI dev: load bundled plugins from ROOT/plugins#407

Open
gschier wants to merge 10 commits intomainfrom
codex/cli-dev-plugin-dir-root
Open

CLI dev: load bundled plugins from ROOT/plugins#407
gschier wants to merge 10 commits intomainfrom
codex/cli-dev-plugin-dir-root

Conversation

@gschier
Copy link
Member

@gschier gschier commented Feb 26, 2026

Summary

  • make yaak-cli use the workspace plugins directory for bundled plugins in debug/dev builds
  • fall back to embedded vendored plugins when workspace plugins cannot be resolved
  • pass dev_mode into PluginManager::new so behavior matches app dev mode

Testing

  • cargo test -p yaak-cli

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 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".

@gschier
Copy link
Member Author

gschier commented Feb 26, 2026

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 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".

Comment on lines +143 to +144
let plugins_dir = match std::env::current_dir() {
Ok(cwd) => cwd.join("plugins"),

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

Comment on lines +247 to +248
let vendored_plugin_dir = if is_dev() {
resolve_workspace_plugins_dir().unwrap_or(bundled_plugin_dir)

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

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