Skip to content

refactor: unify plugin RPC namespaces to devframes:plugin:<slug>:<fn>#105

Merged
antfu merged 1 commit into
mainfrom
refactor/unify-plugin-rpc-namespace
Jul 17, 2026
Merged

refactor: unify plugin RPC namespaces to devframes:plugin:<slug>:<fn>#105
antfu merged 1 commit into
mainfrom
refactor/unify-plugin-rpc-namespace

Conversation

@antfubot

Copy link
Copy Markdown
Collaborator

Summary

Every plugin used a different convention for its RPC function names:

Plugin Before After
terminals devframes-plugin-terminals:spawn devframes:plugin:terminals:spawn
code-server devframes-plugin-code-server:status devframes:plugin:code-server:status
inspect devframes-plugin-inspect:list-functions devframes:plugin:inspect:list-functions
messages devframes-plugin-messages:list devframes:plugin:messages:list
git git:status devframes:plugin:git:status
a11y devframe-a11y-inspector:get-config devframes:plugin:a11y:get-config

All six now share one namespace: devframes:plugin:<slug>:<fn-name>, matching each plugin's @devframes/plugin-<slug> package name.

What else moved

The same identifier previously did double duty as both the RPC namespace and the devframe mount id (which drives the hosted mount path /__<id>/). These are split now:

  • Mount id (id: in defineDevframe, e.g. dock ids, basePath, CLI command for a11y/inspect/messages) → devframes_plugin_<slug> (underscore, URL-path-safe).
  • RPC namespace, shared-state keys, streaming/broadcast channel namesdevframes:plugin:<slug>:... (colon).

Hub-owned identifiers a plugin merely mirrors (devframe:docks:active, devframe:terminals, devframe:messages:updated) are untouched — they belong to @devframes/hub, not the plugin.

Also updated

  • AGENTS.md's RPC namespacing convention now documents the new format.
  • Every affected README, doc page (docs/plugins/*, docs/guide/hub.md, docs/errors/DF8107.md), test, and tsnapi API snapshot.
  • inspect's function-name.test.ts, which asserted a specific split of the old (single-colon) inspect RPC name — rewritten with a synthetic single-colon example plus the real (now 3-colon) inspect name for the deep-namespace case.

Out of scope

  • plugins/inspect and plugins/messages already had a pre-existing mismatch between their published npm bin command (devframe-inspect / devframe-messages) and their devframe id (devframes-plugin-inspect / devframes-plugin-messages before this PR). That mismatch predates this change and isn't touched here.
  • Historical plans/*.md docs keep their original git:* references as a paper trail of already-implemented work.

Verification

pnpm lint && pnpm test && pnpm typecheck && pnpm build all pass (672/672 tests).


Created with the help of an agent (opencode).

Every plugin used a different convention for its RPC function names —
`devframes-plugin-terminals:spawn`, `git:status`,
`devframe-a11y-inspector:get-config`, etc. Unify all six plugins
(a11y, code-server, git, inspect, messages, terminals) onto one
namespace: `devframes:plugin:<slug>:<fn-name>`, matching each plugin's
`@devframes/plugin-<slug>` package name.

The same identifier previously did double duty as both the RPC
namespace and the devframe mount id (which drives the hosted mount
path `/__<id>/`). Split these: the mount id becomes
`devframes_plugin_<slug>` (underscore, URL-path-safe) while the RPC
namespace, shared-state keys, and streaming-channel names use the
colon form. Hub-owned identifiers the plugins merely mirror
(`devframe:docks:active`, `devframe:terminals`,
`devframe:messages:updated`) are left untouched since they belong to
`@devframes/hub`, not the plugins.

Updates the AGENTS.md RPC namespacing convention to match, plus every
affected doc, README, test, and RPC API snapshot.

Co-authored-by: opencode <noreply@opencode.ai>
@netlify

netlify Bot commented Jul 16, 2026

Copy link
Copy Markdown

Deploy Preview for devfra ready!

Name Link
🔨 Latest commit a24bc77
🔍 Latest deploy log https://app.netlify.com/projects/devfra/deploys/6a58b1d5548c4200081318bd
😎 Deploy Preview https://deploy-preview-105--devfra.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@antfu
antfu merged commit eb62a84 into main Jul 17, 2026
12 checks passed
@antfu
antfu deleted the refactor/unify-plugin-rpc-namespace branch July 17, 2026 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants