Skip to content

Feature request: make optional features disableable core plugins, and give plugins real surfaces #3947

Open

Description

@Raing5Days

Problem

Which features exist in OpenBitFun is decided at compile time. The only runtime control a user has is which sidebar entries are pinned, so there is no way to turn off the task board or insights, and removing the browser tab means editing code and recompiling.

Four places decide what can appear in the UI, and all four are static arrays:

Surface Location Third-party?
Sidebar entries app/navigation/sidebarRegistry.ts No. The file says "trusted frontend contributions only; this is not a plugin execution boundary"
Scenes, meaning tabs app/scenes/registry.ts:33 No. SCENE_TAB_REGISTRY is an array and SceneTabId a literal union
Settings pages app/scenes/settings/settingsRegistry.ts:87 No
Commands app/global-search/productActionCatalog.ts:43 No

The sidebar registry is the most developed of the four. It has register and unregister, rejects duplicate IDs (sidebarRegistry.ts:37-49), stores user ordering as IDs only (sidebarPreferences.ts:16), and keeps unknown IDs in place as explicitly disabled instead of dropping them. That design is right. It is only limited to first-party code.

Two other things also decide whether a feature is usable. There are seven compile-time capability packs (src/crates/assembly/product-capabilities/src/lib.rs:20-28), and there are three real runtime switches, desktop cards, desktop pet and the workspace search index, living in settings/runtime.json under features.* and read by hand on each settings page.

The larger gap is that plugins cannot add a real surface. They contribute tools and hooks, and they can define neither a page nor storage of their own. That is the difference between an integration plugin and a feature plugin.

docs/architecture/product-customization-blueprint.md:208 already states the acceptance criterion for this feature:

Hiding navigation or a panel does not mean the backend capability is disabled; when secure trimming is needed, backend registration, entry configuration and plugin contributions must all be constrained together.

A toggle that only hides an icon is not off.

What I want

Three layers:

  1. Core, not disableable: session and message flow, Agent Runtime and tool execution, model and provider config, workspace and file IO, permissions and audit, events and storage, i18n and theme infrastructure, and the four remote scenarios.
  2. First-party core plugins, preinstalled, on by default, individually disableable: terminal, Git, browser, Pages, Mini App, task board, insights, shell, external import, assistant, agent manager, skills, MCP, ACP agents, desktop control, desktop cards, desktop pet, voice input, deep review, deep research, creation, office documents.
  3. Third-party plugins, off by default and explicitly enabled, using the same contribution interfaces as the core plugins.

The contribution surface I would open to third parties:

Surface Third-party? Note
Commands Yes The host runs existing actions. IDs prefixed with the plugin ID, which Obsidian also does to avoid collisions
Sidebar entries Yes sidebarRegistry already does the work. Remove the first-party restriction
Custom views and scenes Yes, declarative The plugin declares that it has a page named X, and the host renders it
Plugin-private storage Yes One quota-limited directory per plugin, never workspace files
Settings pages Yes, declarative The plugin declares field types and the host renders them with its own components
Status bar items Yes New, and simple
Layout presets Yes, restricted A plugin can offer a named layout. It cannot mutate the current one without an explicit switch
Message cards Declarative only Reuse GenerativeUI and MiniApp cards. No arbitrary components in the message stream
Editor extensions, global CSS, arbitrary DOM No The editor shares the UI process, so granting this grants full UI access. Skins stay limited to paint tokens (openbitfun-skin-designer/references/contract.md:14-16)
Permission policy, auto-approve rules No Product-enforced. A plugin must not relax its own permissions

UI contributions must be declarative manifests, because code in the UI process breaks all four remote scenarios at once. In a remote workspace the UI is on the controller and execution is on the host, and it is unclear which side a UI plugin would run on. In Peer Device Mode the UI is a shell and invocations come from the peer. A detached dispatch job may have no submitter left. The remote control surfaces, mobile web and the IM bots, have no UI process at all.

Obsidian and SiYuan both run plugin JS in the renderer, which is why their ecosystems are lively and why they have no real boundary. Copying that conflicts with all four scenarios. The cost of declarative manifests is expressiveness, since a plugin cannot paint a floating panel inside the editor.

Two details from Obsidian and SiYuan that are worth copying in any case: registerView in Obsidian and addTab with addDock in SiYuan are what let a plugin add a feature, since a custom view type plus private storage is the minimum for "feature plugin". And addCommand prefixes command IDs with the plugin ID automatically.

On governance: Obsidian has moved past restricted mode alone. Their 2026 announcement describes review of every version rather than only the first submission, public safety scorecards, capability disclosures for network, filesystem and clipboard before install, and a remote blocklist fetched every 12 hours. OpenBitFun starts ahead on the sandbox, because plugins already run in a supervised Bun subprocess (docs/architecture/extensions/plugin-runtime-design.md:19). What is missing is disclosure and governance.

On the objection that adding a feature still means editing the Rust core, three cases differ by an order of magnitude:

  1. No new code. A capability built from skills, agent definitions, cron jobs and hooks already works today.
  2. Needs UI and no new engine logic. A plugin page with its own storage that reads and writes the workspace through existing tools. This case should not require core changes. It does today only because plugins have no surfaces and no storage.
  3. Needs new engine primitives, meaning new tool types, new model interaction, new transport or a new permission model. This genuinely requires core changes and no plugin design fixes it. Obsidian is the same: 4000 plugins and none of them add a sync protocol.

