Skip to content

Plugins: installation state, settings, token connections, permissions and REST API #3543

Open

Description

@integry

Goal

Let an administrator install a plugin on the instance and hold its state. This issue stores and serves the state; it does not yet apply a plugin's contributions to runs (next issue).

Installation state

  • A plugin is available (in the registry), installed (an administrator installed it on this instance) and enabled or disabled. Disabling keeps settings and connections; uninstalling deletes them after confirmation.
  • Stored per instance: plugin id, installed manifest version, enabled flag, settings JSON, optional repository limit (empty = all repositories), granted permissions, who installed it and when.
  • Settings are validated against the manifest's settings schema on save; required settings must be present before the plugin can be enabled.
  • Connections of type token and signing_secret are write-only secrets encrypted with the existing private-secret mechanism, never returned, erased from native exports. (oauth connections are wired in the next issue; until then they report not_connected.)
  • Permissions: installing records the manifest's permissions as granted, as a set. When a newer manifest version (after a ProPR upgrade) asks for a permission that was not granted, the plugin keeps running with its old grant and is flagged Needs approval until an administrator approves the new set.
  • Secret variables of package servers: when a plugin contributes a package server with secretEnv, installing requires the same explicit administrator acknowledgement the extension library requires (the secret is readable by the agent CLI, its shell tools and repository setup scripts inside the task container). The acknowledgement is recorded on the installation with who and when, and is required again when a manifest upgrade changes the package, its version or its secret variable names.
  • Only durable administrators with instance.manage_settings can install, configure, connect, enable, disable or uninstall. Every such action is recorded in the audit trail.

API

REST under /api/instance/plugins/v1: list available and installed plugins with state; read one (manifest, settings without secrets, connection states, pending acknowledgements); install; update settings; set repository limit; set or clear a token / signing_secret connection; enable/disable; approve permissions; uninstall. OpenAPI schemas and regenerated client types. MCP: read-only list_plugins and get_plugin tools.

Out of scope

Applying contributions to the extension library or template catalog, OAuth connections, the Plugins page, handlers, webhooks, commands.

Acceptance criteria

  • Install, configure, enable, disable, re-enable and uninstall of the example plugin through the API; settings and connections survive disable and are deleted by uninstall.
  • Enabling is refused, with the reason, while a required setting or a required token connection is missing, or while a package-server secret acknowledgement is missing.
  • A manifest version that adds a permission puts the plugin in Needs approval and keeps the old grant until approved.
  • Secrets never appear in API responses, MCP projections, logs or exports (sentinel test); non-administrators are refused on every management route; every management action is in the audit trail.
  • OpenAPI coverage and conformance, MCP docs and observable-surface tests pass.
  • docs/docs/features/plugins.md: install flow, permissions, connections.

Implementation

  1. Core: packages/core/src/plugins/pluginStore.ts (installation state, settings validation, secrets via packages/core/src/extensions/privateSecrets.ts, audit). Knex migration for plugin_installations and plugin secrets, following the extension migrations.
  2. API: packages/api/routes/pluginRoutes.ts; register it from a new small module rather than growing packages/api/routeRegistry.ts, which is at its max-lines limit. OpenAPI schemas, npm run gen:openapi.
  3. MCP read tools next to the other management tools with docs in docs/mcp.md.
  4. Tests in packages/core/test and packages/api/test.

Notes

Depends on the manifest issue. ProPR runs on SQLite only: do not add code or tests for other databases. Keep this pull request to state and API.

Activity

  1. added
    base-3542-epic-plugin-system-xu8
    on Nov 14, 2026
  2. propr-dev commented on Nov 14, 2026

    @propr-dev
    Contributor

    🤖 AI processing has started for this issue using claude agent with claude-opus-5-5 model.

    I'll analyze the problem and work on a solution. This may take a few minutes.

    Processing Details:

    • Agent: claude
    • Model: claude-opus-5-5
    • Branch: 3543/claude-opus-5-5-plugins-installation-stat-20261114-0440-cg9
    • Base Branch: 3542-epic-plugin-system-xu8
    • Worktree: issue-3543-20261114-0440-claude-opus-5-5-cg9

    🔍 Track Task Execution

  3. added a commit that references this issue on Nov 14, 2026
  4. added a commit that references this issue on Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    AIAI-doneauto-mergebase-3542-epic-plugin-system-xu8llm-claude-opus55propr-planned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions