Skip to content

Commit 4bf8fca

Browse files
authored
refactor!: remove deprecated APIs for 0.10 (#393)
1 parent 1f93481 commit 4bf8fca

91 files changed

Lines changed: 204 additions & 609 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

alias.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ export const alias = {
9696
'@devframes/plugin-terminals': p('terminals/src/node/index.ts'),
9797
'@devframes/plugin-git': p('git/src/node/index.ts'),
9898
'devframe/recipes/interactive-auth': r('devframe/src/recipes/interactive-auth.ts'),
99-
'devframe/recipes/common-rpc-functions': r('devframe/src/recipes/common-rpc-functions.ts'),
10099
'devframe/client': r('devframe/src/client/index.ts'),
101100
'devframe': r('devframe/src'),
102101
'@devframes/plugin-data-inspector/inject': p('data-inspector/src/inject/index.ts'),

docs/content/1.guide/12.in-page-channel.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Channel names are namespaced with the devframe id, like RPC ids. Function names
6666

6767
The required `functions` option and optional `events` option declare every incoming name on the endpoint's protocol side; use `{}` for an empty direction. Functions require a `handler`. Events accept an optional `handler`, and `{}` registers an event for runtime subscriptions through `on()`. Handlers are contextually typed from the shared protocol and support Standard-Schema argument validation and `jsonSerializable` metadata. `defineChannelFunction` retains the named definition shape for lower-level authoring.
6868

69-
`call()` accepts names from `functions`, including actions returning `void` or `Promise<void>`: callers can await completion and catch errors or timeouts. `emit()`, its deprecated alias `callEvent()`, and `on()` use the names declared in `events`. Function and event names have separate namespaces.
69+
`call()` accepts names from `functions`, including actions returning `void` or `Promise<void>`: callers can await completion and catch errors or timeouts. `emit()` and `on()` use the names declared in `events`. Function and event names have separate namespaces.
7070

7171
```ts
7272
import type { MyChannelProtocol } from '../shared/protocol'

docs/content/1.guide/18.hub-initiate.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Registrations are validated fail-fast: one module per type (`DF8108`), an existi
8282

8383
The hub's **single Auth** is one gate at the shared transport for every mounted devframe, built-ins, and the MCP route; one handshake (OTP, magic link, or pre-shared token) unlocks the namespace; `auth: false` disables it for localhost.
8484

85-
The aggregate MCP route mounts through the `'auto'` default once any mounted devframe (or an agent-flagged hub command) exposes agent tools; `mcp: true` forces it on, `mcp: false` off. It has its own origin gate, independent of this RPC Auth: the mounted route trusts same-machine callers, and `mcp: { authorization }` adds an identity check when the hub is reachable beyond loopback. A mounted devframe's own `mcp` setting is ignored: the hub exposes one aggregate route over them all, and warns ([`DF8005`](/errors/DF8005)) when a devframe asks for MCP while the hub set `mcp: false`.
85+
The aggregate MCP route mounts through the `'auto'` default once any mounted devframe (or an agent-flagged hub command) exposes agent tools; `mcp: true` forces it on, `mcp: false` off. It has its own origin gate, independent of this RPC Auth: the mounted route trusts same-machine callers, and `mcp: { authorization }` adds an identity check when the hub is reachable beyond loopback. The hub exposes one aggregate route over every mounted devframe's tools.
8686

8787
## Singular vs hub mounting
8888

docs/content/1.guide/6.client-assets.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export default defineDevframe({
2929

3030
devframe serves it with SPA fallback (unknown paths → `index.html`) and no-store dev caching. Build the SPA with a relative base (`vite: { base: './' }`); it reads its runtime base from `document.baseURI`.
3131

32-
The [`dev`](/adapters/dev), [`build`](/adapters/build), and [Vite](/frameworks/vite) adapters share `clientAssets`; the deprecated `cli.distDir` is a fallback when it's unset.
32+
The [`dev`](/adapters/dev), [`build`](/adapters/build), and [Vite](/frameworks/vite) adapters all read `clientAssets`.
3333

3434
## Programmatic hosting from `setup`
3535

docs/content/2.adapters/3.dev.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Returns a `StartedServer`: origin, port, h3 app, WS server, RPC group, `close()`
2727
| `host` | `def.cli?.host ?? 'localhost'` | Bind host. |
2828
| `port` | resolved via `resolveDevServerPort` | Listen port. |
2929
| `flags` | `{}` | To `setup(ctx, { flags })`. |
30-
| `distDir` | `def.clientAssets` (falls back to deprecated `def.cli?.distDir`) | SPA dist; unset = bridge mode. |
30+
| `distDir` | `def.clientAssets` | SPA dist; unset = bridge mode. |
3131
| `basePath` | `resolveBasePath(def, 'standalone')` | Mount override. |
3232
| `app` | fresh h3 app | Mount onto. |
3333
| `openBrowser` | resolves from `flags.open` / `def.cli?.open` | `false` off; string opens a path. |

docs/content/5.add-ons/1.devframes/4.a11y.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ The hub serves the bundle same-origin and a client runtime imports it into the h
4242
A host can also mount the module itself, for example a Vite host via `/@fs/`:
4343

4444
```ts
45-
import createA11yDevframe, { a11yPageScriptBundlePath } from '@devframes/plugin-a11y'
45+
import createA11yDevframe, { a11yClientScriptBundlePath } from '@devframes/plugin-a11y'
4646

4747
await ctx.install(createA11yDevframe(), {
48-
dock: { clientScript: { importFrom: `/@fs/${a11yPageScriptBundlePath}` } },
48+
dock: { clientScript: { importFrom: `/@fs/${a11yClientScriptBundlePath}` } },
4949
})
5050
```
5151

docs/content/6.errors/DF8005.md

Lines changed: 0 additions & 33 deletions
This file was deleted.

docs/content/6.errors/index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ Emitted by `@devframes/hub` while assembling and mounting the unified surface.
9797
| [DF8002](/errors/DF8002) | error | Both devframes and context Passed to initHub |
9898
| [DF8003](/errors/DF8003) | error | connectionMeta() Before Hub Instance Ready |
9999
| [DF8004](/errors/DF8004) | error | Devframe Id Is Not a Mountable URL Segment |
100-
| [DF8005](/errors/DF8005) | warning | Devframe MCP Ignored While Hub MCP Is Off |
101100

102101
## Hub: docks & mounting (DF81xx)
103102

docs/content/7.migrations/1.migration-0.10.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,21 @@ npm install @devframes/agentic
4343
```
4444

4545
Code that imported SDK types directly for devframe's MCP options no longer needs to: the full option surface is typed on `devframe/adapters/mcp` and `devframe/types` without any SDK types.
46+
47+
## Removed deprecated APIs
48+
49+
0.10 drops the symbols deprecated during the 0.9 line. Each has a drop-in replacement:
50+
51+
| Removed | Use instead |
52+
| ------- | ----------- |
53+
| `cli.mcp` on a definition | Pass `mcp` to the host (`createCac` / `--mcp`, `createDevServer`, `initDevframe`, `initHub`) |
54+
| `cli.distDir` on a definition | Top-level `clientAssets` on the definition |
55+
| `resolveClientAssets` (from `devframe`) | Read `definition.clientAssets` directly |
56+
| `createDevframeClientHost`, `DevframeClientHost`, `DevframeClientHostOptions` (`@devframes/hub/client`) | `createDevframeClientRuntime`, `DevframeClientRuntime`, `DevframeClientRuntimeOptions` |
57+
| `coerceAgentPositionalArgs`, `AgentArgsFallback` (`devframe/internal`) | `toolInputToRpcArgs` / `toolInputToCommandArgs` |
58+
| `openInEditor`, `openInFinder`, `commonRpcFunctions` (`devframe/recipes/common-rpc-functions`) | The [`@devframes/service-open`](/add-ons/services/open) wire service |
59+
| `callEvent()` on an in-page channel | `emit()` |
60+
| `a11yPageScriptBundlePath`, `a11yAgentBundlePath` (`@devframes/plugin-a11y`) | `a11yClientScriptBundlePath` |
61+
| `AGENT_DISCOVERY_FILE`, `AgentDiscovery`, `DataInspectorAgent` (`@devframes/plugin-data-inspector/inject`) | `DISCOVERY_FILE`, `InjectDiscovery`, `DataInspectorEndpoint` |
62+
63+
Dropping `cli.mcp` also removes the hub's `DF8005` warning: a hub's aggregate MCP route already covers every mounted devframe's tools, so a per-devframe MCP request no longer exists to conflict with it.

docs/content/8.references/5.browser-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ The values of `rpc.status`: [Handling connection and auth errors](/guide/client#
5050

5151
The browser-only endpoint methods of the [in-page channel](/guide/in-page-channel). `emit()` sends to the opposite endpoint; `on()` handles events arriving from that endpoint.
5252

53-
`InPageChannelProtocol` separates `functions` and `events`. Each section has optional `pageScript` and `panel` maps naming the receiving direction. Endpoint options require a complete `functions` map with handlers; `events` is optional, and when provided can include optional handlers (use `{}` to declare an event without a handler for `channel.on()`). `call()` uses function names regardless of return type, while `emit()`, `callEvent()` (deprecated), and `on()` use event names. A function returning `void` or `Promise<void>` remains an awaitable request/response call.
53+
`InPageChannelProtocol` separates `functions` and `events`. Each section has optional `pageScript` and `panel` maps naming the receiving direction. Endpoint options require a complete `functions` map with handlers; `events` is optional, and when provided can include optional handlers (use `{}` to declare an event without a handler for `channel.on()`). `call()` uses function names regardless of return type, while `emit()` and `on()` use event names. A function returning `void` or `Promise<void>` remains an awaitable request/response call.
5454

5555
| Method or property | Page-script endpoint | Panel endpoint |
5656
|--------------------|-------------|-------|

0 commit comments

Comments
 (0)