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
{{ message }}
Repository navigation
Commit 38b8448
Browse filesBrowse the repository at this point in the historyBrowse files
feat(hub): skip capabilities.build:false devframes in static builds
A devframe whose value is inherently live (terminals over PTY sessions,
the code-server process proxy, the assets manager) declares
capabilities.build: false; buildHub now honors it the way createBuild
does: the devframe is never mounted, so no dock, no SPA copy, no frame in
__index.json, and none of its RPCs join the static dump. DF8007 logs each
skip so a missing dock stays traceable. The terminals and code-server
plugins declare the capability (assets already did).
Copy file name to clipboardExpand all lines: docs/content/1.guide/18.hub-initiate.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -113,7 +113,9 @@ await buildHub({
113
113
})
114
114
```
115
115
116
-
Browser-side tools keep working in full: a page script still loads into the host page and talks to its panel over the [in-page channel](/guide/in-page-channel) (the a11y inspector scans a production app exactly as it does in dev). Reads resolve from the baked dump (`static`/`snapshot` RPCs, shared-state snapshots); live writes (messages, terminals, command execution) have no server, so the browser clients degrade to local no-ops, and a panel's dock-activation deep links ride a same-origin `BroadcastChannel` instead of the RPC relay. See the [buildHub options](/references/hub-api#buildhub-options) reference, and [`examples/a11y-messages-playground`](https://github.com/devframes/devframe/tree/main/examples/a11y-messages-playground) for a Vite host whose `vite build` output ships the hub.
116
+
Browser-side tools keep working in full: a page script still loads into the host page and talks to its panel over the [in-page channel](/guide/in-page-channel) (the a11y inspector scans a production app exactly as it does in dev). Reads resolve from the baked dump (`static`/`snapshot` RPCs, shared-state snapshots); live writes (messages, command execution) have no server, so the browser clients degrade to local no-ops, and a panel's dock-activation deep links ride a same-origin `BroadcastChannel` instead of the RPC relay.
117
+
118
+
A devframe whose value is inherently live declares `capabilities.build: false` and stays out of the build entirely - no dock, no SPA copy, no RPCs in the dump (`DF8007` logs each skip). The built-in terminals, code-server, and assets devframes declare it, so a hub mounting every built-in bakes only the tools that mean something statically. See the [buildHub options](/references/hub-api#buildhub-options) reference, and [`examples/a11y-messages-playground`](https://github.com/devframes/devframe/tree/main/examples/a11y-messages-playground) for a Vite host whose `vite build` output ships the hub.
title: 'DF8007: Devframe Skipped by the Static Hub Build'
3
+
description: 'Devframe "{name}" ({id}) declares `capabilities.build: false`, so the static hub build skips it.'
4
+
---
5
+
6
+
## Message
7
+
8
+
> Devframe "`{name}`" (`{id}`) declares `capabilities.build: false`, so the static hub build skips it.
9
+
10
+
## Cause
11
+
12
+
A devframe whose value is inherently live - a terminal over PTY sessions, a proxy in front of a running process - declares `capabilities.build: false` on its definition. `buildHub` honors the declaration by leaving the devframe out of the static output entirely: its SPA is not copied, its dock is not registered (so it never appears in the baked `devframe:docks` shared state or `__index.json`), and its `setup(ctx)` never runs, so none of its RPCs join the static dump. This log line records each skip so a missing dock in a static build is traceable.
13
+
14
+
The built-in terminals, code-server, and assets devframes declare this capability.
Nothing to fix - this is the declared behavior. If the tool does have a meaningful baked form (its panels read from `static`/`snapshot` RPCs), drop `capabilities.build: false` from the definition so the static build includes it.
31
+
32
+
## Source
33
+
34
+
-[`packages/hub/src/node/install-devframe.ts`](https://github.com/devframes/devframe/blob/main/packages/hub/src/node/install-devframe.ts): `prepareDevframe()` logs this and skips the mount for a `capabilities.build: false` definition in a `mode: 'build'` hub context.
`build: true` on `viteDevframeHub` bakes the hub into `dist/__devframes/` and injects the `embedded.js` tag into the built HTML, so the production bundle ships the same docks against a `static` backend: the floating dock and standalone viewer boot from the baked RPC dump (each panel's snapshot reads, e.g. the Open Graph report of `defaultUrl`), while live-server tools (terminals, code-server) render their panels without a backing process.
29
+
`build: true` on `viteDevframeHub` bakes the hub into `dist/__devframes/` and injects the `embedded.js` tag into the built HTML, so the production bundle ships the docks against a `static` backend: the floating dock and standalone viewer boot from the baked RPC dump (each panel's snapshot reads, e.g. the Open Graph report of `defaultUrl`). Inherently-live tools (terminals, code-server, assets) declare `capabilities.build: false` and stay out of the static output entirely.
why: (p: {urlBase: string,base: string})=>`A static hub build can only write mounts under its own base: "${p.urlBase}" escapes "${p.base}".`,
39
39
fix: 'buildHub maps each mount base to a directory under its `outDir`, so every mount must live under the hub base. Drop the `basePath` override (or the `ctx.install` base) that points outside it, or move the hub `base` up so it contains the mount.',
40
40
},
41
+
DF8007: {
42
+
why: (p: {id: string,name: string})=>`Devframe "${p.name}" (${p.id}) declares \`capabilities.build: false\`, so the static hub build skips it.`,
43
+
fix: 'This is the declared behavior for a tool whose value is inherently live (a terminal, a process proxy): its dock, SPA, and RPCs stay out of the static output. Drop `capabilities.build: false` from the definition if the tool does have a meaningful baked form.',
44
+
},
41
45
DF8100: {
42
46
why: (p: {id: string})=>`Dock with id "${p.id}" is already registered`,
43
47
fix: 'Use the `force` parameter to overwrite an existing registration.',
0 commit comments