diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 6478d452..62f948ab 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -58,10 +58,15 @@ function guideGroups(prefix: string) { ], }, { - text: 'Recipes & Advanced', + text: 'Agent-Native', + items: [ + { text: 'Agent-Native', link: `${prefix}/guide/agent-native` }, + ], + }, + { + text: 'Recipes', items: [ { text: 'Standalone CLI', link: `${prefix}/guide/standalone-cli` }, - { text: 'Agent-Native (experimental)', link: `${prefix}/guide/agent-native` }, ], }, ] satisfies { text: string, items: DefaultTheme.NavItemWithLink[] }[] diff --git a/docs/adapters/cac.md b/docs/adapters/cac.md index 810f58ad..98d2e21c 100644 --- a/docs/adapters/cac.md +++ b/docs/adapters/cac.md @@ -35,7 +35,7 @@ my-devframe # dev server at http://localhost:9999/ my-devframe --port 8080 my-devframe build --out-dir dist-static my-devframe build --out-dir dist-static --base /devframe/ -my-devframe mcp # stdio MCP server (experimental) +my-devframe mcp # stdio MCP server ``` Standalone CLI serves the SPA at `/` by default. The `/__devframe/` prefix is for *hosted* adapters where devframe mounts alongside an existing app — see [Mount paths](./#mount-paths). diff --git a/docs/adapters/mcp.md b/docs/adapters/mcp.md index 29b5b73f..858ce878 100644 --- a/docs/adapters/mcp.md +++ b/docs/adapters/mcp.md @@ -4,9 +4,6 @@ outline: deep # MCP -> [!WARNING] Experimental -> The agent-native surface is experimental and may change without a major version bump. - Translates a devframe's agent host into a [Model Context Protocol](https://modelcontextprotocol.io) server so coding agents (Claude Desktop, Cursor, Zed, Claude Code) can call flagged RPCs and read exposed resources. ```ts diff --git a/docs/errors/DF0014.md b/docs/errors/DF0014.md index 294d2535..02b277eb 100644 --- a/docs/errors/DF0014.md +++ b/docs/errors/DF0014.md @@ -4,10 +4,6 @@ outline: deep # DF0014: Invalid Agent Field -::: warning Experimental -The agent-native surface is experimental and may change without a major version bump until it stabilizes. -::: - ## Message > RPC function "`{name}`" has an invalid `agent` field — `description` must be a non-empty string. diff --git a/docs/errors/DF0015.md b/docs/errors/DF0015.md index c7c4929c..8d072e95 100644 --- a/docs/errors/DF0015.md +++ b/docs/errors/DF0015.md @@ -4,10 +4,6 @@ outline: deep # DF0015: Agent Tool Already Registered -::: warning Experimental -The agent-native surface is experimental and may change without a major version bump until it stabilizes. -::: - ## Message > Agent tool "`{id}`" is already registered. diff --git a/docs/errors/DF0016.md b/docs/errors/DF0016.md index 2cdc2674..3c08abac 100644 --- a/docs/errors/DF0016.md +++ b/docs/errors/DF0016.md @@ -4,10 +4,6 @@ outline: deep # DF0016: Agent Resource Already Registered -::: warning Experimental -The agent-native surface is experimental and may change without a major version bump until it stabilizes. -::: - ## Message > Agent resource "`{id}`" is already registered. diff --git a/docs/errors/DF0017.md b/docs/errors/DF0017.md index b49ad483..97541f0b 100644 --- a/docs/errors/DF0017.md +++ b/docs/errors/DF0017.md @@ -4,10 +4,6 @@ outline: deep # DF0017: MCP Server Start Failure -::: warning Experimental -The agent-native surface is experimental and may change without a major version bump until it stabilizes. -::: - ## Message > Failed to start MCP server (`{transport}`): `{reason}` diff --git a/docs/guide/agent-native.md b/docs/guide/agent-native.md index 0e8f92af..aaeb637c 100644 --- a/docs/guide/agent-native.md +++ b/docs/guide/agent-native.md @@ -4,10 +4,6 @@ outline: deep # Agent-Native Devframe -::: warning Experimental -The agent-native surface (`agent` field on `defineRpcFunction`, `DevframeAgentHost`, and the `devframe/adapters/mcp` adapter) is experimental and may change without a major version bump until it stabilizes. -::: - Devframe can expose the same surface a browser UI consumes — RPC functions, resources, and shared state — to coding agents (Claude Desktop / Cursor / Zed / Claude Code, or any MCP-speaking client). Agent exposure is opt-in per function; functions stay private by default. ## How it works diff --git a/docs/guide/devframe-definition.md b/docs/guide/devframe-definition.md index e389d7e4..f19552d4 100644 --- a/docs/guide/devframe-definition.md +++ b/docs/guide/devframe-definition.md @@ -111,7 +111,7 @@ interface DevframeNodeContext { rpc: RpcFunctionsHost // register + broadcast + sharedState views: DevframeViewHost // static file hosting (`hostStatic`) diagnostics: DevframeDiagnosticsHost - agent: DevframeAgentHost // experimental + agent: DevframeAgentHost // expose tools + resources to coding agents services: DevframeServicesHost // typed cross-plugin service registry scope: (id) => DevframeScopedNodeContext // namespaced view (preferred) diff --git a/docs/guide/index.md b/docs/guide/index.md index 83edbf67..e101ff76 100644 --- a/docs/guide/index.md +++ b/docs/guide/index.md @@ -81,7 +81,7 @@ Run it: ```sh node ./my-devframe.js # dev server on http://localhost:9999/ node ./my-devframe.js build # self-contained static deploy in dist-static/ -node ./my-devframe.js mcp # stdio MCP server (experimental) +node ./my-devframe.js mcp # stdio MCP server ``` The CLI adapter serves the SPA at `/` by default. When the same devframe is embedded inside a host (`vite`, `embedded`), the default becomes `/.my-devframe/`. Override either side via `defineDevframe({ basePath })`. diff --git a/docs/guide/standalone-cli.md b/docs/guide/standalone-cli.md index 7404adfb..88c0bff1 100644 --- a/docs/guide/standalone-cli.md +++ b/docs/guide/standalone-cli.md @@ -80,7 +80,7 @@ my-tool --config ./my.config.mjs my-tool --port 8080 --no-open my-tool build --out-dir dist-static # self-contained static deploy my-tool build --out-dir dist-static --base /tool/ # …under a custom base -my-tool mcp # agent exposure (experimental) +my-tool mcp # agent exposure ``` ## Nuxt SPA setup diff --git a/packages/devframe/src/adapters/_shared.ts b/packages/devframe/src/adapters/_shared.ts index cbdb730c..0579a2f6 100644 --- a/packages/devframe/src/adapters/_shared.ts +++ b/packages/devframe/src/adapters/_shared.ts @@ -76,8 +76,6 @@ function resolveMcpConfig(mcp: boolean | McpRouteOptions | undefined): McpRouteO * and the client dials `:`. Without `port` the path * stays relative, resolved against `__connection.json`'s own location (the * same-server default). - * - * @experimental */ export function resolveMcpConnectionMeta( def: DevframeDefinition, diff --git a/packages/devframe/src/adapters/cac.ts b/packages/devframe/src/adapters/cac.ts index 88556099..e12af3ad 100644 --- a/packages/devframe/src/adapters/cac.ts +++ b/packages/devframe/src/adapters/cac.ts @@ -71,7 +71,7 @@ export function createCac(d: DevframeDefinition, options: CreateCacOptions = {}) // `true` default, silently enabling MCP. Declaring just `--mcp` yields the // opt-in tri-state — absent → `undefined` (falls through to `cli.mcp`), // `--mcp` → `true`, `--no-mcp` → `false` (handled by CAC's `--no-` prefix). - .option('--mcp', 'Expose an MCP server over HTTP at /__mcp (use --no-mcp to disable) [experimental]') + .option('--mcp', 'Expose an MCP server over HTTP at /__mcp (use --no-mcp to disable)') // Register typed flags from the definition ahead of `cli.configure` // so authors can still override or augment via the escape hatch. @@ -120,7 +120,7 @@ export function createCac(d: DevframeDefinition, options: CreateCacOptions = {}) } cli - .command('mcp', 'Start an MCP server exposing agent-facing tools (stdio) [experimental]') + .command('mcp', 'Start an MCP server exposing agent-facing tools (stdio)') .action(async () => { // MCP clients expect JSON-RPC on stdout — route welcome/logging // noise out of the way. Logs-SDK diagnostics land on stderr by diff --git a/packages/devframe/src/adapters/mcp/build-server.ts b/packages/devframe/src/adapters/mcp/build-server.ts index d3e0dfee..81548a2c 100644 --- a/packages/devframe/src/adapters/mcp/build-server.ts +++ b/packages/devframe/src/adapters/mcp/build-server.ts @@ -90,9 +90,6 @@ export function buildMcpServerFromContext( /** * Build an MCP server over the agent surface of a devframe definition. * Currently supports `stdio` transport only. - * - * @experimental The agent-native surface is experimental and may change - * without a major version bump until it stabilizes. */ export async function createMcpServer( definition: DevframeDefinition, diff --git a/packages/devframe/src/adapters/mcp/fetch.ts b/packages/devframe/src/adapters/mcp/fetch.ts index c6a6d9de..32a8a482 100644 --- a/packages/devframe/src/adapters/mcp/fetch.ts +++ b/packages/devframe/src/adapters/mcp/fetch.ts @@ -53,8 +53,6 @@ interface McpSession { * loopback-default DNS-rebinding protection that — unlike the WS upgrade's * `isAllowedOrigin` — also rejects `Origin`-less requests, so a route-based * endpoint isn't reachable by an arbitrary local process. - * - * @experimental */ export function createMcpFetchHandler( ctx: DevframeNodeContext, diff --git a/packages/devframe/src/adapters/mcp/http.ts b/packages/devframe/src/adapters/mcp/http.ts index 89c5e464..48d2ea12 100644 --- a/packages/devframe/src/adapters/mcp/http.ts +++ b/packages/devframe/src/adapters/mcp/http.ts @@ -23,8 +23,6 @@ export interface MountedMcpHttp { * legitimate MCP 404 (unknown session) isn't swallowed by h3's * "Response-with-404 falls through to the next handler" rule (which would * otherwise hand the request to the SPA static catch-all). - * - * @experimental */ export function mountMcpHttp( app: H3, diff --git a/packages/devframe/src/adapters/mcp/index.ts b/packages/devframe/src/adapters/mcp/index.ts index 3704ca4b..f58347d2 100644 --- a/packages/devframe/src/adapters/mcp/index.ts +++ b/packages/devframe/src/adapters/mcp/index.ts @@ -8,9 +8,6 @@ // Requires `@modelcontextprotocol/server` to be installed as a peer // dependency. Importing this entry without the SDK throws at load time // with the usual Node module-not-found error. -// -// @experimental The agent-native surface is experimental and may change -// without a major version bump until it stabilizes. export { createMcpServer, diff --git a/packages/devframe/src/cli/connect.ts b/packages/devframe/src/cli/connect.ts index bd459c3f..dd13bbaa 100644 --- a/packages/devframe/src/cli/connect.ts +++ b/packages/devframe/src/cli/connect.ts @@ -84,8 +84,6 @@ const GATEWAY_TOOLS: Tool[] = [ * the instance registry and list each one's MCP tools) and * `devframe_connect_call-tool` (invoke one tool on one instance over its * Streamable-HTTP endpoint) — and holds no domain knowledge of its own. - * - * @experimental */ export async function startConnectServer(options: ConnectServerOptions = {}): Promise { const sdk = await importSdk() diff --git a/packages/devframe/src/cli/main.ts b/packages/devframe/src/cli/main.ts index 2cf83d82..340f9947 100644 --- a/packages/devframe/src/cli/main.ts +++ b/packages/devframe/src/cli/main.ts @@ -6,8 +6,6 @@ import { keepAlive, parsePortsFlag, startConnectServer } from './connect' * The `devframe` bin — the framework's own CLI, distinct from the per-app * CLI shells authors build with `createCac(definition)`. It hosts the * app-independent commands; today that is `connect`, the MCP connector. - * - * @experimental */ export async function runDevframeCli(argv: string[] = process.argv): Promise { const cli = cac('devframe') diff --git a/packages/devframe/src/node/agent-args.ts b/packages/devframe/src/node/agent-args.ts index 44022b51..be039187 100644 --- a/packages/devframe/src/node/agent-args.ts +++ b/packages/devframe/src/node/agent-args.ts @@ -23,8 +23,6 @@ export type AgentArgsFallback = 'wrap' | 'drop' * - without schemas, `arg0`/`arg1`/… keys are collected when present * - an empty object becomes a zero-argument call * - anything else follows the {@link AgentArgsFallback} - * - * @experimental */ export function coerceAgentPositionalArgs( args: unknown, diff --git a/packages/devframe/src/node/host-agent.ts b/packages/devframe/src/node/host-agent.ts index 2c99a088..c3e6bf90 100644 --- a/packages/devframe/src/node/host-agent.ts +++ b/packages/devframe/src/node/host-agent.ts @@ -34,8 +34,6 @@ interface RegisteredResource { * devframe. Auto-discovers RPC functions with an `agent` field from * `ctx.rpc.definitions`, and accepts plugin-registered tools / * resources via `registerTool` / `registerResource`. - * - * @experimental */ export class DevframeAgentHost implements DevframeAgentHostType { public readonly events: EventEmitter = createEventEmitter() diff --git a/packages/devframe/src/node/instance-registry.ts b/packages/devframe/src/node/instance-registry.ts index 3e793337..250fcaee 100644 --- a/packages/devframe/src/node/instance-registry.ts +++ b/packages/devframe/src/node/instance-registry.ts @@ -7,9 +7,6 @@ import { diagnostics } from './diagnostics' /** * One running devframe instance, as recorded in the instance registry. * Records are self-describing JSON — additive fields are safe. - * - * @experimental The agent-native surface is experimental and may change - * without a major version bump until it stabilizes. */ export interface DevframeInstanceRecord { /** Process id of the dev server. */ @@ -37,8 +34,6 @@ export interface DevframeInstanceRecord { /** * Handle returned by {@link registerDevframeInstance}. - * - * @experimental */ export interface DevframeInstanceRegistration { /** The registry file backing this registration. */ @@ -89,8 +84,6 @@ function isRegistryDisabled(): boolean { * crash are pruned by readers whose liveness probe fails. Registration never * throws — a write failure degrades to a coded warning (`DF0045`), since a * dev server must not die over discovery metadata. - * - * @experimental */ export function registerDevframeInstance( record: DevframeInstanceRecord, @@ -130,8 +123,6 @@ export function registerDevframeInstance( /** * Read every record in the registry directory, dropping unparseable files. * Liveness is the caller's concern — see {@link probeDevframeInstance}. - * - * @experimental */ export function readDevframeInstances(options: { instancesDir?: string } = {}): DevframeInstanceRecord[] { const dir = resolveInstancesDir(options.instancesDir) @@ -248,8 +239,6 @@ async function probeDevframeInstance( * records left behind by killed processes shadow the server currently bound * there: per `(port, basePath)` only the newest record survives, older * ghosts are pruned with the dead. - * - * @experimental */ export async function listLiveDevframeInstances( options: { instancesDir?: string, timeoutMs?: number } = {}, diff --git a/packages/devframe/src/node/rpc/index.ts b/packages/devframe/src/node/rpc/index.ts index 3fce5b73..012550cf 100644 --- a/packages/devframe/src/node/rpc/index.ts +++ b/packages/devframe/src/node/rpc/index.ts @@ -7,8 +7,6 @@ import { agentReadResource } from './agent-read-resource' * Built-in agent introspection RPC functions. Registered automatically * by `createHostContext`. Not themselves agent-exposed (no `agent` * field) — they power the MCP adapter and any future agent CLI. - * - * @experimental */ export const BUILTIN_AGENT_RPC = [ agentListTools, diff --git a/packages/devframe/src/rpc/types.ts b/packages/devframe/src/rpc/types.ts index c227b6a2..8d64c31a 100644 --- a/packages/devframe/src/rpc/types.ts +++ b/packages/devframe/src/rpc/types.ts @@ -25,9 +25,6 @@ export type RpcFunctionType = 'static' | 'action' | 'event' | 'query' * the function is surfaced to agents (e.g. via the devframe MCP adapter) * as a callable tool. Functions without an `agent` field are not exposed — * default-deny. - * - * @experimental The agent-native surface is experimental and may change - * without a major version bump until it stabilizes. */ export interface RpcFunctionAgentOptions { /** @@ -260,8 +257,6 @@ export type RpcFunctionDefinition< /** * Expose this function to agents (e.g. via the MCP adapter). * When omitted, the function is not agent-exposed (default-deny). - * - * @experimental */ agent?: RpcFunctionAgentOptions /** Setup function called with context to initialize handler and dump */ @@ -308,8 +303,6 @@ export type RpcFunctionDefinition< /** * Expose this function to agents (e.g. via the MCP adapter). * When omitted, the function is not agent-exposed (default-deny). - * - * @experimental */ agent?: RpcFunctionAgentOptions /** Setup function called with context to initialize handler and dump */ diff --git a/packages/devframe/src/types/agent.ts b/packages/devframe/src/types/agent.ts index 82c55a2a..b897619c 100644 --- a/packages/devframe/src/types/agent.ts +++ b/packages/devframe/src/types/agent.ts @@ -6,9 +6,6 @@ import type { EventEmitter } from './events' * Serializable description of an agent-exposed tool. This is the shape * returned by the agent host manifest and surfaced over the wire by * the `devframe:agent:list-tools` introspection RPC. - * - * @experimental The agent-native surface is experimental and may change - * without a major version bump until it stabilizes. */ export interface AgentTool { /** Stable identifier. For RPC-backed tools, matches the RPC name. */ @@ -44,8 +41,6 @@ export interface AgentTool { /** * Input accepted by `DevframeAgentHost.registerTool()`. Handler is * stripped from the serializable `AgentTool` projection. - * - * @experimental */ export interface AgentToolInput { id: string @@ -74,8 +69,6 @@ export interface AgentToolInput { /** * Serializable description of an agent-readable resource. Resources * surface structured or textual snapshots of devframe state. - * - * @experimental */ export interface AgentResource { id: string @@ -89,8 +82,6 @@ export interface AgentResource { /** * Input accepted by `DevframeAgentHost.registerResource()`. - * - * @experimental */ export interface AgentResourceInput { id: string @@ -105,8 +96,6 @@ export interface AgentResourceInput { /** * Payload returned by `AgentResourceInput.read`. Either `text` or `json` must be set. - * - * @experimental */ export interface AgentResourceContent { text?: string @@ -117,8 +106,6 @@ export interface AgentResourceContent { /** * Unified view of the agent-exposed surface. - * - * @experimental */ export interface AgentManifest { tools: readonly AgentTool[] @@ -127,8 +114,6 @@ export interface AgentManifest { /** * Handle returned by `registerTool` / `registerResource`. - * - * @experimental */ export interface AgentHandle { unregister: () => void @@ -144,15 +129,11 @@ export interface AgentHandle { * Providers should namespace tool ids like any other tool; on an id * collision the earlier source wins (registered tools, then RPC tools, * then providers in registration order). - * - * @experimental */ export type AgentToolProvider = () => readonly AgentToolInput[] /** * Handle returned by `registerToolProvider`. - * - * @experimental */ export interface AgentToolProviderHandle extends AgentHandle { /** @@ -165,8 +146,6 @@ export interface AgentToolProviderHandle extends AgentHandle { /** * Events emitted by `DevframeAgentHost`. - * - * @experimental */ export interface DevframeAgentHostEvents { 'agent:tool:registered': (tool: AgentTool) => void @@ -185,9 +164,6 @@ export interface DevframeAgentHostEvents { * RPC functions flagged with `agent` and plugin-registered tools / * resources. Consumed by protocol adapters such as the devframe MCP * adapter. - * - * @experimental The agent-native surface is experimental and may change - * without a major version bump until it stabilizes. */ export interface DevframeAgentHost { readonly events: EventEmitter diff --git a/packages/devframe/src/types/context.ts b/packages/devframe/src/types/context.ts index c322c80a..643e8025 100644 --- a/packages/devframe/src/types/context.ts +++ b/packages/devframe/src/types/context.ts @@ -51,8 +51,6 @@ export interface DevframeNodeContext { diagnostics: DevframeDiagnosticsHost /** * Agent host — aggregates the agent-exposed surface of this devtool. - * - * @experimental */ agent: DevframeAgentHost /** diff --git a/packages/devframe/src/types/devframe.ts b/packages/devframe/src/types/devframe.ts index afd443b2..383f80f5 100644 --- a/packages/devframe/src/types/devframe.ts +++ b/packages/devframe/src/types/devframe.ts @@ -90,9 +90,6 @@ export interface DevframeSseOptions { * the MCP Streamable-HTTP transport over the same origin as the SPA, * exposing the definition's `ctx.agent` tools + shared-state resources to * external MCP clients connected to the *running* server. - * - * @experimental The agent-native surface is experimental and may change - * without a major version bump until it stabilizes. */ export interface McpRouteOptions { /** @@ -166,8 +163,6 @@ export interface DevframeCliOptions { * - {@link McpRouteOptions} — customise the route path / allowed origins. * * The `--mcp` / `--no-mcp` CLI flags override this per run. - * - * @experimental */ mcp?: boolean | McpRouteOptions /** Author's SPA dist directory (served as the devframe's UI). */ diff --git a/packages/devframe/src/utils/agent-tool-name.ts b/packages/devframe/src/utils/agent-tool-name.ts index 06f51c5c..0956c896 100644 --- a/packages/devframe/src/utils/agent-tool-name.ts +++ b/packages/devframe/src/utils/agent-tool-name.ts @@ -23,9 +23,6 @@ const MAX_TOOL_NAME_LENGTH = 128 * A plain string transform with no node dependency, so browser-side UIs * that display a tool's id (e.g. the inspect plugin's agent view) can * import it too and show the name a client actually calls. - * - * @experimental The agent-native surface is experimental and may change - * without a major version bump until it stabilizes. */ export function toAgentToolName(id: string): string { return id.replace(/[^\w-]+/g, '_').slice(0, MAX_TOOL_NAME_LENGTH) diff --git a/packages/hub/src/node/initiate.ts b/packages/hub/src/node/initiate.ts index 1a736c82..13e871e5 100644 --- a/packages/hub/src/node/initiate.ts +++ b/packages/hub/src/node/initiate.ts @@ -236,8 +236,6 @@ export interface InitHubOptions { * Expose the **aggregate** MCP endpoint at `__mcp` — one * Streamable-HTTP server over the shared context's whole tool registry * (ids are already namespaced per plugin). Disabled by default. - * - * @experimental */ mcp?: boolean | McpRouteOptions /** diff --git a/packages/hub/src/types/commands.ts b/packages/hub/src/types/commands.ts index 29e57bda..0f9a79c1 100644 --- a/packages/hub/src/types/commands.ts +++ b/packages/hub/src/types/commands.ts @@ -53,9 +53,6 @@ export interface DevframeCommandBase { * `when` clauses are evaluated client-side only and are **not** enforced for * agent calls — opt in a `when`-gated command only if running it outside its * UI context is safe. - * - * @experimental The agent-native surface is experimental and may change - * without a major version bump until it stabilizes. */ export interface DevframeCommandAgentOptions { /** @@ -93,8 +90,6 @@ export interface DevframeServerCommandInput extends DevframeCommandBase { /** * Opt this command in to the agent surface (`ctx.agent` → MCP). Requires a * `handler`. See {@link DevframeCommandAgentOptions}. - * - * @experimental */ agent?: DevframeCommandAgentOptions /** diff --git a/packages/next/src/handler.ts b/packages/next/src/handler.ts index ceb0427e..fbaef245 100644 --- a/packages/next/src/handler.ts +++ b/packages/next/src/handler.ts @@ -36,8 +36,6 @@ export interface CreateDevframeNextHandlerOptions { * SPA — and advertise it in the handler's `__connection.json`. Overrides * `def.cli?.mcp`, `undefined` falls through to it, `false` disables the * route regardless. - * - * @experimental */ mcp?: InitDevframeOptions['mcp'] /** diff --git a/packages/next/src/host.ts b/packages/next/src/host.ts index 9becb11c..82c5fe4b 100644 --- a/packages/next/src/host.ts +++ b/packages/next/src/host.ts @@ -74,8 +74,6 @@ export interface DevframeNextHost { * stays an optional peer). Advertise the path in the connection meta * (`mcp: { path }` — same origin, no port) and register the instance via * `registerDevframeInstance` so `devframe connect` can discover it. - * - * @experimental */ mountMcp: ( ctx: DevframeNodeContext, diff --git a/packages/next/src/hub.ts b/packages/next/src/hub.ts index c23929b4..18834fc9 100644 --- a/packages/next/src/hub.ts +++ b/packages/next/src/hub.ts @@ -52,8 +52,6 @@ export interface NextDevframeHubOptions { /** * Expose the aggregate MCP endpoint at `__mcp`. Default: `true` * (the Next hub's agent surface rides the same catch-all route). - * - * @experimental */ mcp?: InitHubOptions['mcp'] /** Public origin the Next app is reachable at. Default: derived from `PORT`. */ diff --git a/packages/vite/src/dev-spa.ts b/packages/vite/src/dev-spa.ts index b4e60209..fbde1671 100644 --- a/packages/vite/src/dev-spa.ts +++ b/packages/vite/src/dev-spa.ts @@ -110,8 +110,6 @@ export interface DevframeViteBridgeOptions { * `__mcp` — on the Vite app's own origin — and advertise it in the * bridge's `__connection.json`. Overrides `def.cli?.mcp`, `undefined` * falls through to it, `false` disables the route regardless. - * - * @experimental */ mcp?: boolean | McpRouteOptions } diff --git a/packages/vite/src/hub.ts b/packages/vite/src/hub.ts index f93ea7bb..3ab97a68 100644 --- a/packages/vite/src/hub.ts +++ b/packages/vite/src/hub.ts @@ -63,8 +63,6 @@ export interface ViteDevframeHubOptions { auth?: InitHubOptions['auth'] /** * Expose the aggregate MCP endpoint at `__mcp`. - * - * @experimental */ mcp?: InitHubOptions['mcp'] /** Publish this hub in the global instance registry. Default: off. */ diff --git a/skills/devframe/SKILL.md b/skills/devframe/SKILL.md index 98e418f3..d3416c5f 100644 --- a/skills/devframe/SKILL.md +++ b/skills/devframe/SKILL.md @@ -36,7 +36,7 @@ All adapter factories share the shape `createXxx(devframeDef, options?)`. | Self-contained static deploy with baked data | `createBuild(def, options?)` | `devframe/adapters/build` | | Mount into a host (Vite DevTools or any compatible host) | `createPluginFromDevframe(def, options?)` | `@vitejs/devtools-kit/node` | | Register dynamically at runtime | `createEmbedded(def, { ctx })` | `devframe/adapters/embedded` | -| Expose to coding agents (MCP) | `createMcpServer(def, options?)` | `devframe/adapters/mcp` *(experimental)* | +| Expose to coding agents (MCP) | `createMcpServer(def, options?)` | `devframe/adapters/mcp` | The same `DevframeDefinition` runs under every adapter - pick based on deployment, not on what the tool does. @@ -243,7 +243,7 @@ A [scoped context](#scoped-context-preferred) applies this prefix for you - `ctx | `ctx.rpc` | Register RPC functions, broadcast, shared state, streaming channels | | `ctx.views` | Serve static files via `hostStatic(base, distDir)` | | `ctx.diagnostics` | Structured diagnostics host (nostics) - register custom error codes | -| `ctx.agent` | Expose tools + resources to coding agents (experimental) | +| `ctx.agent` | Expose tools + resources to coding agents | | `ctx.host` | Runtime abstraction - `mountStatic`, `resolveOrigin`, `getStorageDir` | | `ctx.mode` | `'dev'` or `'build'` - gate setup work per runtime | @@ -440,7 +440,7 @@ when: 'my-inspector.ready && count >= 10' Built-in context: `clientType` (`'embedded' | 'standalone'`), `dockOpen`, `paletteOpen`, `dockSelectedId`. Plugins can add namespaced keys (`.` or `:` separators). Both the types (`WhenExpression`) and runtime (`evaluateWhen`, `resolveContextValue`) come from `devframe/utils/when`. -## Agent-native surface (experimental) +## Agent-native surface Opt an RPC function into the agent surface with an `agent` field - default-deny otherwise. Agent-exposed functions **must declare `jsonSerializable: true`** (registration throws `DF0019` otherwise): @@ -537,7 +537,7 @@ At runtime, static clients look up the argument hash in the dump; misses resolve | *(default)* | Dev server on port 9999 (or `--port`) - WebSocket RPC, `cli.distDir` served at `/.devframe/` | | `build` | Static snapshot → `./dist-static/` (configurable via `--out-dir`) | | `spa` | Deployable SPA → `./dist-spa/` | -| `mcp` | stdio MCP server (experimental) | +| `mcp` | stdio MCP server | **Bring your own CLI framework?** `createCac` (`devframe/adapters/cac`) is just a cac wrapper around three peer factories - `createDevServer` (`devframe/adapters/dev`), `createBuild` (`devframe/adapters/build`), and `createMcpServer` (`devframe/adapters/mcp`). Use them directly with commander/yargs/oclif when `createCac`'s baked-in command structure doesn't fit. `cac` is an optional peer dependency pulled in only through `devframe/adapters/cac`, so bring-your-own-CLI tools run without installing it. `createDevServer` returns a `StartedServer` handle (`origin`, `port`, `app`, `wss`, `close()`) so you can wire SIGINT / hot-reload teardown into the surrounding program. `parseCliFlags(schema, raw)` and `defineCliFlags(...)` (both from `devframe/adapters/cac`) validate an arbitrary flag bag against a `CliFlagsSchema` - the helpers are framework-agnostic.