devframe 1.2.5 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/{_shared-DlRoV7v3.mjs → _shared-C06DH07o.mjs} +4 -1
  2. package/dist/{_shared-NSl4p_om.d.mts → _shared-DbO-OtUC.d.mts} +8 -2
  3. package/dist/adapters/build.d.mts +1 -1
  4. package/dist/adapters/build.mjs +3 -3
  5. package/dist/adapters/cac.d.mts +1 -1
  6. package/dist/adapters/cac.mjs +4 -7
  7. package/dist/adapters/dev.d.mts +10 -4
  8. package/dist/adapters/dev.mjs +2 -2
  9. package/dist/adapters/embedded.d.mts +1 -1
  10. package/dist/adapters/initiate.d.mts +2 -2
  11. package/dist/adapters/initiate.mjs +1 -1
  12. package/dist/adapters/mcp.d.mts +3 -3
  13. package/dist/{agentic-D61fXLzA.d.mts → agentic-D6HePbWg.d.mts} +1 -1
  14. package/dist/{browser-agent-rpc-BXhoSh1z.mjs → browser-agent-rpc-KH4HHvHf.mjs} +24 -2
  15. package/dist/cli/main.mjs +1 -1
  16. package/dist/client/index.d.mts +1 -1
  17. package/dist/client/index.mjs +2 -2
  18. package/dist/{host-agent-CJu735ch.mjs → client-agent-DuLhUF6d.mjs} +148 -2
  19. package/dist/{context-CNq7GLeT.mjs → context-BY72d2gV.mjs} +1 -1
  20. package/dist/{context-BKw9KkCR.mjs → context-CmSDJAEI.mjs} +6 -46
  21. package/dist/{context-DhycZ2lx.d.mts → context-Dko5QFWF.d.mts} +216 -93
  22. package/dist/{context-Bgvuxv1C.d.mts → context-eIUOSrKu.d.mts} +1 -1
  23. package/dist/{dev-BViAfnlw.mjs → dev-C-wQTIrV.mjs} +43 -23
  24. package/dist/{diagnostics-Cx4_VjlG.mjs → diagnostics-BJjvKfVK.mjs} +12 -0
  25. package/dist/in-page-channel/index.d.mts +1 -1
  26. package/dist/in-page-channel/index.mjs +1 -1
  27. package/dist/{index-DFPsvDGu.d.mts → index-BMj-o_sP.d.mts} +2 -2
  28. package/dist/index.d.mts +3 -2
  29. package/dist/index.mjs +2 -1
  30. package/dist/{instance-registry-DFrZdU4B.mjs → instance-registry-vlz81P9X.mjs} +1 -1
  31. package/dist/{instance-shell-DmyVIJzj.mjs → instance-shell-CBgy8YzK.mjs} +56 -15
  32. package/dist/{instance-shell-fl3ir6RC.d.mts → instance-shell-yfm1AYk8.d.mts} +2 -2
  33. package/dist/{interactive-auth-FFOGnYIC.mjs → interactive-auth-BsqLFXw8.mjs} +1 -1
  34. package/dist/internal/index.d.mts +40 -6
  35. package/dist/internal/index.mjs +8 -7
  36. package/dist/mcp-content-DN3O212x.mjs +40 -0
  37. package/dist/mcp-content-wcQxvrrW.d.mts +25 -0
  38. package/dist/node/auth.d.mts +2 -2
  39. package/dist/node/hub-internals.d.mts +2 -2
  40. package/dist/node/hub-internals.mjs +2 -2
  41. package/dist/node/index.d.mts +1 -1
  42. package/dist/node/index.mjs +2 -2
  43. package/dist/recipes/interactive-auth.d.mts +2 -2
  44. package/dist/recipes/interactive-auth.mjs +1 -1
  45. package/dist/{remote-assets-B9MeWmW6.mjs → remote-assets-DOva7l3s.mjs} +1 -1
  46. package/dist/rpc/transports/ws-bun.d.mts +1 -1
  47. package/dist/rpc/transports/ws-deno.d.mts +1 -1
  48. package/dist/{rpc-core-BcThIWzY.d.mts → rpc-core-BQ1mesqZ.d.mts} +2 -2
  49. package/dist/{rpc-core-CXgALhUi.mjs → rpc-core-oXIq2hjO.mjs} +1 -1
  50. package/dist/{shared-state-Cow3u-_m.mjs → shared-state-Cc-Jrhma.mjs} +5 -2
  51. package/dist/{storage-DPoitS2X.mjs → storage-BzAr-S6I.mjs} +1 -1
  52. package/dist/types/index.d.mts +2 -2
  53. package/dist/utils/events.d.mts +1 -1
  54. package/dist/utils/remote-assets.mjs +1 -1
  55. package/dist/utils/shared-state.d.mts +1 -1
  56. package/dist/utils/shared-state.mjs +1 -1
  57. package/dist/utils/streaming-channel.d.mts +1 -1
  58. package/package.json +8 -8
@@ -373,6 +373,187 @@ interface DevframeAuthHandler {
373
373
  buildOpenUrl?: (url: string) => string;
374
374
  }
375
375
  //#endregion
376
+ //#region src/types/mcp.d.ts
377
+ /**
378
+ * The MCP adapter surface, typed here so `devframe` (which probes for and
379
+ * lazily loads `@devframes/agentic`) and `@devframes/agentic/mcp` (which
380
+ * implements it) share one contract without a type-level dependency cycle.
381
+ * None of these shapes reference the MCP SDK: the SDK is an implementation
382
+ * detail of `@devframes/agentic`, freely swappable behind this surface.
383
+ * The h3-bound `mountMcpHttp` shapes live in `node/agentic.ts` (exported via
384
+ * `devframe/internal`) instead: `devframe/types` must stay lib-neutral, and
385
+ * h3's declarations are not.
386
+ */
387
+ interface CreateMcpServerOptions {
388
+ /**
389
+ * Transport to use. `createMcpServer` itself runs `'stdio'` (a standalone
390
+ * process with its own host context); the Streamable-HTTP transport is
391
+ * served route-based by the dev server instead; see `mountMcpHttp` and
392
+ * the `mcp` option on `createDevServer` / `createCac`'s `--mcp` flag.
393
+ */
394
+ transport?: 'stdio';
395
+ /**
396
+ * Expose shared-state keys as MCP resources.
397
+ * - `true` (default): every key the host publishes
398
+ * - `false`: none
399
+ * - `(key) => boolean`: filter
400
+ */
401
+ exposeSharedState?: boolean | ((key: string) => boolean);
402
+ /**
403
+ * Usage guidance sent as `instructions` in the MCP `initialize` (and
404
+ * `server/discover`) result. Omitted or empty sends no instructions.
405
+ */
406
+ instructions?: string;
407
+ /**
408
+ * Resource templates served through `resources/templates/list`, and read
409
+ * through `resources/read`. Omitted or empty keeps the resources unchanged.
410
+ */
411
+ resourceTemplates?: McpResourceTemplate[];
412
+ /**
413
+ * Host subscription for resource-list changes; each `notify()` sends
414
+ * `notifications/resources/list_changed`. See {@link McpResourcesChangedHook}.
415
+ */
416
+ onResourcesChanged?: McpResourcesChangedHook;
417
+ /** Override the name reported in the MCP handshake. */
418
+ serverName?: string;
419
+ /** Override the version reported in the MCP handshake. Defaults to `definition.version ?? '0.0.0'`. */
420
+ serverVersion?: string;
421
+ /** Called once the transport is connected. */
422
+ onReady?: (info: {
423
+ transport: 'stdio';
424
+ }) => void;
425
+ }
426
+ /**
427
+ * One MCP content block in a tool result. Attach blocks to a tool's return
428
+ * value with `withMcpContent` (from `devframe`) to send them in place of the
429
+ * default JSON text block. `data` is base64.
430
+ */
431
+ type McpContentBlock = {
432
+ type: 'text';
433
+ text: string;
434
+ } | {
435
+ type: 'image';
436
+ data: string;
437
+ mimeType: string;
438
+ } | {
439
+ type: 'audio';
440
+ data: string;
441
+ mimeType: string;
442
+ };
443
+ interface McpServerHandle {
444
+ stop: () => Promise<void>;
445
+ }
446
+ interface CreateMcpFetchHandlerOptions {
447
+ /** Name reported in the MCP handshake. */
448
+ serverName: string;
449
+ /** Version reported in the MCP handshake. */
450
+ serverVersion: string;
451
+ /** Expose shared-state keys as MCP resources; see {@link CreateMcpServerOptions.exposeSharedState}. */
452
+ exposeSharedState: boolean | ((key: string) => boolean);
453
+ /** Usage guidance for the handshake; see {@link CreateMcpServerOptions.instructions}. */
454
+ instructions?: string;
455
+ /** Resource templates; see {@link CreateMcpServerOptions.resourceTemplates}. */
456
+ resourceTemplates?: McpResourceTemplate[];
457
+ /** Host subscription for resource-list changes; see {@link CreateMcpServerOptions.onResourcesChanged}. */
458
+ onResourcesChanged?: McpResourcesChangedHook;
459
+ /**
460
+ * Optional identity check, layered on top of the origin gate and checked
461
+ * **after** it: a bearer token string (matched in constant time against
462
+ * `Authorization: Bearer <token>`), a `(request) => boolean` callback, or
463
+ * `false` (the default) for origin-only, trusting same-machine callers. A
464
+ * callback governs identity only and cannot relax the origin gate. See
465
+ * {@link McpAuthorization}.
466
+ */
467
+ authorization?: McpAuthorization;
468
+ /**
469
+ * Origin allow-list beyond the loopback default. `false` disables the
470
+ * origin gate entirely. Default: loopback-only.
471
+ *
472
+ * Unlike the WS transport, the MCP route does **not** allow `Origin`-less
473
+ * requests: a route-based endpoint is reachable by any local process, so a
474
+ * request must carry an `Origin` that passes the gate. Native clients
475
+ * (e.g. `devframe connect`) send their loopback origin explicitly.
476
+ */
477
+ allowedOrigins?: readonly string[] | false;
478
+ }
479
+ /** Connection facts a host knows about a request beyond the `Request` itself. */
480
+ interface McpConnectionInfo {
481
+ /**
482
+ * The connecting peer's remote address (a node socket's `remoteAddress`),
483
+ * used to prove a same-machine caller when the endpoint relies on the
484
+ * loopback origin default with no identity check. A host that can resolve a
485
+ * trustworthy peer address (the h3/node mount) supplies it; when it's
486
+ * omitted the origin gate stays the only locality signal.
487
+ */
488
+ remoteAddress?: string;
489
+ }
490
+ interface McpFetchHandler {
491
+ /**
492
+ * WHATWG-`fetch` handler for the MCP endpoint. Hand every method
493
+ * (POST/GET/DELETE) on the endpoint's path to it; routing by path is the
494
+ * host's job. Pass {@link McpConnectionInfo} when the host can resolve the
495
+ * peer address so the default trust boundary can enforce same-machine
496
+ * locality.
497
+ */
498
+ fetch: (request: Request, connection?: McpConnectionInfo) => Promise<Response>;
499
+ /** Tear down the handler (aborts in-flight exchanges, drops the change bridge). */
500
+ dispose: () => Promise<void>;
501
+ }
502
+ /** One concrete resource that an {@link McpResourceTemplate} lists in `resources/list`. */
503
+ interface McpResourceTemplateEntry {
504
+ /** The resource URI. It SHOULD match the `uriTemplate` of its template, so `resources/read` finds it. */
505
+ uri: string;
506
+ name: string;
507
+ /** Human-readable name for display. */
508
+ title?: string;
509
+ description?: string;
510
+ /** Defaults to the `mimeType` of the template. */
511
+ mimeType?: string;
512
+ }
513
+ /**
514
+ * What an {@link McpResourceTemplate} returns from `read`, sent as the
515
+ * `resources/read` result: `text` as is, or else `json` as JSON text.
516
+ */
517
+ interface McpResourceTemplateContent {
518
+ text?: string;
519
+ json?: unknown;
520
+ /** Defaults to the `mimeType` of the template, then `application/json`. */
521
+ mimeType?: string;
522
+ }
523
+ /**
524
+ * A resource template the MCP server lists in `resources/templates/list` and
525
+ * reads in `resources/read`. The `uriTemplate` uses RFC 6570 level 1 only:
526
+ * plain `{name}` expressions, with text between any two of them. Each
527
+ * expression matches a non-empty value with no `/`, and its value is
528
+ * percent-decoded.
529
+ *
530
+ * `list` and `read` get the node context of the devframe (or of the hub), so
531
+ * they can read live state such as `ctx.rpc.sharedState` or `ctx.agent`. The
532
+ * route options are resolved before `setup()` runs, so a template cannot
533
+ * capture that context in a closure.
534
+ */
535
+ interface McpResourceTemplate {
536
+ /** RFC 6570 level 1 URI template, e.g. `my-tool://file/{path}`. Anything else throws `DF0084`. */
537
+ uriTemplate: string;
538
+ name: string;
539
+ /** Human-readable name for display. */
540
+ title?: string;
541
+ description?: string;
542
+ /** MIME type of every resource the template stands for. */
543
+ mimeType?: string;
544
+ /** The concrete resources the template stands for right now. They are added to `resources/list`. */
545
+ list?: (ctx: DevframeNodeContext) => McpResourceTemplateEntry[] | Promise<McpResourceTemplateEntry[]>;
546
+ /** Read one resource: `params` holds the decoded value of each `{name}`, `uri` the requested URI. */
547
+ read: (params: Record<string, string>, uri: string, ctx: DevframeNodeContext) => McpResourceTemplateContent | Promise<McpResourceTemplateContent>;
548
+ }
549
+ /**
550
+ * A host subscription for resource-list changes. Call `notify()` each time
551
+ * the resources change; the MCP server then sends
552
+ * `notifications/resources/list_changed`. Return a function that removes the
553
+ * subscription; the MCP server calls it on teardown.
554
+ */
555
+ type McpResourcesChangedHook = (notify: () => void, ctx: DevframeNodeContext) => () => void;
556
+ //#endregion
376
557
  //#region src/types/diagnostics.d.ts
