Is your feature request related to a problem? Please describe.
Plugin bin/ deployment is currently hard-wired to Claude Code's skills-directory plugin contract. As new harnesses adopt executable-deployment patterns (e.g. Codex CLI, Gemini CLI), each harness will need its own bin/ placement, PATH setup, and reload mechanism. Without an abstraction, the _deploy_plugin_bin function will grow per-harness branches and the gate logic (deny, scope, trust-posture) will be duplicated.
This was identified as item 6 in the advisory review panel on PR #1591 (tracked in #1620).
Describe the solution you'd like
Introduce a TargetProfile (or similar) abstraction that encapsulates the per-harness bin/ deployment contract:
- bin_dir(project_root, scope) -- where to place executables for this harness
- bin_path_mechanism -- how the harness discovers deployed bins (PATH env, config entry, manifest)
- reload_hint -- user-facing instruction to activate new executables (e.g.
/reload-plugins, restart)
- requires_plugin_manifest -- whether the harness needs
.claude-plugin/plugin.json or equivalent
- supported_scopes -- which install scopes (user, project) support bin/ deployment
Each TargetProfile would implement the contract for its harness, and _deploy_plugin_bin would delegate to the active profile instead of hard-coding Claude-specific logic.
Describe alternatives you've considered
- Keep the current approach and add per-harness
if branches as needed (simpler short-term, scales poorly).
- Use a registry/dict mapping harness names to deployment functions (lighter than a full class hierarchy, but less extensible).
Additional context
Is your feature request related to a problem? Please describe.
Plugin
bin/deployment is currently hard-wired to Claude Code's skills-directory plugin contract. As new harnesses adopt executable-deployment patterns (e.g. Codex CLI, Gemini CLI), each harness will need its own bin/ placement, PATH setup, and reload mechanism. Without an abstraction, the_deploy_plugin_binfunction will grow per-harness branches and the gate logic (deny, scope, trust-posture) will be duplicated.This was identified as item 6 in the advisory review panel on PR #1591 (tracked in #1620).
Describe the solution you'd like
Introduce a
TargetProfile(or similar) abstraction that encapsulates the per-harness bin/ deployment contract:/reload-plugins, restart).claude-plugin/plugin.jsonor equivalentEach
TargetProfilewould implement the contract for its harness, and_deploy_plugin_binwould delegate to the active profile instead of hard-coding Claude-specific logic.Describe alternatives you've considered
ifbranches as needed (simpler short-term, scales poorly).Additional context