Skip to content

feat: runtime extensibility with plugin-like implementation#160

Draft
NNTin wants to merge 3 commits intopablodelucca:mainfrom
NNTin:feat/plugin-system-for-runtime-extensibility
Draft

feat: runtime extensibility with plugin-like implementation#160
NNTin wants to merge 3 commits intopablodelucca:mainfrom
NNTin:feat/plugin-system-for-runtime-extensibility

Conversation

@NNTin
Copy link
Contributor

@NNTin NNTin commented Mar 18, 2026

❗ This PR will be in draft for a while. When I work on the PR I will rebase main/merge main into it. This is not production ready. A few iteration is needed to maybe add Plugin-like support. ❗

Many PRs and Issues are regarding extending support. A proper way to support other services or allowing custom implementation is needed. Hence I worked on a plugin system:

Plugin / main PR:
NNTin#8

example usage of plugin:
NNTin#9
-> here a custom backend solution is used to mirror Discord Users as Agents and have Discord Messages displayed in the browser frontend.
image


It turns out "plugin" is not a viable approach. VS Code does not support plugins directly interfering with each other, rewriting its behavior. What can be done instead is having third party services collaborate with each other through pre-defined interfaces. e.g. via http, ws, RPC.
So this part of it needs to be re-written.


What's important is to separate VSC/Cursor related code from the core of it so other runtimes can register. Including a custom runtime, like NNTin#9


The question is now the definition of the interface with third party services. Should this be done over HTTP, WebSocket or RPC? Or PubSub? With Register/Deregister? Support multiple "providers" or only a single one?
I'm fine with either implementations. It's just important that this step is specified so it can be implemented that way.

Feature OpenAPI AsyncAPI OpenRPC
REST
WebSockets ⚠️ (transport-agnostic)
JSON-RPC
Event-driven
Tooling ⭐⭐⭐⭐ ⭐⭐⭐ ⭐⭐

I would like to provide a specification along with it. OpenAPI is a solid one I have experience with but with our event-driven nature it is not suited. AsyncAPI and OpenRPC I have not much experience with. So having guidance there would be cool.

NNTin and others added 3 commits March 18, 2026 17:59
- Add src/plugin/types.ts: IPixelAgentsPlugin, IAgentProvider, IAgentHandle,
  IMessageBridge, IRuntimeUI, PostMessage, and related interfaces
- Add src/plugin/registry.ts: registerPlugin/getPlugin singleton
- Add src/vscode/VSCodePlugin.ts: WebviewViewProvider + IPixelAgentsPlugin impl
- Add src/vscode/VSCodeAgentProvider.ts: terminal lifecycle via IAgentProvider
- Add src/vscode/VSCodeMessageBridge.ts: webview ↔ extension bridge
- Add src/vscode/VSCodeRuntimeUI.ts: VS Code dialog/state APIs via IRuntimeUI
- Add src/core/agentLifecycle.ts: runtime-agnostic agent + message coordination
- Replace vscode.Webview param with PostMessage in fileWatcher, transcriptParser,
  timerManager, assetLoader
- Replace ExtensionContext param with IRuntimeUI in layoutPersistence
- Replace AgentState.terminalRef with AgentState.handle (IAgentHandle)
- Remove PersistedAgent from types.ts (replaced by PersistedAgentHandle)
- Delete PixelAgentsViewProvider.ts and agentManager.ts (replaced by new modules)
- Slim extension.ts to only wire up the plugin and lifecycle

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The /api/dev-assets endpoint was Vite dev-server only (configureServer hook),
causing 404 in the production static build on Vercel. Added a generateBundle
hook to emit dev-assets.json alongside the JS/CSS artifacts so browser mock
asset loading works in production. Also renamed the dev middleware path to
/dev-assets.json for consistency. Removed broken /vite.svg favicon reference.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@NNTin NNTin marked this pull request as draft March 18, 2026 18:06
@florintimbuc florintimbuc added type: feature New feature or capability area: providers Multi-provider support: Codex, Copilot, OpenCode, Kiro, etc. scope: architecture Significant architectural change or new subsystem labels Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: providers Multi-provider support: Codex, Copilot, OpenCode, Kiro, etc. scope: architecture Significant architectural change or new subsystem type: feature New feature or capability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants