Repository navigation
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a runtime plugin system: an in-process host, server + web plugin SDKs, capability
façades, an RPC/HTTP transport with plugin-aware auth scopes, a web UI host with
extension points, and a marketplace + install lifecycle. Supersedes the previous 8-PR
stack (#3725–#3732), consolidated here for review.
Authorship
Authored primarily by Claude Fable 5.0, with code reviews from Grok 4.5, GPT-5.6 Sol, GLM-5.2, and Kimi K3.
What a plugin can do
tools(served over MCP, per-client filtered)settings(schema-driven; validated + rendered by the host)events(filtered stream, sliding backpressure)context(host-composed, per-plugin + global byte budgets)policy(deny/defer only — a hook can never approve)providers(4-method SPI; the host shim owns the other 9 adapter members)database,filesystem,httpClient,vcs,sourceControl,secrets,projections.read,environments.read,terminals,agents,textGenerationTrust model
Plugins are in-process and full-trust, gated by manifest-declared capabilities with
install-time user consent — so the consent copy is written to say what each grant
actually means (e.g.
eventsstates plainly that it includes the full text of everymessage). Where a capability could steer the agent, the design is asymmetric on
purpose: a
policyhook can only make the system more restrictive, never less, so theworst a broken plugin can do is block work — visible and recoverable — rather than
approve something the user never saw.
Hardening includes DNS-pinned SSRF egress validation (including NAT64 embeddings),
credential-stripping on cross-origin redirects, realpath filesystem containment,
per-plugin secret namespacing, a migration-time schema-namespace gate with
anchored-object validation, and tarball extraction limits. Blast-radius discipline is
uniform: plugin callbacks are timed out, failures are contained per event/turn/request,
and a hung or crashed plugin cannot stall a user's turn or take the host down.
Example plugins
Built outside this repo, against the SDKs as a third party would consume them:
workflow-boards-plugin — a
board-as-state-machine workflow engine (46 RPC methods) built entirely on the plugin
capability APIs; the largest real-world exercise of the surface.
t3code-plugins — three focused
samples, each demonstrating a pairing:
policy+context+settings) — teach the agent your rulesAND enforce them
providers+httpClient) — a local model as a first-class providervia the 4-method SPI
events+database+ web route) — react to the system, store it,show it
Writing these from a foreign repo is also what drove the
plugin-sdk-websplit(portable
.vs monorepo-only./ui): its README documents the remainingintegration gaps found along the way.
Review notes
one could reach the behavior, and each replied to inline with its fixing commit.
main. Typecheck green across all packages; full suites green(server 1769, web 1333, shared 305, contracts 230).
Note
Add plugin system with host, SDK, capabilities, web host, and marketplace
PluginHostservice that boots plugins during server startup.@t3tools/plugin-sdk-web) and host singleton publication so plugin web bundles can share React, Effect, and contracts with the host via ESM import maps injected into everyindex.htmlresponse.PluginUiHostto the root route, which dynamically loads plugin web entries and registers routes (/_chat/$environmentId/p/$pluginId/$), sidebar sections, settings pages (/settings/$), command palette entries, and per-project actions.plugin:<id>:(read|operate)andplugins:manage; standard-client grants implicitly satisfy plugin scopes without verbatim listing.ownerfield (userorplugin:<id>) throughout the orchestration stack: contracts, decider, projector, projection queries, client state, and relay; user-facing thread lists exclude plugin-owned threads.GitHubCliwith draft PR creation, PR merge strategies, and fetching PR detail, checks, reviews, and review comments.generateBoardProposalto all text generation providers (Codex, Claude, OpenCode) running in a no-tool posture from a throwaway temp directory; Cursor and Grok providers return a structured unsupported error.hello-boardfixture plugin with server migrations,listNotes/addNote/exerciseCapabilitiesRPC methods, and a React notes UI with sidebar and route registration.📊 Macroscope summarized 26ae126. 109 files reviewed, 0 issues evaluated, 0 issues filtered, 0 comments posted
🗂️ Filtered Issues
No issues evaluated.