377
558
  /**
378
559
  * The shared diagnostics lookup exposed by the host. A `Proxy` that resolves
@@ -509,6 +690,13 @@ interface BrowserAgentToolManifest {
509
690
  tags?: readonly string[];
510
691
  inputSchema?: unknown;
511
692
  }
693
+ /** What a connected document reports about itself alongside its tool manifest. */
694
+ interface BrowserAgentClientInfo {
695
+ url: string;
696
+ title: string;
697
+ visible: boolean;
698
+ focused: boolean;
699
+ }
512
700
  //#endregion
513
701
  //#region src/types/rpc-augments.d.ts
514
702
  /**
@@ -573,7 +761,7 @@ interface DevframeRpcServerFunctions {
573
761
  /** Methods eligible for automatic client caching. @internal */
574
762
  'devframe:rpc:cacheable-functions': () => Promise<string[]>;
575
763
  /** Replace this connection's browser-agent tool manifest, tagged with the calling tab's stable client id. @internal */
576
- 'devframe:agent:sync-client-tools': (clientId: string, tools: BrowserAgentToolManifest[]) => Promise<void>;
764
+ 'devframe:agent:sync-client-tools': (clientId: string, tools: BrowserAgentToolManifest[], info: BrowserAgentClientInfo) => Promise<void>;
577
765
  /**
578
766
  * Authenticate a connection with a previously-issued bearer token; resolves
579
767
  * whether the connection is now trusted. The interactive handler is provided
@@ -809,8 +997,8 @@ interface DevframeSettingsStore<T extends Record<string, any> = Record<string, a
809
997
  /**
810
998
  * The two settings scopes available on a scoped context.
811
999
  *
812
- * - `project`: per-workspace state, persisted under the host's
813
- * `workspace` storage dir. Project-local settings.
1000
+ * - `project`: per-checkout state, persisted under the
1001
+ * `project` storage dir. Project-local settings.
814
1002
  * - `global`: per-user state, persisted under the host's `global`
815
1003
  * storage dir. Machine-wide preferences.
816
1004
  */
@@ -1289,6 +1477,30 @@ interface McpRouteOptions {
1289
1477
  * The states themselves stay available to the UI over RPC.
1290
1478
  */
1291
1479
  exposeSharedState?: boolean | ((key: string) => boolean);
1480
+ /**
1481
+ * Usage guidance for the route, sent as `instructions` in the MCP
1482
+ * `initialize` (and `server/discover`) result. An MCP client can add it to
1483
+ * the coding agent's context, for example to say which tool to call first.
1484
+ * Omitted or empty sends no instructions.
1485
+ */
1486
+ instructions?: string;
1487
+ /**
1488
+ * Resource templates the route serves through MCP
1489
+ * `resources/templates/list`. `resources/read` tries them after the
1490
+ * registered resources and the shared-state resources (a
1491
+ * `devframe://resource/` or `devframe://state/` URI never reaches them);
1492
+ * the first template whose `uriTemplate` matches the URI reads it. `resources/list` adds the
1493
+ * entries each template's `list` returns. Omitted or empty keeps the
1494
+ * resources unchanged.
1495
+ */
1496
+ resourceTemplates?: McpResourceTemplate[];
1497
+ /**
1498
+ * Host subscription for resource-list changes. Call `notify()` each time
1499
+ * the resources change (for example, the entries of a resource template);
1500
+ * the route then sends `notifications/resources/list_changed`. Return a
1501
+ * function that removes the subscription; the route calls it on teardown.
1502
+ */
1503
+ onResourcesChanged?: McpResourcesChangedHook;
1292
1504
  }
