Repository navigation
Extension framework: a VS Code-style plugin system for Prism Terminal with first-class Claude Code mod integration #118
Copy link
Copy link
Open
Description
Before anything else: when this issue is picked up, the work MUST start with the
/grill-meskill with Max, to settle the design decisions before any spec, plan or code. Max wants this done correctly, not thrown together.
Owner, 2026-10-04 (relayed from a research session). This is the idea, not a decided design. The research behind it is C:\Users\Admin\Documents\Claude\research\prism-terminal\2026-10-04-mods-support-and-beyond.md, in particular B4 (bridge mod plus MCP server), B5 (rich panes) and B6 (the ui_* attach spike).
1. Vision
- A real extension framework for Prism Terminal, comparable to VS Code's: extensions contribute UI and behaviour to the terminal.
- Built-in, easy integration with Claude Code mods, hooks and Codex, so agent tooling can shape the terminal experience.
- Not just a mod system, and not limited to buttons.
2. Possible contribution points
- Overlays: buttons and chips over the terminal, for example a "Compact (70%)" button a mod shows when context is high.
- Status and tabs: badges and decorations on tabs, and status items.
- Panels: slide-over panels with rich content (Markdown, charts, lists, forms).
- Commands: the command palette and context menus.
- Notifications: notifications and toasts.
- Settings and keys: settings pages and keybindings.
- Rendering hooks: for links and paths.
3. Who can contribute
- Native Prism extensions: a manifest plus code.
- Claude Code mods: through a small "Prism SDK" snippet. Its calls do nothing outside Prism, so mods stay portable.
- Hooks and Codex: Claude Code's classic hooks, and Codex.
- Shell scripts: through a
prismCLI or an OSC escape protocol. - Anyone: the protocol should be open, so any agent or tool can build UI.
4. Architecture sketch (to be decided in the grill-me session)
- Manifest: each extension declares itself in one.
- Declarative UI: extensions describe elements, which Prism renders natively in React with its theme tokens. No arbitrary HTML or JS in the main window. Rich panels only in a sandboxed iframe (
srcdoc, noallow-same-origin, strict CSP). - Channel: a local, versioned channel between Prism main and extensions/mods, either a localhost hook server or a named pipe.
- Events both ways: clicks, input and lifecycle from Prism; state updates from extensions.
5. Safety
- Permissions: per extension, with trust levels.
- Ownership: show which extension owns each element, with an on/off switch per extension.
- The shell rule: an element never types into the shell on its own (the existing rule).
- Mods may be absent: mods are unsandboxed and can be remotely disabled or blocked on managed machines, so the framework must not depend on mods existing.
6. Constraints from CLAUDE.md
- Shared core:
core/is shared with the Prism media viewer (TermHostConfig, owner decisions). - For other people: a product that works on a fresh Windows install.
- Scope: split panes and "shows files" are on the Out list, so overlays and slide-overs fit better.
7. Unknowns needing a short spike first
- Can a mod keep a channel open to receive clicks from Prism, given mod hook budgets and no timers?
- Can a mod trigger actions such as
/compactitself, or only fill the prompt? - How stable is the mod API across 2.1.x?
8. What it would host later
This framework would also be the home for later features: status signals, Prism Guard, and the roster and inbox.
Research only so far: nothing has been changed in the repo.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
Maxaubert commentedon Oct 10, 2026
Addition, owner 2026-10-10: built-in mods
As well as mods users write themselves, Prism Terminal should come with pre-installed mods: some on by default, others the user can choose to turn on. A mod can reach the UI too, for example by adding buttons.
The owner pointed to the agent indicator as the model: since #131 it runs on Claude Code hooks through a plugin the app ships with (
core/claude-plugin, handed to each shell throughCLAUDE_CODE_PLUGIN_DIRS, and switched on in Settings). Built-in mods could be bundled and delivered the same way.This is a general direction only. No specific mods have been chosen yet.
Their words: "we want to build some pre-installed mods or mods the user can choose to enable and whether or not that could be like added with the tool like you already said that we could add the agent indicators based on hooks so this seems like a similar idea just with mods though it's just a general idea no specific mods"
Maxaubert commentedon Oct 12, 2026
Addition, owner 2026-10-12: architecture across the two apps
The terminal in this repo also runs inside Prism (
core/, seedocs/two-apps.md). Mods have to fit that, so the design needs this settled in the grill-me session before anything else.The owner's words: "letting mods do things to the tab bar should be limited to just the terminal app, while general mod support for the terminal in general and maybe adding buttons on top of the terminal might be ok to do in prism too. im not sure, i want both to be as open as possible but i also dont want my terminal in prism to break or suck just cuz i created a mod for this terminal"
The goal: both apps as open to mods as possible, without a mod written for Prism Terminal ever breaking or degrading the terminal in Prism.
Proposed split (a starting point for the grill-me session, not decided)
Split the contribution points by who owns the surface, the same line
core/andsrc/already draw.1. Terminal points, in
core/, available in both apps:2. App-shell points, in
src/, Prism Terminal only:Prism never sees group 2 at all. A mod that targets the tab bar simply has nothing to attach to in Prism, by design, not by accident.
How a mod stays unable to break the terminal
core/would be a declaredTermHostConfigfield (which is an owner decision percore/README.md), for examplemods: 'off' | 'terminal'. Prism can start with it off or limited and open it up later, without forking the core.Questions for the grill-me session