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
refactor(devframe)!: slim devframe/node to the context surface; drop isObject
Per API-surface review:
- Remove `isObject` from the public API entirely (unused internally; trivial to
inline).
- Move the server-assembly primitives `createH3DevframeHost` (+ its options) and
`startHttpAndWs` (+ `StartedServer`, options) from `devframe/node` to the
unstable `devframe/internal` surface. `devframe/node` now exposes only the
context-building API: `createHostContext`, `createStorage`, `RpcFunctionsHost`.
- `createDevServer` stays — it's the standalone-server adapter (built on
`initDevframe`, used by `createCac` and consumer CLIs), a different layer from
the `initDevframe` handler core.
The hub, plugin test harnesses, the a11y demo, storybook, and host examples now
import `createH3DevframeHost` / `startHttpAndWs` from `devframe/internal`.
Migration guide, plan, and tsnapi snapshots updated.
Co-authored-by: opencode <noreply@opencode.ai>
Copy file name to clipboardExpand all lines: docs/guide/migration-0.9.md
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -125,32 +125,34 @@ Two utility subpaths with no integration consumers are removed:
125
125
126
126
The other `devframe/utils/*` helpers — `colors`, `open`, `launch-editor`, `hash`, `nanoid`, `crypto-token`, `structured-clone`, `events`, `shared-state`, `streaming-channel`, `when`, `simple-schema`, `serve-static`, `agent-tool-name` — are unchanged.
127
127
128
-
## `devframe/node` is slimmed to the server-assembly surface
128
+
## `devframe/node` is slimmed to the context surface
129
129
130
-
`devframe/node` keeps the server-assembly API hosts actually use — `createHostContext`, `createH3DevframeHost`, `startHttpAndWs` (+ `StartedServer`), `createStorage`, and the `RpcFunctionsHost` type.
130
+
`devframe/node` keeps just the context-building API — `createHostContext` (+ `CreateHostContextOptions`), `createStorage` (+ `CreateStorageOptions`), and the `RpcFunctionsHost` type. Serve a devframe through the adapters (`createDevServer`, `createBuild`, `createCac`) or [`devframe/initiate`](../adapters/initiate); build a context to embed one with `createHostContext`.
131
131
132
-
The internal host implementations and low-level factories are no longer exported:
132
+
The internal host implementations and low-level factories are no longer exported at all:
133
133
134
134
| Removed from `devframe/node`| Notes |
135
135
|---|---|
136
136
|`DevframeDiagnosticsHost`, `DevframeServicesHostImpl`, `DevframeViewHost` (classes) | Internal host implementations. The same-named **types** remain on `devframe/types`. |
137
137
|`createRpcSharedStateServerHost`, `createRpcStreamingServerHost`| Wired internally by `createContextRpcServer`. |
138
138
|`createScopedNodeContext`, `createNodeSettings`| Internal to context assembly. |
|`toDialableHost`, `formatHostForUrl`, `isObject`| Internal helpers (`isObject` is removed entirely — inline `typeof x === 'object' && x !== null`). |
140
140
141
141
## Cross-package internals move to `devframe/internal`
142
142
143
143
The low-level primitives shared between `devframe` and its first-party integrations (`@devframes/hub`, the inspect plugin, `@vitejs/devtools`, custom hosts) now live at the new `devframe/internal` entry point, which is explicitly **unstable** (it can change in any minor release). They were previously on `devframe/node`:
A host that binds its own transport composes from `createContextRpcServer` (`devframe/internal`) plus`devframe/rpc/server`, `devframe/rpc/transports/*`, and `devframe/node/hub-internals` — the path `@devframes/hub`'s `initHub` takes. A custom host advertises itself with `registerDevframeInstance`, and a devtool enumerates running instances with `listLiveDevframeInstances`. Application code should prefer the adapters and `devframe/node`.
155
+
A host that stands up its own server composes from `devframe/internal` — `createH3DevframeHost` for the node `DevframeHost`, `startHttpAndWs` (or `createContextRpcServer` +`devframe/rpc/server` + `devframe/rpc/transports/*`) to bind a transport — plus `devframe/node`'s `createHostContext`and `devframe/node/hub-internals`. This is the path `@devframes/hub`'s `initHub` takes. A custom host advertises itself with `registerDevframeInstance`, and a devtool enumerates running instances with `listLiveDevframeInstances`. Application code should prefer the adapters and `devframe/initiate`.
154
156
155
157
## `@devframes/hub` category order lives only on `/constants`
0 commit comments