-
Notifications
You must be signed in to change notification settings - Fork 16
docs: regulate the terminology with a canonical Terms page #298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
f88a023
docs: add a canonical Terms page and terminology rules, renumber the …
antfubot 7edebca
refactor(plugin-a11y): rename the injected script's internals off "ag…
antfubot 42577e5
docs: sweep docs and READMEs to the canonical vocabulary
antfubot 8600b67
docs: apply review — hub UI provider, hosted/standalone adapters, Mes…
antfubot c425f80
refactor: rename the term-clashing APIs, deprecated aliases kept
antfubot 29058b5
docs: move terms, when-clauses, and the events reference into a Refer…
antfubot 309ca66
chore: update
antfu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| --- | ||
| title: 'Terms' | ||
| description: 'The canonical vocabulary of these docs: one name per concept, the API or package that anchors it, and how the pieces talk to each other.' | ||
| --- | ||
|
|
||
| Every concept in these docs has exactly one name. This page fixes that vocabulary — when a term below appears anywhere in the documentation, it carries the meaning defined here. | ||
|
|
||
| ## Core | ||
|
|
||
| | Term | Meaning | Anchor | | ||
| |------|---------|--------| | ||
| | **Devframe** | The product: a framework-neutral foundation for building a devtool once and running it everywhere. | — | | ||
| | `devframe` | The npm package the foundation ships as. | `devframe` | | ||
| | **a devframe** | One tool: a definition plus its SPA, mountable anywhere. | `defineDevframe()`, `DevframeDefinition` | | ||
| | **built-in devframe** | A ready-to-run devframe shipped from this repo (data inspector, inspect, OG, a11y, git, terminals, code-server, assets). The `plugin-` npm prefix only sets these packages apart from core packages — Devframe has no plugin concept. | `@devframes/plugin-*` | | ||
| | **adapter** | A deployment entry point under `devframe/adapters/*`: cli (cac), dev, build, vite, embedded, mcp. | `devframe/adapters/*` | | ||
| | **framework kit** | Framework conventions over the standard handler, each split into a `/single` and a `/hub` scope. | `@devframes/vite`, `@devframes/nuxt`, `@devframes/next` | | ||
| | **opt-in package** | A capability shipped as its own package and added when needed. | `@devframes/json-render` | | ||
| | **hub** | The composition layer that puts many devframes behind one handler; *a hub* is one `initHub()` instance. | `@devframes/hub`, `initHub()` | | ||
| | **viewer** | A hub UI implementation: the node-side `ui` slot plus the browser-side context contract. `@devframes/hub-ui` is the reference viewer. | `initHub({ ui })` | | ||
|
|
||
| ## Node side | ||
|
|
||
| A devframe has two halves: the **node side** registers RPC functions and owns state; the **browser side** renders and calls them. | ||
|
|
||
| | Term | Meaning | Anchor | | ||
| |------|---------|--------| | ||
| | **node side** | The half of a devframe running in the Node process. | `setup(ctx)` | | ||
| | **host framework** | The environment a devframe or hub mounts into: a Vite dev server, a Next.js app, a Hono server. Named forms — *the Vite host*, *a Next.js host* — refer to a specific one. | `DevframeHost` | | ||
| | **dev server** | The standalone HTTP server the dev adapter starts. | `createDevServer()` | | ||
| | **side-car server** | The separate RPC/WebSocket process used when a host framework's handlers never see upgrade requests. | — | | ||
| | **hosted / standalone** | The two mount contexts: hosted adapters (vite, embedded) default the base path to `/__<id>/`; standalone adapters (cli, build) default to `/`. | `resolveBasePath()` | | ||
|
antfu marked this conversation as resolved.
Outdated
|
||
| | **workspace scope** | Committable per-repository storage. | `DevframeStorageScope` | | ||
| | **project scope** | Per-checkout storage, gitignored. | `DevframeStorageScope` | | ||
| | **global scope** | Per-user storage. | `DevframeStorageScope` | | ||
|
|
||
| ## Browser side | ||
|
|
||
| | Term | Meaning | Anchor | | ||
| |------|---------|--------| | ||
| | **browser side** | The half of a devframe running in a page. | `devframe/client` | | ||
| | **user app** | The application being developed and inspected. | — | | ||
| | **host page** | The browser document where the client runtime boots — in dev, usually the user app's own page. | — | | ||
| | **client runtime** | The headless runtime booted once per host page: it connects RPC, assembles the client context, and imports client scripts. | `createDevframeClientHost()` | | ||
| | **client context** | The shared object client scripts receive: panel, docks, commands, when-clauses. | `DevframeClientContext` | | ||
| | **client script** | A dock entry's script, imported into the host page by the client runtime. | `clientScript` | | ||
| | **page script** | A devframe's script running in the user app's page — loaded as a client script or standalone. The a11y page script runs axe-core. | — | | ||
| | **RPC client** | The typed connection a browser surface gets. | `connectDevframe()` | | ||
| | **SPA** | A devframe's built web interface; `clientAssets` says where it lives. | `clientAssets` | | ||
| | **panel** | A devframe's SPA as a rendered surface — in a dock panel or standalone. | — | | ||
| | **surface** | Any rendered browser view: a panel, a dock iframe, a standalone SPA. | — | | ||
| | **coding agent** | An agent consuming a devframe over MCP — the only agent in these docs. | `createMcpServer()` | | ||
|
|
||
| ## Hub | ||
|
|
||
| | Term | Meaning | Anchor | | ||
| |------|---------|--------| | ||
| | **mounted devframe** | A devframe served inside a hub under `<base><id>/`. | `initHub({ devframes })` | | ||
| | **dock entry** | A registry item: iframe, launcher, custom-render, group, or json-render. | `ctx.docks` | | ||
| | **dock rail** | The bar listing every mounted tool. | — | | ||
| | **dock panel** | The open drawer rendering the active dock entry. | — | | ||
|
|
||
| ## Communication paths | ||
|
|
||
| Three distinct paths connect the pieces; each has its own name. | ||
|
|
||
| | Path | Between | Transport | | ||
| |------|---------|-----------| | ||
| | **RPC** | browser side ↔ node side | WebSocket or static snapshot, via `connectDevframe()` | | ||
| | **client context** | client scripts ↔ client runtime | a shared object inside the host page | | ||
| | **in-page channel** | page script ↔ panel | same-origin, entirely in-browser (e.g. a `BroadcastChannel`) | | ||
|
antfu marked this conversation as resolved.
Outdated
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.