Two adjacent findings changed the order I would ship in. Layout is already data-driven: canvasStore holds layout.splitMode, splitRatio, splitRatio2, editor group IDs and per-tab operations (content-canvas/stores/canvasStore.ts:40-97), so named layout presets are pure frontend work and should come before plugins, since a plugin needs somewhere to sit. And Swarm already exists as a tree of planners and workers (subagents/swarm.rs:5,60,125, tree budget of 5 levels and 128 agents). Google Antigravity's /swarm is a flat team on a shared board with mention routing, and building that is an architecture change to a 16k-line coordinator, so it does not belong here. Rendering the existing tree is worth doing now, because it is the first real consumer of the custom view interface and would show early whether that interface is wrong.

Agent lifecycle and plugin lifecycle have the same shape, create and enable, idle and waiting, interrupt and disable, delete and uninstall. Designing them separately gives two UIs and two persistence paths for one lifecycle.

Acceptance

Six slices, each shippable alone, ordered by risk.

  1. Named layout presets, no plugins. Persist the existing canvas layout as user-named presets. Two layouts switch with correct split mode and ratios, survive restart, and do not crash when a referenced editor group is gone.
  2. One optional-feature registry in the backend and one frontend gate, with the three existing switches migrated first and no behavior change. Disabling a feature removes backend registration, frontend entry and settings page together, re-enabling restores all three, and old config still parses.
  3. Turn SCENE_TAB_REGISTRY, SETTINGS_PAGE_MANIFESTS and PRODUCT_ACTION_CATALOG into registries with a built-in batch registration, and widen the literal unions to builtin literal | \plugin:${string}`following theminiapp:${string}` precedent. First-party only at this stage, and every existing scene still works.
  4. A read-only Swarm view built from AgentList and child session records. During a real Ultimate task the panel reflects creation, completion and interruption live, rebuilds after refresh, and survives a deleted agent.
  5. Plugin parity for view registration, private storage, commands and declarative settings. A sample plugin with one page, one command, one setting and its own data works when enabled, and disabling returns the UI to the pre-install state across a restart.
  6. Marketplace and governance: install, version compatibility, capability disclosure, restricted mode, remote blocklist. With restricted mode on, a third-party plugin's code does not execute at all.

Risks I cannot resolve in the issue itself:

  • check:core-boundaries. A runtime feature registry and compile-time capability packs are different layers of fact, and whether the new registry becomes a second source of truth about capability needs a decision first.
  • The i18n audit is the part I am least sure about. Sidebar contributions require labelKey to start with common: or shared:, and plugin copy cannot be pre-registered in the repo, so third-party locale resources collide with the static and dynamic key proofs.
  • Plugin surfaces consume colors and theme-color-governance-baseline*.json is a ratchet that must not be raised to make this pass.
  • Each of the four remote scenarios needs an answer for where plugins load, whether enable state syncs to a peer, and how a missing plugin degrades.
  • If capability toggles count as product-level facts, the CLI needs an expression of them, or the same config means different things per surface.
  • Persisting the canvas layout means handling layouts that reference deleted files and uninstalled mini apps. Nothing handles that today.

The cost of not doing this is that adding a feature means a sessionModeLower === 'cowork' branch (WelcomePanel.tsx:213), one entry in each of the scene, settings and command tables, and a locale block. Every feature added that way pays interest on the set of things that could exist.

Sources

Repo files cited above, plus sidebarContributions.ts:40-74, scenes/registry.ts:33-175, SceneBar/types.ts:15-36, settingsRegistry.ts:87-545, EditorArea.tsx:176-231, subagents/swarm.rs, modes/ultimate.rs:4, swarm_planner_agent.md:23-51, agentic/coordination/, product-customization-blueprint.md:100-112,196-239, plugin-runtime-design.md:19-32. External: the Obsidian Plugin class API and their 2026 plugin announcement, the SiYuan Plugin class docs, and the Google Antigravity /swarm docs and blog post. One item I could not verify from a primary page: that Obsidian core plugins can be individually disabled. The help pages are JS-rendered and I could not extract the text.

Activity

  1. Raing5Days commented on Nov 16, 2026

    @Raing5Days
    ContributorAuthor

    Adding a reference implementation that solves the hardest part of this proposal.

    eta (0xfe-project/eta, a self-hosted agent workbench) has a live answer to the problem in the "What the code looks like today" section — the fact that backend registration, entry configuration and plugin contribution have to be kept in sync by hand.

    Its host knows no feature names. There is one WebSocket speaking a flat target.action protocol, and the first frame after connecting is hello, which carries:

    • ops — every callable operation with its schema and description
    • mounted — the plugins that are actually mounted right now
    • state — the current state of every eager target

    The UI then follows one rule: a plugin not present in hello.mounted has its entry points hidden.

    That is the same requirement the product doc states —

    Hiding navigation or a panel does not mean the backend capability is disabled; when secure trimming is needed, backend registration, entry configuration and plugin contributions must all be constrained together.

    — but solved from the other direction. Instead of three places agreeing through discipline, entry existence is derived from the runtime registry, so there is nothing to keep in sync and no way for them to disagree. A disabled or absent plugin cannot leave a stale menu item behind, because the menu item was never authored separately.

    Two details worth stealing alongside it:

    • target:missing is a protocol frame, not an inference. Subscribing to an unregistered name returns one target:missing event (not an error, not added to the replay ring, sent only to that subscriber). The UI stores it and clears it when state arrives. Its "not found" screens are driven by that frame rather than by comparing against a list. That is a cleaner version of the "unknown plugin ID keeps its position and degrades to disabled" rule already used in sidebarPreferences.ts.
    • Names are flat target.action, with the types shared between web and host (client-contracts). No nesting, no feature-specific channels.

    I'm not suggesting replacing Tauri IPC with a single socket — that doesn't fit the four remote scenarios here. The transferable part is the shape: a runtime-published op/mount manifest that the UI reads instead of a hardcoded registry it has to match.

    Source: docs/architecture/wire-protocol.md in that repo.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions