Skip to content

docs: regulate the terminology with a canonical Terms page - #298

Merged
antfu merged 7 commits into
mainfrom
dirty-ears-itch
Aug 27, 2026
Merged

docs: regulate the terminology with a canonical Terms page#298
antfu merged 7 commits into
mainfrom
dirty-ears-itch

Conversation

@antfubot

Copy link
Copy Markdown
Collaborator

What

The docs reused web-generic words — client, host, server, agent, plugin — in up to six senses each (client host vs host page being the worst pair). This PR fixes one name per concept and applies it everywhere.

  • New Terms page (docs/content/1.guide/1.terms.md), leading the guide: area-grouped tables (core / node side / browser side / hub) plus a communication-paths table contrasting RPC (browser ↔ node), the client context (client scripts ↔ client runtime), and the in-page channel (page script ↔ panel). Guide pages renumbered to make room; URLs are number-stripped so links are unaffected.
  • AGENTS.md Terminology section with the say-this/not-that regulation: bare client/host/server/agent/plugin/embedded/standalone never appear unqualified in prose (one exception: directional client → server arrows in the RPC/events tables).
  • No plugin concept: the ready-to-run @devframes/plugin-* packages are built-in devframes; the plugin- npm prefix only sets them apart from core packages. /plugins/… URLs and RPC ids keep their literal names; the docs section is retitled Built-in Devframes.
  • Key fixes: host framework / host page / user app split the six host senses; client runtime names the createDevframeClientHost() runtime in prose; node side / browser side name a devframe's halves; viewer replaces shell; dock rail/panel/entry; storage scopes are never described as "per-workspace".
  • a11y internals: the injected script is the page script (types, the a11y:page-script-ready wire message, and UI copy renamed; the public export a11yAgentBundlePath keeps its name — zero public API changes).
  • Full sweep: all docs pages (error pages included) and every README now follow the vocabulary; stale numbered-path comments in code fixed alongside the renumber.

Why

One name per concept makes the docs learnable and gives future edits (human or agent) a rule to follow instead of drifting back into ambiguity.

pnpm lint && pnpm knip && pnpm test && pnpm typecheck && pnpm build all pass (116 test files, 1271 tests).


Created with the help of an agent.

…guide

One name per concept: a new guide-leading Terms page fixes the vocabulary
(a devframe, built-in devframe, host framework, host page, user app,
node side / browser side, client runtime, page script, in-page channel,
viewer, dock entry/rail/panel, storage scopes), AGENTS.md gains the
matching regulation, and the guide pages shift up one number to lead
with it. Stale numbered-path comments in code follow the renumber.
…ent"

The injected half is now the page script, talking to the panel over the
in-page channel, so "agent" stays reserved for coding agents. Internal
types, the wire message (a11y:page-script-ready), and UI copy follow;
the public export a11yAgentBundlePath keeps its name.
Every docs page (error pages included) and README now follows the Terms
page: built-in devframes instead of a plugin concept, host framework /
host page / user app, node side / browser side, client runtime, RPC
client, viewer over shell, dock rail/panel, page script and in-page
channel, qualified scopes and sessions.
@vercel

vercel Bot commented Aug 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
devframe Ready Ready Preview Aug 27, 2026 12:16am

Comment thread docs/content/1.guide/1.terms.md Outdated
Comment thread docs/content/1.guide/1.terms.md Outdated
Comment thread docs/content/1.guide/1.terms.md Outdated
…sageChannel

Adopts antfu's review on the Terms page: the hub UI implementation term
becomes "hub UI provider" repo-wide ("external viewer" survives for
cross-origin surfaces and gains its own terms row), the mount-context
row reads "hosted / standalone adapters", and the in-page channel lists
MessageChannel alongside BroadcastChannel. Diagnostic fix strings and
code comments follow; API names (initHub's ui.viewer slot,
registerDevframeViewerOrigin) are unchanged.
createDevframeClientHost \u2192 createDevframeClientRuntime (with the
DevframeClientRuntime/Options types) so the API says what every docs
page now says; a11yAgentBundlePath \u2192 a11yPageScriptBundlePath; the
data-inspector inject exports drop "agent" (DISCOVERY_FILE /
InjectDiscovery / DataInspectorEndpoint, discovery file now
discovery.json with attach falling back to the old agent.json). Old
names stay as @deprecated aliases; kits re-export both; snapshots,
docs anchors, examples, and the devframe skill follow.
@antfubot

Copy link
Copy Markdown
Collaborator Author

Follow-up from the API/terms audit (c425f80): audited every public export across the 20+ packages against the Terms page — only three clusters genuinely clashed, now renamed with silent @deprecated aliases (zero breaking changes):

  • createDevframeClientHost()createDevframeClientRuntime() (+ DevframeClientRuntime/Options types; kits re-export both old and new)
  • a11yAgentBundlePatha11yPageScriptBundlePath (and the internal __DF_A11Y_AGENT__ guard → __DF_A11Y_PAGE_SCRIPT__)
  • data-inspector inject: AGENT_DISCOVERY_FILE/AgentDiscovery/DataInspectorAgentDISCOVERY_FILE/InjectDiscovery/DataInspectorEndpoint; the discovery file moved to discovery.json and attach falls back to the old agent.json

Everything else keeps its name deliberately: DevframeHost (anchors host framework), the *Host subsystem-owner convention, registerDevframeViewerOrigin (external viewer), the ui.viewer slot key, all coding-agent Agent* types, and FrameNav* (iframe sense). tsnapi snapshots regenerated; lint/knip/test/typecheck/build green.

…ences section

New docs/content/8.references/ section (own Reference nav tab, flat
sidebar): the Terms page, When Clauses, and the Events Reference move
out of the guide, which renumbers to close the gaps. Old /guide/* URLs
redirect via vercel.json; guide sidebar groups keep cross-section links
to the moved pages; AGENTS.md and the events-map lockstep comments
follow the new paths.
@antfu
antfu merged commit 81fd1be into main Aug 27, 2026
10 of 11 checks passed
@antfu
antfu deleted the dirty-ears-itch branch August 27, 2026 00:14
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