You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
A server plugin's shell domain has one member, the create.before hook. A plugin that wants to change how the model works with shells (return a handle and let the model check, wait or kill later; show a list of the session's shells) has no way to reach the shells themselves. The built-in shell tool yield*s the internal Shell service, which plugins can't get. Going through the HTTP API isn't an option either, since a server plugin gets no client. Writing its own process manager loses the shell permission parsing, job notices and the TUI shell tab.
Proposal: expose the existing Shell service reads and controls on the plugin shell domain (Effect and Promise faces):
With this, a plugin can wrap the built-in tool with tool.transform(e => e.update("shell", ...)) and add check/wait/kill/list actions on top of it, without forking the tool.
kill needs a core Shell.kill that keeps the record and output (#62363 proposes it with POST /api/shell/:id/kill). With #62362 (session.background for plugins), the same wrapper can also move a long call to the background. On my fork the core side is in cevr@c965f99 (kill, list({ exited })); the plugin domain itself is a thin pass-through I can add in a PR once the shape is OK.
Thanks for the detailed proposal, @cevr! In short: you'd like the plugin shell domain to expose the existing Shell service's list, get, output, wait and kill (in both the Effect and Promise APIs), so a plugin can build background-shell controls on top of the built-in shell tool instead of forking it.
I checked the code: ShellDomain currently exposes only hook (create.before). The core Shell service already has list/get/wait/output, but it has no kill that keeps the record and output, and list has no exited filter. So, as you say, this needs both a small plugin API addition and a core change. A plugin can't do it today.
Maintainers will look at the proposed shape and decide whether to go ahead. Please wait for their feedback on the API before opening the PR.
Activity
opencodejr commentedon Nov 6, 2026
Thanks for the detailed proposal, @cevr! In short: you'd like the plugin
shelldomain to expose the existingShellservice'slist,get,output,waitandkill(in both the Effect and Promise APIs), so a plugin can build background-shell controls on top of the built-inshelltool instead of forking it.I checked the code:
ShellDomaincurrently exposes onlyhook(create.before). The coreShellservice already haslist/get/wait/output, but it has nokillthat keeps the record and output, andlisthas noexitedfilter. So, as you say, this needs both a small plugin API addition and a core change. A plugin can't do it today.Maintainers will look at the proposed shape and decide whether to go ahead. Please wait for their feedback on the API before opening the PR.