Home · Developers · Guides · Plugins

Extensibility

Plugins

Plugin subsystem overview

The plugin system lets third-party developers extend Nova Coder without modifying the core. Plugins can contribute agents, tools, AI providers, language parsers, workflows, and CLI commands. Custom kernel services remain a future extension point.

Plugin Interface

A plugin implements Plugin:

from novacoder.plugins.plugin import Plugin
from novacoder.tools.tool import Tool
from novacoder.agents.agent import Agent

class MyPlugin(Plugin):
    name = "my_plugin"
    version = "0.1.0"
    description = "Does something useful."

    def initialize(self, memory=None, config=None, workspace=None) -> None:
        super().initialize(memory, config, workspace)

    def shutdown(self) -> None:
        pass

    def register_tools(self) -> list[Tool]:
        return [MyTool()]

    def register_agents(self) -> list[Agent]:
        return [MyAgent()]

    def register_providers(self) -> list[type[AIProvider]]:
        return [MyProvider]

    def register_extractors(self) -> dict[str, type[LanguageExtractor]]:
        return {"my-lang": MyExtractor}

    def register_workflows(self) -> list[Plan]:
        return [my_plan]

    def register_commands(self) -> list[dict[str, Any]]:
        return [
            {"name": "hello", "func": lambda: print("Hello from plugin"), "help": "Say hello"}
        ]

PluginService

PluginService loads and manages plugins and registers all contributions:

from novacoder.plugins.service import PluginService
from novacoder.config.settings import AppConfig

service = PluginService(config=AppConfig())
service.register(MyPlugin())
service.start()

print(service.list_plugins())

Plugin Discovery

Plugins are discovered automatically from two sources:

Entry Points

Installable packages declare a novacoder.plugins entry point in their pyproject.toml:

[project.entry-points."novacoder.plugins"]
my_plugin = "my_package.plugin:MyPlugin"

Plugins Directory

Set plugins.plugins_dir in the configuration to a directory that contains plugin.py files:

plugins:
  plugins_dir: ~/.config/novacoder/plugins
~/.config/novacoder/plugins/
└── my_plugin/
    └── plugin.py

CLI

List active plugins and their contributions:

novacoder plugins

Run from a specific project directory:

novacoder --project /path/to/project plugins

See Plugin System Wiring and Integration for integration details and verification commands.

Extension Points

Wired extension points:

  • Agents, specialist agents
  • Tools, filesystem, network, cloud, or hardware tools
  • Workspace, plugins receive the workspace service via initialize()
  • AI Providers, custom model endpoints via register_providers()
  • Language Parsers, custom symbol extractors via register_extractors()
  • Workflows, YAML-defined agent pipelines via register_workflows()
  • Commands, CLI commands via register_commands()

Future extension points (not yet wired):

  • Services, custom kernel services

Configuration

plugins:
  enabled: true
  plugins_dir: null

plugins_dir can also be set via the environment variable NOVACODER_PLUGINS__PLUGINS_DIR:

export NOVACODER_PLUGINS__PLUGINS_DIR=/path/to/plugins

Plugin settings can be stored in persistent memory:

self._memory.remember("my_plugin.api_key", api_key, scope=MemoryScope.PERSISTENT)

Lifecycle Events

PluginService publishes the following events to the EventBus:

  • PluginDiscovered
  • PluginLoaded
  • PluginStarted
  • PluginFailed
  • PluginStopped

Security

Plugins run with the same permissions as the Nova Coder process. Enhanced sandboxing is now available through the PluginSandbox system with multiple isolation levels (None, Basic, Strict, Paranoid), resource limits, and security scanning. See Advanced Plugin System for details on sandboxing capabilities.

Development Instructions

Creating a Plugin

  1. Create a module in novacoder/plugins/ or an external package.
  2. Implement the Plugin interface.
  3. Override register_tools() and/or register_agents() to contribute capabilities.
  4. Accept workspace in initialize() if your plugin needs project context.
  5. Register the plugin manually or via entry points.
  6. Add tests in tests/test_plugins.py.
  7. Document the plugin in this wiki page.

Plugin Lifecycle

PluginService.initialize() discovers plugins during kernel boot. PluginService.start() calls plugin.initialize() on every registered plugin and wires its tools and agents into ToolService and AgentService. PluginService.stop() calls plugin.shutdown() in reverse order. Failures in one plugin are isolated and do not stop the others.

Testing Plugins

def test_plugin_registers_tool():
    plugin = MyPlugin()
    tools = plugin.register_tools()
    assert len(tools) == 1
    assert tools[0].name == "my_tool"

Example Plugin

See examples/plugins/hello_plugin/ for a complete working plugin with pyproject.toml, a tool, an agent, and tests.

Best Practices

  • Keep plugins focused on one domain.
  • Declare all tools and agents explicitly.
  • Clean up resources in shutdown().
  • Provide clear documentation and examples.

REST API

Endpoint Description
GET /api/plugins Loaded plugins (includes enabled flag)
GET /api/plugins/components Contributed components
GET /api/plugins/commands Plugin commands
POST /api/plugins/commands/{name}/execute Execute a command (blocked when the owning plugin is disabled)
POST /api/plugins/{name}/enable / disable Per-plugin toggle, persisted to ~/.config/novacoder/plugin_state.json; disabled plugins are skipped at startup and cannot execute
GET /api/plugins/marketplace/list?q=&tag=&author=&status= Marketplace registry browse/search
GET /api/plugins/marketplace/{plugin_id} Plugin metadata + reviews + dependencies
GET /api/plugins/marketplace/stats Registry statistics
POST /api/plugins/marketplace/register Publish plugin metadata
POST /api/plugins/marketplace/{plugin_id}/review Add a 1-5 star review

The marketplace registry (~/.novacoder/plugin_registry.json) is metadata-only: PluginMetadata, PluginReview, ratings, download counts. Package signing/verification and binary install are internal.

IDE Extensions View

The React IDE (/ide) has an Extensions sidebar view (puzzle icon in the activity bar) implemented in web/react/src/components/ide/ExtensionsPanel.tsx:

  • Installed section lists GET /api/plugins with name, version, description, contribution counts (tools/agents/commands) and an enable/disable button wired to POST /api/plugins/{name}/enable|disable.
  • Marketplace section searches GET /api/plugins/marketplace/list?q= and renders PluginMetadata (author, version, tags, rating, downloads, status). Entries matching a loaded plugin (by name/plugin_id) are excluded from the marketplace list and shown under Installed instead.
  • The marketplace is a metadata registry only, there is no package download/install endpoint, so uninstalled entries are labeled "registry" rather than offering an Install action. Installing a plugin means placing it on disk under the plugins directory; enable/disable applies to loaded plugins.

Source: wiki/plugins.md · rendered 2026-11-10