1293
1505
  interface DevframeCliOptions {
1294
1506
  /** Binary name; default: the devframe's `id`. */
@@ -1590,95 +1802,6 @@ type DevframeSnapshotRpcEntry = string | {
1590
1802
  inputs: DevframeSnapshotRpcInputs;
1591
1803
  };
1592
1804
  //#endregion
1593
- //#region src/types/mcp.d.ts
1594
- /**
1595
- * The MCP adapter surface, typed here so `devframe` (which probes for and
1596
- * lazily loads `@devframes/agentic`) and `@devframes/agentic/mcp` (which
1597
- * implements it) share one contract without a type-level dependency cycle.
1598
- * None of these shapes reference the MCP SDK: the SDK is an implementation
1599
- * detail of `@devframes/agentic`, freely swappable behind this surface.
1600
- * The h3-bound `mountMcpHttp` shapes live in `node/agentic.ts` (exported via
1601
- * `devframe/internal`) instead: `devframe/types` must stay lib-neutral, and
1602
- * h3's declarations are not.
1603
- */
1604
- interface CreateMcpServerOptions {
1605
- /**
1606
- * Transport to use. `createMcpServer` itself runs `'stdio'` (a standalone
1607
- * process with its own host context); the Streamable-HTTP transport is
1608
- * served route-based by the dev server instead; see `mountMcpHttp` and
1609
- * the `mcp` option on `createDevServer` / `createCac`'s `--mcp` flag.
1610
- */
1611
- transport?: 'stdio';
1612
- /**
1613
- * Expose shared-state keys as MCP resources.
1614
- * - `true` (default): every key the host publishes
1615
- * - `false`: none
1616
- * - `(key) => boolean`: filter
1617
- */
1618
- exposeSharedState?: boolean | ((key: string) => boolean);
1619
- /** Override the name reported in the MCP handshake. */
1620
- serverName?: string;
1621
- /** Override the version reported in the MCP handshake. Defaults to `definition.version ?? '0.0.0'`. */
1622
- serverVersion?: string;
1623
- /** Called once the transport is connected. */
1624
- onReady?: (info: {
1625
- transport: 'stdio';
1626
- }) => void;
1627
- }
1628
- interface McpServerHandle {
1629
- stop: () => Promise<void>;
1630
- }
1631
- interface CreateMcpFetchHandlerOptions {
1632
- /** Name reported in the MCP handshake. */
1633
- serverName: string;
1634
- /** Version reported in the MCP handshake. */
1635
- serverVersion: string;
1636
- /** Expose shared-state keys as MCP resources; see {@link CreateMcpServerOptions.exposeSharedState}. */
1637
- exposeSharedState: boolean | ((key: string) => boolean);
1638
- /**
1639
- * Optional identity check, layered on top of the origin gate and checked
1640
- * **after** it: a bearer token string (matched in constant time against
1641
- * `Authorization: Bearer <token>`), a `(request) => boolean` callback, or
1642
- * `false` (the default) for origin-only, trusting same-machine callers. A
1643
- * callback governs identity only and cannot relax the origin gate. See
1644
- * {@link McpAuthorization}.
1645
- */
1646
- authorization?: McpAuthorization;
1647
- /**
1648
- * Origin allow-list beyond the loopback default. `false` disables the
1649
- * origin gate entirely. Default: loopback-only.
1650
- *
1651
- * Unlike the WS transport, the MCP route does **not** allow `Origin`-less
1652
- * requests: a route-based endpoint is reachable by any local process, so a
1653
- * request must carry an `Origin` that passes the gate. Native clients
1654
- * (e.g. `devframe connect`) send their loopback origin explicitly.
1655
- */
1656
- allowedOrigins?: readonly string[] | false;
1657
- }
1658
- /** Connection facts a host knows about a request beyond the `Request` itself. */
1659
- interface McpConnectionInfo {
1660
- /**
1661
- * The connecting peer's remote address (a node socket's `remoteAddress`),
1662
- * used to prove a same-machine caller when the endpoint relies on the
1663
- * loopback origin default with no identity check. A host that can resolve a
1664
- * trustworthy peer address (the h3/node mount) supplies it; when it's
1665
- * omitted the origin gate stays the only locality signal.
1666
- */
1667
- remoteAddress?: string;
1668
- }
1669
- interface McpFetchHandler {
1670
- /**
1671
- * WHATWG-`fetch` handler for the MCP endpoint. Hand every method
1672
- * (POST/GET/DELETE) on the endpoint's path to it; routing by path is the
1673
- * host's job. Pass {@link McpConnectionInfo} when the host can resolve the
1674
- * peer address so the default trust boundary can enforce same-machine
1675
- * locality.
1676
- */
1677
- fetch: (request: Request, connection?: McpConnectionInfo) => Promise<Response>;
1678
- /** Tear down the handler (aborts in-flight exchanges, drops the change bridge). */
1679
- dispose: () => Promise<void>;
1680
- }
1681
- //#endregion
1682
1805
  //#region src/utils/shared-state.d.ts
1683
1806
  type ImmutablePrimitive = undefined | null | boolean | string | number | Function;
1684
1807
  type Immutable<T> = T extends ImmutablePrimitive ? T : T extends Array<infer U> ? ImmutableArray<U> : T extends Map<infer K, infer V> ? ImmutableMap<K, V> : T extends Set<infer M> ? ImmutableSet<M> : ImmutableObject<T>;
@@ -2280,4 +2403,4 @@ interface ConnectionMeta {
2280
2403
  */
2281
2404
  interface DevframeConnectionConfigsRegistry {}
2282
2405
  //#endregion
2283
- export { DevframeServiceDefinition as $, SharedStateEvents as A, DevframeAuthHandler as At, DevframeDefinition as B, AgentTool as Bt, createStreamSink as C, DevframeRpcClientFunctions as Ct, ImmutableObject as D, DevframeStorageScope as Dt, ImmutableMap as E, DevframeHost as Et, CreateMcpServerOptions as F, AgentHandle as Ft, DevframeSetupInfo as G, DevframeAgentHostEvents as Gt, DevframeDockDefaults as H, AgentToolProvider as Ht, McpConnectionInfo as I, AgentManifest as It, DevframeSseOptions as J, EventsMap as Jt, DevframeSnapshotRpcEntry as K, EventEmitter as Kt, McpFetchHandler as L, AgentResource as Lt, SharedStatePatch as M, InferCliFlags as Mt, createSharedState as N, defineCliFlags as Nt, ImmutableSet as O, DevframeDiagnosticsHost as Ot, CreateMcpFetchHandlerOptions as P, parseCliFlags as Pt, McpSetting as Q, McpServerHandle as R, AgentResourceContent as Rt, createStreamReader as S, DevframeViewHost as St, ImmutableArray as T, DevframeRpcSharedStates as Tt, DevframeDuplicationStrategy as U, AgentToolProviderHandle as Ut, DevframeDeploymentKind as V, AgentToolInput as Vt, DevframeRpcOptions as W, DevframeAgentHost as Wt, McpAuthorization as X, DevframeWsOptions as Y, McpRouteOptions as Z, CreateStreamSinkOptions as _, ScopedClientFunctions as _t, DevframeConnectionConfigsRegistry as a, DevframeServiceScopeOf as at, StreamSink as b, ScopedSharedStates as bt, RpcBroadcastOptions as c, DevframeServicesScopeRegistry as ct, RpcSharedStateHost as d, DevframeScopedNodeRpc as dt, DevframeServiceDescriptor as et, RpcStreamingChannel as f, DevframeScopedStreamingHost as ft, CreateStreamReaderOptions as g, ScopedBroadcastOptions as gt, BufferedChunk as h, DevframeSettingsStore as ht, DevframeCapabilities as i, DevframeServiceOf as it, SharedStateOptions as j, CliFlagsSchema as jt, SharedState as k, DevframeDiagnosticsLogger as kt, RpcFunctionsHost as l, DevframeServicesState as lt, RpcStreamingHost as m, DevframeSettingsRegistry as mt, ConnectionMetaSse as n, DevframeServiceInput as nt, DevframeNodeContext as o, DevframeServicesHost as ot, RpcStreamingChannelOptions as p, DevframeSettings as pt, DevframeSnapshotRpcInputs as q, EventUnsubscribe as qt, ConnectionMetaWebsocket as r, DevframeServiceMeta as rt, DevframeNodeRpcSession as s, DevframeServicesRegistry as st, ConnectionMeta as t, DevframeServiceId as tt, RpcSharedStateGetOptions as u, DevframeScopedNodeContext as ut, StreamErrorPayload as v, ScopedRpcFn as vt, Immutable as w, DevframeRpcServerFunctions as wt, StreamSinkEvents as x, SettingsForNamespace as xt, StreamReader as y, ScopedServerFunctions as yt, DevframeCliOptions as z, AgentResourceInput as zt };
2406
+ export { DevframeServiceOf as $, EventUnsubscribe as $t, SharedStateEvents as A, McpFetchHandler as At, DevframeSetupInfo as B, parseCliFlags as Bt, createStreamSink as C, DevframeStorageScope as Ct, ImmutableObject as D, CreateMcpServerOptions as Dt, ImmutableMap as E, CreateMcpFetchHandlerOptions as Et, DevframeDefinition as F, McpServerHandle as Ft, McpAuthorization as G, AgentResourceInput as Gt, DevframeSnapshotRpcInputs as H, AgentManifest as Ht, DevframeDeploymentKind as I, DevframeAuthHandler as It, DevframeServiceDefinition as J, AgentToolProvider as Jt, McpRouteOptions as K, AgentTool as Kt, DevframeDockDefaults as L, CliFlagsSchema as Lt, SharedStatePatch as M, McpResourceTemplateContent as Mt, createSharedState as N, McpResourceTemplateEntry as Nt, ImmutableSet as O, McpConnectionInfo as Ot, DevframeCliOptions as P, McpResourcesChangedHook as Pt, DevframeServiceMeta as Q, EventEmitter as Qt, DevframeDuplicationStrategy as R, InferCliFlags as Rt, createStreamReader as S, DevframeHost as St, ImmutableArray as T, DevframeDiagnosticsLogger as Tt, DevframeSseOptions as U, AgentResource as Ut, DevframeSnapshotRpcEntry as V, AgentHandle as Vt, DevframeWsOptions as W, AgentResourceContent as Wt, DevframeServiceId as X, DevframeAgentHost as Xt, DevframeServiceDescriptor as Y, AgentToolProviderHandle as Yt, DevframeServiceInput as Z, DevframeAgentHostEvents as Zt, CreateStreamSinkOptions as _, DevframeViewHost as _t, DevframeConnectionConfigsRegistry as a, DevframeScopedNodeContext as at, StreamSink as b, DevframeRpcSharedStates as bt, RpcBroadcastOptions as c, DevframeSettings as ct, RpcSharedStateHost as d, ScopedBroadcastOptions as dt, EventsMap as en, DevframeServiceScopeOf as et, RpcStreamingChannel as f, ScopedClientFunctions as ft, CreateStreamReaderOptions as g, SettingsForNamespace as gt, BufferedChunk as h, ScopedSharedStates as ht, DevframeCapabilities as i, DevframeServicesState as it, SharedStateOptions as j, McpResourceTemplate as jt, SharedState as k, McpContentBlock as kt, RpcFunctionsHost as l, DevframeSettingsRegistry as lt, RpcStreamingHost as m, ScopedServerFunctions as mt, ConnectionMetaSse as n, DevframeServicesRegistry as nt, DevframeNodeContext as o, DevframeScopedNodeRpc as ot, RpcStreamingChannelOptions as p, ScopedRpcFn as pt, McpSetting as q, AgentToolInput as qt, ConnectionMetaWebsocket as r, DevframeServicesScopeRegistry as rt, DevframeNodeRpcSession as s, DevframeScopedStreamingHost as st, ConnectionMeta as t, DevframeServicesHost as tt, RpcSharedStateGetOptions as u, DevframeSettingsStore as ut, StreamErrorPayload as v, DevframeRpcClientFunctions as vt, Immutable as w, DevframeDiagnosticsHost as wt, StreamSinkEvents as x, BrowserAgentClientInfo as xt, StreamReader as y, DevframeRpcServerFunctions as yt, DevframeRpcOptions as z, defineCliFlags as zt };
@@ -1,4 +1,4 @@
1
- import { k as SharedState, o as DevframeNodeContext } from "./context-DhycZ2lx.mjs";
1
+ import { k as SharedState, o as DevframeNodeContext } from "./context-Dko5QFWF.mjs";
2
2
  //#region src/node/hub-internals/context.d.ts
3
3
  interface InternalAnonymousAuthStorage {
4
4
  trusted: Record<string, {
@@ -1,10 +1,10 @@
1
1
  import { DEVFRAME_CONNECTION_META_FILENAME } from "./constants.mjs";
2
- import { t as diagnostics } from "./diagnostics-Cx4_VjlG.mjs";
3
- import { t as createHostContext } from "./context-BKw9KkCR.mjs";
4
- import { t as resolveStaticAssetsSource } from "./remote-assets-B9MeWmW6.mjs";
5
- import { a as resolveMcpConfig, c as joinURL, d as withoutLeadingSlash, i as resolveDevServerPort, l as withBase, n as normalizeBasePath, r as resolveBasePath, s as importAgenticMcp, t as loadAutoMcpAdapter } from "./_shared-DlRoV7v3.mjs";
2
+ import { t as diagnostics } from "./diagnostics-BJjvKfVK.mjs";
3
+ import { t as createHostContext } from "./context-CmSDJAEI.mjs";
4
+ import { t as resolveStaticAssetsSource } from "./remote-assets-DOva7l3s.mjs";
5
+ import { a as resolveMcpConfig, c as joinURL, d as withoutLeadingSlash, i as resolveDevServerPort, l as withBase, n as normalizeBasePath, r as resolveBasePath, s as importAgenticMcp, t as loadAutoMcpAdapter } from "./_shared-C06DH07o.mjs";
6
6
  import { t as createH3DevframeHost } from "./host-h3-BROI6SQ4.mjs";
7
- import { i as normalizeHttpServerUrl, n as resolveInstanceRegister, t as createInstanceShell } from "./instance-shell-DmyVIJzj.mjs";
7
+ import { a as isAddressInUse, i as normalizeHttpServerUrl, n as resolveInstanceRegister, o as listenWithLoopbackTwin, t as createInstanceShell } from "./instance-shell-CBgy8YzK.mjs";
8
8
  import { open } from "./utils/open.mjs";
9
9
  import { mountStaticHandler } from "./utils/serve-static.mjs";
10
10
  import { resolve } from "pathe";
@@ -140,6 +140,9 @@ async function mountMcpRoute(app, context, def, base, setting) {
140
140
  serverName: `${def.id} (devframe)`,
141
141
  serverVersion: def.version ?? "0.0.0",
142
142
  exposeSharedState: config.exposeSharedState ?? true,
143
+ instructions: config.instructions,
144
+ resourceTemplates: config.resourceTemplates,
145
+ onResourcesChanged: config.onResourcesChanged,
143
146
  authorization: config.authorization,
144
147
  allowedOrigins: config.allowedOrigins
145
148
  });
@@ -171,28 +174,11 @@ async function mountMcpRoute(app, context, def, base, setting) {
171
174
  async function createDevServer(def, options = {}) {
172
175
  if (def.capabilities?.dev === false && !options.force) throw diagnostics.DF0058({ id: def.id });
173
176
  const host = options.host ?? def.cli?.host ?? "localhost";
174
- const requestedPort = options.port ?? await resolveDevServerPort(def, { host });
175
177
  const flags = options.flags ?? {};
176
178
  const basePath = options.basePath ? normalizeBasePath(options.basePath) : resolveBasePath(def, "standalone");
177
179
  const app = options.app ?? new H3();
178
180
  const server = createServer(toNodeHandler(app));
179
- try {
180
- await new Promise((resolveListen, rejectListen) => {
181
- const onError = (error) => rejectListen(error);
182
- server.once("error", onError);
183
- server.listen(requestedPort, host, () => {
184
- server.removeListener("error", onError);
185
- resolveListen();
186
- });
187
- });
188
- } catch (error) {
189
- throw diagnostics.DF0052({
190
- host,
191
- port: requestedPort,
192
- reason: error instanceof Error ? error.message : String(error),
193
- cause: error
194
- });
195
- }
181
+ const { requestedPort, closeLoopbackTwin } = await listenDevServer(server, def, host, options);
196
182
  const address = server.address();
197
183
  const port = typeof address === "object" && address ? address.port : requestedPort;
198
184
  const origin = normalizeHttpServerUrl(host, port);
@@ -230,6 +216,7 @@ async function createDevServer(def, options = {}) {
230
216
  try {
231
217
  await devframe.ready;
232
218
  } catch (error) {
219
+ await closeLoopbackTwin();
233
220
  await new Promise((resolveClose) => server.close(() => resolveClose()));
234
221
  throw error;
235
222
  }
@@ -250,10 +237,43 @@ async function createDevServer(def, options = {}) {
250
237
  connectionMeta: transport.connectionMeta,
251
238
  async close() {
252
239
  await devframe.close();
240
+ await closeLoopbackTwin();
253
241
  await new Promise((resolveClose) => server.close(() => resolveClose()));
254
242
  }
255
243
  };
256
244
  }
245
+ /**
246
+ * Bind the dev server. `getPort` probes only `host`, so it can call a port
247
+ * free while another process holds it on the other loopback address of
248
+ * `localhost`. The twin bind catches that, and a port that was not pinned
249
+ * moves to the next free one.
250
+ */
251
+ async function listenDevServer(server, def, host, options) {
252
+ let requestedPort = options.port ?? await resolveDevServerPort(def, {
253
+ host,
254
+ defaultPort: options.defaultPort
255
+ });
256
+ for (let attempt = 1;; attempt++) try {
257
+ return {
258
+ requestedPort,
259
+ closeLoopbackTwin: await listenWithLoopbackTwin(server, requestedPort, host)
260
+ };
261
+ } catch (error) {
262
+ if (options.port == null && attempt < 3 && isAddressInUse(error)) {
263
+ requestedPort = await resolveDevServerPort(def, {
264
+ host,
265
+ defaultPort: requestedPort + 1
266
+ });
267
+ continue;
268
+ }
269
+ throw diagnostics.DF0052({
270
+ host,
271
+ port: requestedPort,
272
+ reason: error instanceof Error ? error.message : String(error),
273
+ cause: error
274
+ });
275
+ }
276
+ }
257
277
  async function maybeOpenBrowser(def, flags, origin, override, authHandler) {
258
278
  const flagsOpen = flags.open;
259
279
  const cliOpen = def.cli?.open;
@@ -182,6 +182,18 @@ const diagnostics = defineDiagnostics({
182
182
  DF0079: {
183
183
  why: (p) => `The \`mcp\` option is enabled, but the optional peer "@devframes/agentic" could not be loaded: ${p.reason}`,
184
184
  fix: "Install `@devframes/agentic` next to devframe (the MCP adapter and the MCP SDK live there), or remove the explicit `mcp` setting."
185
+ },
186
+ DF0081: {
187
+ why: (p) => `Tool "${p.name}" returned invalid MCP content blocks: ${p.reason}`,
188
+ fix: "Pass `withMcpContent` a non-empty array of `{ type: 'text', text }`, `{ type: 'image', data, mimeType }` or `{ type: 'audio', data, mimeType }` blocks, with string fields and base64 `data`."
189
+ },
190
+ DF0082: {
191
+ why: (p) => `Tool "${p.tool}" was addressed to client "${p.clientId}", but no connected browser tab has that id and the tool.${p.live.length ? ` Connected clients: ${p.live.join(", ")}.` : " No browser tab is connected."}`,
192
+ fix: "Re-list the connected clients (`devframe:agent:list-clients`) and retry with a live `client_id`, or omit `client_id` to target the most recently focused tab."
193
+ },
194
+ DF0084: {
195
+ why: (p) => `MCP resource template "${p.name}" has an invalid \`uriTemplate\` "${p.uriTemplate}": ${p.reason}`,
196
+ fix: "Use RFC 6570 level 1 only: plain `{name}` expressions made of letters, digits, `_` and `.`, with no operator (`+`, `#`, `/`, `?`, …), modifier (`:n`, `*`) or list of names, and no `{` or `}` outside an expression."
185
197
  }
186
198
  }
187
199
  });
@@ -1,5 +1,5 @@
1
1
  import { D as InferArgsType, E as Thenable, O as InferReturnType, T as RpcReturnSchema, m as RpcFunctionAgentOptions, n as RpcArgsSchema } from "../types-BmDbfHCx.mjs";
2
- import { Kt as EventEmitter, k as SharedState } from "../context-DhycZ2lx.mjs";
2
+ import { Qt as EventEmitter, k as SharedState } from "../context-Dko5QFWF.mjs";
3
3
  //#region src/in-page-channel/types.d.ts
4
4
  /**
5
5
  * The shared contract of one in-page channel, declared once (usually in a
@@ -1,6 +1,6 @@
1
1
  import { a as defineDiagnostics, i as createBirpc, n as argsToJsonSchema, o as DEVFRAME_EVENTS, r as resolveAgentSafety, t as toolInputToRpcArgs } from "../tool-input-CES3Pc4y.mjs";
2
2
  import { createEventEmitter } from "../utils/events.mjs";
3
- import { t as createSharedState } from "../shared-state-Cow3u-_m.mjs";
3
+ import { t as createSharedState } from "../shared-state-Cc-Jrhma.mjs";
4
4
  import { nanoid } from "../utils/nanoid.mjs";
5
5
  import { r as registerBrowserAgentTool } from "../browser-agent-Pu-FLk6I.mjs";
6
6
  //#region src/in-page-channel/diagnostics.ts
@@ -1,5 +1,5 @@
1
- import { k as SharedState, o as DevframeNodeContext, s as DevframeNodeRpcSession } from "./context-DhycZ2lx.mjs";
2
- import { n as InternalAnonymousAuthStorage } from "./context-Bgvuxv1C.mjs";
1
+ import { k as SharedState, o as DevframeNodeContext, s as DevframeNodeRpcSession } from "./context-Dko5QFWF.mjs";
2
+ import { n as InternalAnonymousAuthStorage } from "./context-eIUOSrKu.mjs";
3
3
  //#region src/node/auth/revoke.d.ts
4
4
  /**
5
5
  * Flip `isTrusted` to false on any live WS clients connected with `token`
package/dist/index.d.mts CHANGED
@@ -1,8 +1,9 @@
1
1
  import { C as RpcFunctionType, T as RpcReturnSchema, h as RpcFunctionDefinition, m as RpcFunctionAgentOptions, n as RpcArgsSchema } from "./types-BmDbfHCx.mjs";
2
- import { $ as DevframeServiceDefinition, B as DevframeDefinition, Bt as AgentTool, Ct as DevframeRpcClientFunctions, Dt as DevframeStorageScope, Et as DevframeHost, F as CreateMcpServerOptions, Ft as AgentHandle, G as DevframeSetupInfo, Gt as DevframeAgentHostEvents, H as DevframeDockDefaults, Ht as AgentToolProvider, I as McpConnectionInfo, It as AgentManifest, J as DevframeSseOptions, Jt as EventsMap, K as DevframeSnapshotRpcEntry, Kt as EventEmitter, L as McpFetchHandler, Lt as AgentResource, Ot as DevframeDiagnosticsHost, P as CreateMcpFetchHandlerOptions, Q as McpSetting, R as McpServerHandle, Rt as AgentResourceContent, St as DevframeViewHost, Tt as DevframeRpcSharedStates, U as DevframeDuplicationStrategy, Ut as AgentToolProviderHandle, V as DevframeDeploymentKind, Vt as AgentToolInput, W as DevframeRpcOptions, Wt as DevframeAgentHost, X as McpAuthorization, Y as DevframeWsOptions, Z as McpRouteOptions, _t as ScopedClientFunctions, a as DevframeConnectionConfigsRegistry, at as DevframeServiceScopeOf, bt as ScopedSharedStates, c as RpcBroadcastOptions, ct as DevframeServicesScopeRegistry, d as RpcSharedStateHost, dt as DevframeScopedNodeRpc, et as DevframeServiceDescriptor, f as RpcStreamingChannel, ft as DevframeScopedStreamingHost, gt as ScopedBroadcastOptions, ht as DevframeSettingsStore, i as DevframeCapabilities, it as DevframeServiceOf, kt as DevframeDiagnosticsLogger, l as RpcFunctionsHost, lt as DevframeServicesState, m as RpcStreamingHost, mt as DevframeSettingsRegistry, n as ConnectionMetaSse, nt as DevframeServiceInput, o as DevframeNodeContext, ot as DevframeServicesHost, p as RpcStreamingChannelOptions, pt as DevframeSettings, q as DevframeSnapshotRpcInputs, qt as EventUnsubscribe, r as ConnectionMetaWebsocket, rt as DevframeServiceMeta, s as DevframeNodeRpcSession, st as DevframeServicesRegistry, t as ConnectionMeta, tt as DevframeServiceId, u as RpcSharedStateGetOptions, ut as DevframeScopedNodeContext, vt as ScopedRpcFn, wt as DevframeRpcServerFunctions, xt as SettingsForNamespace, yt as ScopedServerFunctions, z as DevframeCliOptions, zt as AgentResourceInput } from "./context-DhycZ2lx.mjs";
2
+ import { $ as DevframeServiceOf, $t as EventUnsubscribe, At as McpFetchHandler, B as DevframeSetupInfo, Ct as DevframeStorageScope, Dt as CreateMcpServerOptions, Et as CreateMcpFetchHandlerOptions, F as DevframeDefinition, Ft as McpServerHandle, G as McpAuthorization, Gt as AgentResourceInput, H as DevframeSnapshotRpcInputs, Ht as AgentManifest, I as DevframeDeploymentKind, J as DevframeServiceDefinition, Jt as AgentToolProvider, K as McpRouteOptions, Kt as AgentTool, L as DevframeDockDefaults, Mt as McpResourceTemplateContent, Nt as McpResourceTemplateEntry, Ot as McpConnectionInfo, P as DevframeCliOptions, Pt as McpResourcesChangedHook, Q as DevframeServiceMeta, Qt as EventEmitter, R as DevframeDuplicationStrategy, St as DevframeHost, Tt as DevframeDiagnosticsLogger, U as DevframeSseOptions, Ut as AgentResource, V as DevframeSnapshotRpcEntry, Vt as AgentHandle, W as DevframeWsOptions, Wt as AgentResourceContent, X as DevframeServiceId, Xt as DevframeAgentHost, Y as DevframeServiceDescriptor, Yt as AgentToolProviderHandle, Z as DevframeServiceInput, Zt as DevframeAgentHostEvents, _t as DevframeViewHost, a as DevframeConnectionConfigsRegistry, at as DevframeScopedNodeContext, bt as DevframeRpcSharedStates, c as RpcBroadcastOptions, ct as DevframeSettings, d as RpcSharedStateHost, dt as ScopedBroadcastOptions, en as EventsMap, et as DevframeServiceScopeOf, f as RpcStreamingChannel, ft as ScopedClientFunctions, gt as SettingsForNamespace, ht as ScopedSharedStates, i as DevframeCapabilities, it as DevframeServicesState, jt as McpResourceTemplate, kt as McpContentBlock, l as RpcFunctionsHost, lt as DevframeSettingsRegistry, m as RpcStreamingHost, mt as ScopedServerFunctions, n as ConnectionMetaSse, nt as DevframeServicesRegistry, o as DevframeNodeContext, ot as DevframeScopedNodeRpc, p as RpcStreamingChannelOptions, pt as ScopedRpcFn, q as McpSetting, qt as AgentToolInput, r as ConnectionMetaWebsocket, rt as DevframeServicesScopeRegistry, s as DevframeNodeRpcSession, st as DevframeScopedStreamingHost, t as ConnectionMeta, tt as DevframeServicesHost, u as RpcSharedStateGetOptions, ut as DevframeSettingsStore, vt as DevframeRpcClientFunctions, wt as DevframeDiagnosticsHost, yt as DevframeRpcServerFunctions, z as DevframeRpcOptions } from "./context-Dko5QFWF.mjs";
3
3
  import { a as DevframeWsPeer, i as DevframeRpcTransportKind, n as DevframeRpcConnection, r as DevframeRpcConnectionRequest, t as DevframeNodeRpcSessionMeta } from "./session-r6PDixP6.mjs";
4
4
  import { a as RemoteAssetsStore, i as RemoteAssetsProviderCustom, n as RemoteAssetsErrorMessage, o as StaticAssetsSource, r as RemoteAssetsProvider, t as RemoteAssets } from "./remote-assets-eBvSKZMS.mjs";
5
5
  import { i as DevframeDefineDiagnosticsOptions } from "./nostics-DWvukRwa.mjs";
6
+ import { n as withMcpContent } from "./mcp-content-wcQxvrrW.mjs";
6
7
  //#region src/define.d.ts
7
8
  export declare const defineRpcFunction: <NAME extends string, TYPE extends RpcFunctionType, ARGS extends any[], RETURN = void, const AS extends RpcArgsSchema | undefined = undefined, const RS extends RpcReturnSchema | undefined = undefined>(definition: RpcFunctionDefinition<NAME, TYPE, ARGS, RETURN, AS, RS, DevframeNodeContext>) => RpcFunctionDefinition<NAME, TYPE, ARGS, RETURN, AS, RS, DevframeNodeContext>;
8
9
  /**
@@ -11,4 +12,4 @@ export declare const defineRpcFunction: <NAME extends string, TYPE extends RpcFu
11
12
  */
12
13
  export declare function defineDevframe(d: DevframeDefinition): DevframeDefinition;
13
14
  //#endregion
14
- export type { AgentHandle, AgentManifest, AgentResource, AgentResourceContent, AgentResourceInput, AgentTool, AgentToolInput, AgentToolProvider, AgentToolProviderHandle, ConnectionMeta, ConnectionMetaSse, ConnectionMetaWebsocket, CreateMcpFetchHandlerOptions, CreateMcpServerOptions, DevframeAgentHost, DevframeAgentHostEvents, DevframeCapabilities, DevframeCliOptions, DevframeConnectionConfigsRegistry, DevframeDefineDiagnosticsOptions, DevframeDefinition, DevframeDeploymentKind, DevframeDiagnosticsHost, DevframeDiagnosticsLogger, DevframeDockDefaults, DevframeDuplicationStrategy, DevframeHost, DevframeNodeContext, DevframeNodeRpcSession, DevframeNodeRpcSessionMeta, DevframeRpcClientFunctions, DevframeRpcConnection, DevframeRpcConnectionRequest, DevframeRpcOptions, DevframeRpcServerFunctions, DevframeRpcSharedStates, DevframeRpcTransportKind, DevframeScopedNodeContext, DevframeScopedNodeRpc, DevframeScopedStreamingHost, DevframeServiceDefinition, DevframeServiceDescriptor, DevframeServiceId, DevframeServiceInput, DevframeServiceMeta, DevframeServiceOf, DevframeServiceScopeOf, DevframeServicesHost, DevframeServicesRegistry, DevframeServicesScopeRegistry, DevframeServicesState, DevframeSettings, DevframeSettingsRegistry, DevframeSettingsStore, DevframeSetupInfo, DevframeSnapshotRpcEntry, DevframeSnapshotRpcInputs, DevframeSseOptions, DevframeStorageScope, DevframeViewHost, DevframeWsOptions, DevframeWsPeer, EventEmitter, EventUnsubscribe, EventsMap, McpAuthorization, McpConnectionInfo, McpFetchHandler, McpRouteOptions, McpServerHandle, McpSetting, RemoteAssets, RemoteAssetsErrorMessage, RemoteAssetsProvider, RemoteAssetsProviderCustom, RemoteAssetsStore, RpcBroadcastOptions, RpcFunctionAgentOptions, RpcFunctionsHost, RpcSharedStateGetOptions, RpcSharedStateHost, RpcStreamingChannel, RpcStreamingChannelOptions, RpcStreamingHost, ScopedBroadcastOptions, ScopedClientFunctions, ScopedRpcFn, ScopedServerFunctions, ScopedSharedStates, SettingsForNamespace, StaticAssetsSource };
15
+ export { type AgentHandle, type AgentManifest, type AgentResource, type AgentResourceContent, type AgentResourceInput, type AgentTool, type AgentToolInput, type AgentToolProvider, type AgentToolProviderHandle, type ConnectionMeta, type ConnectionMetaSse, type ConnectionMetaWebsocket, type CreateMcpFetchHandlerOptions, type CreateMcpServerOptions, type DevframeAgentHost, type DevframeAgentHostEvents, type DevframeCapabilities, type DevframeCliOptions, type DevframeConnectionConfigsRegistry, type DevframeDefineDiagnosticsOptions, type DevframeDefinition, type DevframeDeploymentKind, type DevframeDiagnosticsHost, type DevframeDiagnosticsLogger, type DevframeDockDefaults, type DevframeDuplicationStrategy, type DevframeHost, type DevframeNodeContext, type DevframeNodeRpcSession, type DevframeNodeRpcSessionMeta, type DevframeRpcClientFunctions, type DevframeRpcConnection, type DevframeRpcConnectionRequest, type DevframeRpcOptions, type DevframeRpcServerFunctions, type DevframeRpcSharedStates, type DevframeRpcTransportKind, type DevframeScopedNodeContext, type DevframeScopedNodeRpc, type DevframeScopedStreamingHost, type DevframeServiceDefinition, type DevframeServiceDescriptor, type DevframeServiceId, type DevframeServiceInput, type DevframeServiceMeta, type DevframeServiceOf, type DevframeServiceScopeOf, type DevframeServicesHost, type DevframeServicesRegistry, type DevframeServicesScopeRegistry, type DevframeServicesState, type DevframeSettings, type DevframeSettingsRegistry, type DevframeSettingsStore, type DevframeSetupInfo, type DevframeSnapshotRpcEntry, type DevframeSnapshotRpcInputs, type DevframeSseOptions, type DevframeStorageScope, type DevframeViewHost, type DevframeWsOptions, type DevframeWsPeer, type EventEmitter, type EventUnsubscribe, type EventsMap, type McpAuthorization, type McpConnectionInfo, type McpContentBlock, type McpFetchHandler, type McpResourceTemplate, type McpResourceTemplateContent, type McpResourceTemplateEntry, type McpResourcesChangedHook, type McpRouteOptions, type McpServerHandle, type McpSetting, type RemoteAssets, type RemoteAssetsErrorMessage, type RemoteAssetsProvider, type RemoteAssetsProviderCustom, type RemoteAssetsStore, type RpcBroadcastOptions, type RpcFunctionAgentOptions, type RpcFunctionsHost, type RpcSharedStateGetOptions, type RpcSharedStateHost, type RpcStreamingChannel, type RpcStreamingChannelOptions, type RpcStreamingHost, type ScopedBroadcastOptions, type ScopedClientFunctions, type ScopedRpcFn, type ScopedServerFunctions, type ScopedSharedStates, type SettingsForNamespace, type StaticAssetsSource, withMcpContent };
package/dist/index.mjs CHANGED
@@ -1,3 +1,4 @@
1
+ import { n as withMcpContent } from "./mcp-content-DN3O212x.mjs";
1
2
  import { t as createDefineWrapperWithContext } from "./define-BLWPsH6y.mjs";
2
3
  //#region src/define.ts
3
4
  const defineRpcFunction = createDefineWrapperWithContext();
@@ -9,4 +10,4 @@ function defineDevframe(d) {
9
10
  return d;
10
11
  }
11
12
  //#endregion
12
- export { defineDevframe, defineRpcFunction };
13
+ export { defineDevframe, defineRpcFunction, withMcpContent };
@@ -1,5 +1,5 @@
1
1
  import { n as __exportAll } from "./rolldown-runtime-B4iAMlE-.mjs";
2
- import { t as diagnostics } from "./diagnostics-Cx4_VjlG.mjs";
2
+ import { t as diagnostics } from "./diagnostics-BJjvKfVK.mjs";
3
3
  import { join } from "pathe";
4
4
  import { mkdirSync, readFileSync, readdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
5
5
  import process from "node:process";