qdk_chemistry.ui.plugin_installer module

Install QDK Chemistry Copilot plugins with venv-bound MCP commands.

qdk_chemistry.ui.plugin_installer.require_mcp()

Raise an actionable error when MCP support is unavailable.

Return type:

None

exception qdk_chemistry.ui.plugin_installer.PluginInstallError[source]

Bases: RuntimeError

Raised when the QDK Chemistry plugin cannot be installed or bound.

qdk_chemistry.ui.plugin_installer.plugin_names()[source]

Return the QDK Chemistry plugins supported by the installer.

Return type:

tuple[str, ...]

qdk_chemistry.ui.plugin_installer.install_plugin(source, *, name=None, target_dir=None)[source]

Install a QDK Chemistry plugin and bind its MCP command to this environment.

Parameters:
  • source (str) – Copilot plugin source, plugin name, or local plugin directory.

  • name (str | None) – Explicit supported plugin name when it cannot be inferred from source.

  • target_dir (str | Path | None) – Workspace directory for a workspace-scoped installation. When omitted, installs for the current user.

Return type:

dict[str, Any]

Returns:

Installation details including the plugin, scope, bound commands, and MCP configuration path.

Raises:

PluginInstallError – If the plugin source, Copilot installation, or MCP command binding is invalid.

qdk_chemistry.ui.plugin_installer.update_plugin(plugin_name, *, target_dir=None)[source]

Update a plugin and restore its MCP command binding.

Parameters:
  • plugin_name (str) – Name of the supported QDK Chemistry plugin to update.

  • target_dir (str | Path | None) – Workspace directory for a workspace-scoped installation. When omitted, updates the current user’s installation.

Return type:

dict[str, Any]

Returns:

Update details including the plugin, scope, bound commands, and MCP configuration path.

Raises:

PluginInstallError – If the plugin is unsupported, unbound, or cannot be updated and rebound.

qdk_chemistry.ui.plugin_installer.update_all_plugins(*, target_dir=None)[source]

Update every installed QDK Chemistry plugin binding.

Parameters:

target_dir (str | Path | None) – Workspace directory for workspace-scoped installations. When omitted, updates the current user’s installations.

Return type:

dict[str, Any]

Returns:

A status mapping with the update result for each bound plugin.

Raises:

PluginInstallError – If no QDK Chemistry plugin bindings are found or an update fails.

qdk_chemistry.ui.plugin_installer.rebind_plugin(plugin_name, *, target_dir=None)[source]

Bind an installed plugin to the MCP command in the current environment.

Parameters:
  • plugin_name (str) – Name of the supported QDK Chemistry plugin to rebind.

  • target_dir (str | Path | None) – Workspace directory for a workspace-scoped installation. When omitted, rebinds the current user’s installation.

Return type:

dict[str, Any]

Returns:

Rebinding details including the plugin, scope, bound commands, and MCP configuration path.

Raises:

PluginInstallError – If the plugin is unsupported, missing, or the current environment does not provide its MCP command.