devframe 1.3.0 → 1.3.2

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 (153) hide show
  1. package/dist/{_shared-C06DH07o.mjs → _shared-BGb9aDxr.mjs} +7 -9
  2. package/dist/{_shared-DbO-OtUC.d.mts → _shared-CnKu5myY.d.mts} +4 -4
  3. package/dist/adapters/build.d.mts +3 -5
  4. package/dist/adapters/build.mjs +7 -8
  5. package/dist/adapters/cac.d.mts +1 -3
  6. package/dist/adapters/cac.mjs +5 -7
  7. package/dist/adapters/dev.d.mts +6 -8
  8. package/dist/adapters/dev.mjs +2 -2
  9. package/dist/adapters/embedded.d.mts +2 -4
  10. package/dist/adapters/embedded.mjs +1 -2
  11. package/dist/adapters/initiate.d.mts +9 -9
  12. package/dist/adapters/initiate.mjs +1 -2
  13. package/dist/adapters/mcp.d.mts +3 -3
  14. package/dist/adapters/mcp.mjs +1 -2
  15. package/dist/{agentic-D6HePbWg.d.mts → agentic-CCstJ5yv.d.mts} +1 -3
  16. package/dist/{browser-agent-Pu-FLk6I.mjs → browser-agent-DmAotroz.mjs} +1 -2
  17. package/dist/{browser-agent-rpc-KH4HHvHf.mjs → browser-agent-rpc-CS80Sphv.mjs} +3 -5
  18. package/dist/cli/main.d.mts +1 -3
  19. package/dist/cli/main.mjs +3 -4
  20. package/dist/client/index.d.mts +6 -30
  21. package/dist/client/index.mjs +47 -72
  22. package/dist/{client-agent-DuLhUF6d.mjs → client-agent-qNMgDUev.mjs} +7 -12
  23. package/dist/constants.d.mts +1 -5
  24. package/dist/constants.mjs +2 -3
  25. package/dist/{context-BY72d2gV.mjs → context-BTxC4QrJ.mjs} +4 -5
  26. package/dist/{context-CmSDJAEI.mjs → context-C5FcbWQi.mjs} +25 -41
  27. package/dist/{context-eIUOSrKu.d.mts → context-CsdPs3po.d.mts} +1 -3
  28. package/dist/{context-Dko5QFWF.d.mts → context-WxTq6kqb.d.mts} +54 -42
  29. package/dist/{crypto-token-TVbGGFuj.mjs → crypto-token-CUhPE_ei.mjs} +1 -2
  30. package/dist/{define-BLWPsH6y.mjs → define-C8h-fyD3.mjs} +1 -2
  31. package/dist/{dev-C-wQTIrV.mjs → dev-DaHYh5YK.mjs} +10 -11
  32. package/dist/{diagnostics-BJjvKfVK.mjs → diagnostics-DC1-WcvN.mjs} +6 -3
  33. package/dist/{dist-CO98PBnQ.mjs → dist-BWGpvt-z.mjs} +1 -2
  34. package/dist/{dist-CZXfGEkd.mjs → dist-DJydMELP.mjs} +3 -10
  35. package/dist/{events-0wDwalmL.mjs → events-qWCKwD8-.mjs} +1 -2
  36. package/dist/{handler-DmaAfpGq.mjs → handler-DkLlj3-B.mjs} +3 -5
  37. package/dist/{hash-DdPnc4k3.mjs → hash-DHqpWeMO.mjs} +4 -8
  38. package/dist/{host-h3-BROI6SQ4.mjs → host-h3-D1uj5EM8.mjs} +1 -2
  39. package/dist/{import-runtime-module-BzlEQ9PI.mjs → import-runtime-module-DsdqJ1gK.mjs} +2 -3
  40. package/dist/in-page-channel/index.d.mts +2 -12
  41. package/dist/in-page-channel/index.mjs +10 -16
  42. package/dist/{index-CeEtxDmK.d.mts → index-BIRF0E5l.d.mts} +0 -2
  43. package/dist/{index-Bia1vKjL.d.mts → index-BKu9BxcT.d.mts} +0 -2
  44. package/dist/{index-DuEm0sDH.d.mts → index-D0qrBkhO.d.mts} +1 -15
  45. package/dist/{index-BMj-o_sP.d.mts → index-HMJPlexc.d.mts} +2 -6
  46. package/dist/index.d.mts +7 -9
  47. package/dist/index.mjs +3 -4
  48. package/dist/{instance-registry-vlz81P9X.mjs → instance-registry-CmZfF5u3.mjs} +4 -10
  49. package/dist/{instance-shell-yfm1AYk8.d.mts → instance-shell-Bujp0BhE.d.mts} +5 -9
  50. package/dist/{instance-shell-CBgy8YzK.mjs → instance-shell-Dk2SejFT.mjs} +38 -17
  51. package/dist/{interactive-auth-BsqLFXw8.mjs → interactive-auth-BURwIAvE.mjs} +6 -8
  52. package/dist/internal/index.d.mts +15 -29
  53. package/dist/internal/index.mjs +13 -15
  54. package/dist/{mcp-content-wcQxvrrW.d.mts → mcp-content-CQQBt2An.d.mts} +1 -3
  55. package/dist/{mcp-content-DN3O212x.mjs → mcp-content-CqU8yaF7.mjs} +1 -2
  56. package/dist/{mrmime-40h5OOIp.mjs → mrmime-y_XyiVcd.mjs} +1 -2
  57. package/dist/node/auth.d.mts +2 -2
  58. package/dist/node/auth.mjs +2 -2
  59. package/dist/node/hub-internals.d.mts +2 -2
  60. package/dist/node/hub-internals.mjs +2 -2
  61. package/dist/node/index.d.mts +2 -6
  62. package/dist/node/index.mjs +2 -2
  63. package/dist/{nostics-DWvukRwa.d.mts → nostics-Dgwh7ytT.d.mts} +0 -2
  64. package/dist/{nostics-D0PvLZsn.mjs → nostics-InlX4tmd.mjs} +2 -4
  65. package/dist/{origin-DZit9g29.mjs → origin-Ck7mLbKU.mjs} +1 -2
  66. package/dist/{origin-CY6BBHOy.d.mts → origin-D5i7K_Zb.d.mts} +0 -2
  67. package/dist/recipes/interactive-auth.d.mts +3 -5
  68. package/dist/recipes/interactive-auth.mjs +1 -2
  69. package/dist/{remote-assets-eBvSKZMS.d.mts → remote-assets-5AQMHZnV.d.mts} +0 -2
  70. package/dist/{remote-assets-DOva7l3s.mjs → remote-assets-DhonNeo_.mjs} +5 -8
  71. package/dist/{revoke-CeQUo6KI.mjs → revoke-D6KA3vwr.mjs} +2 -3
  72. package/dist/{rolldown-runtime-B4iAMlE-.mjs → rolldown-runtime-DYf_mQCB.mjs} +2 -3
  73. package/dist/rpc/client.d.mts +2 -4
  74. package/dist/rpc/client.mjs +2 -3
  75. package/dist/rpc/dump.d.mts +3 -11
  76. package/dist/rpc/dump.mjs +1 -2
  77. package/dist/rpc/index.d.mts +3 -3
  78. package/dist/rpc/index.mjs +6 -8
  79. package/dist/rpc/server.d.mts +2 -4
  80. package/dist/rpc/server.mjs +2 -3
  81. package/dist/rpc/transports/sse-client.d.mts +1 -1
  82. package/dist/rpc/transports/sse-client.mjs +2 -3
  83. package/dist/rpc/transports/sse-server.d.mts +5 -7
  84. package/dist/rpc/transports/sse-server.mjs +4 -5
  85. package/dist/rpc/transports/ws-bun.d.mts +3 -5
  86. package/dist/rpc/transports/ws-bun.mjs +2 -3
  87. package/dist/rpc/transports/ws-client.d.mts +1 -1
  88. package/dist/rpc/transports/ws-client.mjs +2 -3
  89. package/dist/rpc/transports/ws-deno.d.mts +3 -5
  90. package/dist/rpc/transports/ws-deno.mjs +2 -3
  91. package/dist/rpc/transports/ws-server.d.mts +3 -3
  92. package/dist/rpc/transports/ws-server.mjs +5 -6
  93. package/dist/{rpc-core-oXIq2hjO.mjs → rpc-core-CDUizUQB.mjs} +4 -5
  94. package/dist/{rpc-core-BQ1mesqZ.d.mts → rpc-core-CFwyV10r.d.mts} +5 -7
  95. package/dist/{serialization-BhuOoL80.mjs → serialization-iiTQ7n21.mjs} +3 -5
  96. package/dist/{services-install-D5YUwFXW.mjs → services-install-DCuDzMJ-.mjs} +1 -2
  97. package/dist/{session-DPfj6zQG.mjs → session-BjvoLH3r.mjs} +1 -2
  98. package/dist/{session-r6PDixP6.d.mts → session-Y9R6tqg4.d.mts} +0 -2
  99. package/dist/{shared-state-Cc-Jrhma.mjs → shared-state-COV7NCbd.mjs} +4 -6
  100. package/dist/{sse-client-DNdscfu_.d.mts → sse-client-B2PrSz-H.d.mts} +2 -4
  101. package/dist/{state-W4wI6X5X.mjs → state-B_yjfeqo.mjs} +3 -5
  102. package/dist/{storage-BzAr-S6I.mjs → storage-DpJ52UB_.mjs} +3 -5
  103. package/dist/{structured-clone-CbAV5rFI.mjs → structured-clone-B1N_XQvA.mjs} +2 -4
  104. package/dist/{structured-clone-CgtQ61SA.mjs → structured-clone-D1dOCZvc.mjs} +2 -4
  105. package/dist/{tool-input-CES3Pc4y.mjs → tool-input-CcCgJ8jq.mjs} +6 -12
  106. package/dist/types/index.d.mts +6 -6
  107. package/dist/{types-BmDbfHCx.d.mts → types-844OBepb.d.mts} +1 -5
  108. package/dist/utils/agent-tool-name.d.mts +1 -3
  109. package/dist/utils/agent-tool-name.mjs +1 -2
  110. package/dist/utils/colors.d.mts +1 -3
  111. package/dist/utils/colors.mjs +1 -2
  112. package/dist/utils/crypto-token.d.mts +1 -3
  113. package/dist/utils/crypto-token.mjs +1 -2
  114. package/dist/utils/debounce.d.mts +0 -2
  115. package/dist/utils/debounce.mjs +1 -2
  116. package/dist/utils/events.d.mts +2 -4
  117. package/dist/utils/events.mjs +1 -2
  118. package/dist/utils/get-port.d.mts +0 -2
  119. package/dist/utils/get-port.mjs +1 -2
  120. package/dist/utils/hash.d.mts +1 -3
  121. package/dist/utils/hash.mjs +1 -2
  122. package/dist/utils/launch-editor.d.mts +1 -3
  123. package/dist/utils/launch-editor.mjs +25 -37
  124. package/dist/utils/nanoid.d.mts +1 -3
  125. package/dist/utils/nanoid.mjs +1 -2
  126. package/dist/utils/nostics.d.mts +1 -1
  127. package/dist/utils/nostics.mjs +1 -2
  128. package/dist/utils/open.d.mts +1 -3
  129. package/dist/utils/open.mjs +1 -2
  130. package/dist/utils/origin.d.mts +1 -1
  131. package/dist/utils/origin.mjs +1 -2
  132. package/dist/utils/remote-assets.d.mts +2 -4
  133. package/dist/utils/remote-assets.mjs +1 -2
  134. package/dist/utils/serve-static.d.mts +2 -4
  135. package/dist/utils/serve-static.mjs +3 -4
  136. package/dist/utils/shared-state.d.mts +1 -1
  137. package/dist/utils/shared-state.mjs +1 -2
  138. package/dist/utils/simple-schema.d.mts +1 -3
  139. package/dist/utils/simple-schema.mjs +1 -2
  140. package/dist/utils/streaming-channel.d.mts +1 -1
  141. package/dist/utils/streaming-channel.mjs +1 -2
  142. package/dist/utils/structured-clone.d.mts +1 -3
  143. package/dist/utils/structured-clone.mjs +1 -2
  144. package/dist/utils/url.d.mts +1 -3
  145. package/dist/utils/url.mjs +1 -2
  146. package/dist/utils/when.d.mts +1 -3
  147. package/dist/utils/when.mjs +2 -4
  148. package/dist/{validation-CMfDAti3.mjs → validation-Cjy1P58H.mjs} +7 -13
  149. package/dist/{wire-codec-B1W3zH3L.mjs → wire-codec-BdngvzfH.mjs} +3 -4
  150. package/dist/{write-DK7rBUN3.mjs → write-3miSvPaD.mjs} +10 -16
  151. package/dist/{ws-client-6Mrz6eC4.d.mts → ws-client-lqOeANcn.d.mts} +2 -4
  152. package/dist/{ws-server-y2R76aSW.d.mts → ws-server-CYHkeyA-.d.mts} +3 -5
  153. package/package.json +8 -8
@@ -1,12 +1,11 @@
1
- import { i as BirpcReturn } from "./index-Bia1vKjL.mjs";
2
- import { d as RpcFunctionsCollectorBase } from "./index-DuEm0sDH.mjs";
3
- import { t as StandardSchemaV1 } from "./index-CeEtxDmK.mjs";
4
- import { g as RpcFunctionDefinitionAny, h as RpcFunctionDefinition } from "./types-BmDbfHCx.mjs";
5
- import { n as DevframeRpcConnection, t as DevframeNodeRpcSessionMeta } from "./session-r6PDixP6.mjs";
6
- import { a as RemoteAssetsStore, o as StaticAssetsSource } from "./remote-assets-eBvSKZMS.mjs";
7
- import { h as defineDiagnostics } from "./nostics-DWvukRwa.mjs";
1
+ import { i as BirpcReturn } from "./index-BKu9BxcT.mjs";
2
+ import { d as RpcFunctionsCollectorBase } from "./index-D0qrBkhO.mjs";
3
+ import { t as StandardSchemaV1 } from "./index-BIRF0E5l.mjs";
4
+ import { g as RpcFunctionDefinitionAny, h as RpcFunctionDefinition } from "./types-844OBepb.mjs";
5
+ import { n as DevframeRpcConnection, t as DevframeNodeRpcSessionMeta } from "./session-Y9R6tqg4.mjs";
6
+ import { a as RemoteAssetsStore, o as StaticAssetsSource } from "./remote-assets-5AQMHZnV.mjs";
7
+ import { h as defineDiagnostics } from "./nostics-Dgwh7ytT.mjs";
8
8
  import { CAC } from "cac";
9
- //#region src/types/events.d.ts
10
9
  interface EventsMap {
11
10
  [event: string]: any;
12
11
  }
@@ -75,8 +74,6 @@ interface EventEmitter<Events extends EventsMap> {
75
74
  */
76
75
  once: <K extends keyof Events>(event: K, cb: Events[K]) => EventUnsubscribe;
77
76
  }
78
- //#endregion
79
- //#region src/types/agent.d.ts
80
77
  /**
81
78
  * Serializable description of an agent-exposed tool. This is the shape
82
79
  * returned by the agent host manifest and surfaced over the wire by
@@ -280,8 +277,6 @@ interface DevframeAgentHost {
280
277
  /** Look up a resource by id. */
281
278
  getResource: (id: string) => AgentResource | undefined;
282
279
  }
283
- //#endregion
284
- //#region src/adapters/flags.d.ts
285
280
  /**
286
281
  * Schema map for typed CLI flags. Keys are flag names in camelCase, so
287
282
  * this matches CAC's parsed-flag output ( `--no-open` → `noOpen` ). Each
@@ -319,8 +314,6 @@ declare function parseCliFlags(schema: CliFlagsSchema, raw: Record<string, unkno
319
314
  flags: Record<string, unknown>;
320
315
  issues?: string[];
321
316
  };
322
- //#endregion
323
- //#region src/node/auth/handler.d.ts
324
317
  /**
325
318
  * A ready-made pre-auth RPC handler, as produced by
326
319
  * `devframe/recipes/interactive-auth`'s `createInteractiveAuth`. Bundles
@@ -372,8 +365,6 @@ interface DevframeAuthHandler {
372
365
  */
373
366
  buildOpenUrl?: (url: string) => string;
374
367
  }
375
- //#endregion
376
- //#region src/types/mcp.d.ts
377
368
  /**
378
369
  * The MCP adapter surface, typed here so `devframe` (which probes for and
379
370
  * lazily loads `@devframes/agentic`) and `@devframes/agentic/mcp` (which
@@ -414,6 +405,11 @@ interface CreateMcpServerOptions {
414
405
  * `notifications/resources/list_changed`. See {@link McpResourcesChangedHook}.
415
406
  */
416
407
  onResourcesChanged?: McpResourcesChangedHook;
408
+ /**
409
+ * Prompt templates served through `prompts/list` and `prompts/get`.
410
+ * Omitted or empty declares no `prompts` capability.
411
+ */
412
+ prompts?: McpPrompt[];
417
413
  /** Override the name reported in the MCP handshake. */
418
414
  serverName?: string;
419
415
  /** Override the version reported in the MCP handshake. Defaults to `definition.version ?? '0.0.0'`. */
@@ -456,6 +452,8 @@ interface CreateMcpFetchHandlerOptions {
456
452
  resourceTemplates?: McpResourceTemplate[];
457
453
  /** Host subscription for resource-list changes; see {@link CreateMcpServerOptions.onResourcesChanged}. */
458
454
  onResourcesChanged?: McpResourcesChangedHook;
455
+ /** Prompt templates; see {@link CreateMcpServerOptions.prompts}. */
456
+ prompts?: McpPrompt[];
459
457
  /**
460
458
  * Optional identity check, layered on top of the origin gate and checked
461
459
  * **after** it: a bearer token string (matched in constant time against
@@ -553,8 +551,40 @@ interface McpResourceTemplate {
553
551
  * subscription; the MCP server calls it on teardown.
554
552
  */
555
553
  type McpResourcesChangedHook = (notify: () => void, ctx: DevframeNodeContext) => () => void;
556
- //#endregion
557
- //#region src/types/diagnostics.d.ts
554
+ /** One argument of an {@link McpPrompt}. */
555
+ interface McpPromptArgument {
556
+ name: string;
557
+ description?: string;
558
+ /** `prompts/get` answers invalid params when a required argument is missing or empty. */
559
+ required?: boolean;
560
+ }
561
+ /** One message of the answer to `prompts/get`. */
562
+ interface McpPromptMessage {
563
+ role: 'user' | 'assistant';
564
+ content: {
565
+ type: 'text';
566
+ text: string;
567
+ };
568
+ }
569
+ /** What an {@link McpPrompt} returns from `get`, sent as the `prompts/get` result. */
570
+ interface McpPromptResult {
571
+ description?: string;
572
+ messages: McpPromptMessage[];
573
+ }
574
+ /**
575
+ * A prompt template the MCP server lists in `prompts/list` and builds in
576
+ * `prompts/get`. A coding agent usually offers it to the user as a slash
577
+ * command. Each `name` is used once; a repeated name throws `DF0085`.
578
+ */
579
+ interface McpPrompt {
580
+ name: string;
581
+ /** Human-readable name for display. */
582
+ title?: string;
583
+ description?: string;
584
+ arguments?: McpPromptArgument[];
585
+ /** Build the messages from the arguments the coding agent sent. */
586
+ get: (args: Record<string, string>) => McpPromptResult | Promise<McpPromptResult>;
587
+ }
558
588
  /**
559
589
  * The shared diagnostics lookup exposed by the host. A `Proxy` that resolves
560
590
  * any registered code name to its `nostics` handle (a callable that builds
@@ -611,8 +641,6 @@ interface DevframeDiagnosticsHost {
611
641
  */
612
642
  defineDiagnostics: typeof defineDiagnostics;
613
643
  }
614
- //#endregion
615
- //#region src/types/host.d.ts
616
644
  interface DevframeHost {
617
645
  /**
618
646
  * Serve static assets at the given URL base: a local directory, or a
@@ -680,8 +708,6 @@ interface DevframeHost {
680
708
  * private, `global` is per-user.
681
709
  */
682
710
  type DevframeStorageScope = 'workspace' | 'project' | 'global';
683
- //#endregion
684
- //#region src/client/browser-agent.d.ts
685
711
  interface BrowserAgentToolManifest {
686
712
  id: string;
687
713
  title?: string;
@@ -697,8 +723,6 @@ interface BrowserAgentClientInfo {
697
723
  visible: boolean;
698
724
  focused: boolean;
699
725
  }
700
- //#endregion
701
- //#region src/types/rpc-augments.d.ts
702
726
  /**
703
727
  * To be extended
704
728
  */
@@ -906,8 +930,6 @@ interface DevframeRpcSharedStates {
906
930
  */
907
931
  'devframe:services': DevframeServicesState;
908
932
  }
909
- //#endregion
910
- //#region src/types/views.d.ts
911
933
  interface DevframeViewHost {
912
934
  /**
913
935
  * Static mounts registered through {@link DevframeViewHost.hostStatic}, each
@@ -939,8 +961,6 @@ interface DevframeViewHost {
939
961
  */
940
962
  hostStatic: (baseUrl: string, source: StaticAssetsSource, defaultResolveFrom?: string | null) => void;
941
963
  }
942
- //#endregion
943
- //#region src/types/scope.d.ts
944
964
  type AnyRpcFn = (...args: any[]) => any;
945
965
  /**
946
966
  * Resolve a scoped bare name `T` back to its fully-qualified entry in
@@ -1120,8 +1140,6 @@ interface DevframeScopedNodeContext<NS extends string = string, Settings extends
1120
1140
  */
1121
1141
  scope: DevframeNodeContext['scope'];
1122
1142
  }
1123
- //#endregion
1124
- //#region src/types/services.d.ts
1125
1143
  /**
1126
1144
  * Augmentation point mapping service ids to their implementation types.
1127
1145
  * Providers extend this via `declare module 'devframe'`.
@@ -1315,8 +1333,6 @@ interface DevframeServicesHost {
1315
1333
  */
1316
1334
  ready: () => Promise<void>;
1317
1335
  }
1318
- //#endregion
1319
- //#region src/types/devframe.d.ts
1320
1336
  /**
1321
1337
  * Classification of how a devframe is being deployed. Hosted adapters
1322
1338
  * (`vite`, `embedded`) share their origin with a host app and must
@@ -1501,6 +1517,11 @@ interface McpRouteOptions {
1501
1517
  * function that removes the subscription; the route calls it on teardown.
1502
1518
  */
1503
1519
  onResourcesChanged?: McpResourcesChangedHook;
1520
+ /**
1521
+ * Prompt templates the route serves through MCP `prompts/list` and
1522
+ * `prompts/get`. Omitted or empty declares no `prompts` capability.
1523
+ */
1524
+ prompts?: McpPrompt[];
1504
1525
  }
1505
1526
  interface DevframeCliOptions {
1506
1527
  /** Binary name; default: the devframe's `id`. */
@@ -1801,8 +1822,6 @@ type DevframeSnapshotRpcEntry = string | {
1801
1822
  method: string;
1802
1823
  inputs: DevframeSnapshotRpcInputs;
1803
1824
  };
1804
- //#endregion
1805
- //#region src/utils/shared-state.d.ts
1806
1825
  type ImmutablePrimitive = undefined | null | boolean | string | number | Function;
1807
1826
  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>;
1808
1827
  type ImmutableArray<T> = ReadonlyArray<Immutable<T>>;
@@ -1859,8 +1878,6 @@ interface SharedStateOptions<T> {
1859
1878
  enablePatches?: boolean;
1860
1879
  }
1861
1880
  declare function createSharedState<T extends object>(options: SharedStateOptions<T>): SharedState<T>;
1862
- //#endregion
1863
- //#region src/utils/streaming-channel.d.ts
1864
1881
  /**
1865
1882
  * Serialized error shape sent over the wire when a stream ends with a failure.
1866
1883
  * Stays JSON-safe so the strict-JSON encoder can carry it without coercion.
@@ -1981,8 +1998,6 @@ declare function createStreamSink<T>(options?: CreateStreamSinkOptions): StreamS
1981
1998
  * terminal frame. Consumers iterate with `for await` or pipe `readable`.
1982
1999
  */
1983
2000
  declare function createStreamReader<T>(options?: CreateStreamReaderOptions): StreamReader<T>;
1984
- //#endregion
1985
- //#region src/types/rpc.d.ts
1986
2001
  interface DevframeNodeRpcSession {
1987
2002
  meta: DevframeNodeRpcSessionMeta;
1988
2003
  rpc: BirpcReturn<DevframeRpcClientFunctions, DevframeRpcServerFunctions, false>;
@@ -2148,8 +2163,6 @@ interface RpcStreamingHost {
2148
2163
  */
2149
2164
  _onSessionDisconnected: (meta: DevframeNodeRpcSessionMeta) => void;
2150
2165
  }
2151
- //#endregion
2152
- //#region src/types/context.d.ts
2153
2166
  interface DevframeCapabilities {
2154
2167
  rpc?: boolean;
2155
2168
  views?: boolean;
@@ -2402,5 +2415,4 @@ interface ConnectionMeta {
2402
2415
  * augments it with `dock`; `@devframes/hub-ui` augments it with `ui`.
2403
2416
  */
2404
2417
  interface DevframeConnectionConfigsRegistry {}
2405
- //#endregion
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 };
2418
+ export { DevframeServiceOf as $, AgentToolProviderHandle as $t, SharedStateEvents as A, McpFetchHandler as At, DevframeSetupInfo as B, DevframeAuthHandler as Bt, createStreamSink as C, DevframeStorageScope as Ct, ImmutableObject as D, CreateMcpServerOptions as Dt, ImmutableMap as E, CreateMcpFetchHandlerOptions as Et, DevframeDefinition as F, McpResourceTemplate as Ft, McpAuthorization as G, AgentHandle as Gt, DevframeSnapshotRpcInputs as H, InferCliFlags as Ht, DevframeDeploymentKind as I, McpResourceTemplateContent as It, DevframeServiceDefinition as J, AgentResourceContent as Jt, McpRouteOptions as K, AgentManifest as Kt, DevframeDockDefaults as L, McpResourceTemplateEntry as Lt, SharedStatePatch as M, McpPromptArgument as Mt, createSharedState as N, McpPromptMessage as Nt, ImmutableSet as O, McpConnectionInfo as Ot, DevframeCliOptions as P, McpPromptResult as Pt, DevframeServiceMeta as Q, AgentToolProvider as Qt, DevframeDuplicationStrategy as R, McpResourcesChangedHook as Rt, createStreamReader as S, DevframeHost as St, ImmutableArray as T, DevframeDiagnosticsLogger as Tt, DevframeSseOptions as U, defineCliFlags as Ut, DevframeSnapshotRpcEntry as V, CliFlagsSchema as Vt, DevframeWsOptions as W, parseCliFlags as Wt, DevframeServiceId as X, AgentTool as Xt, DevframeServiceDescriptor as Y, AgentResourceInput as Yt, DevframeServiceInput as Z, AgentToolInput 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, DevframeAgentHost 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, EventsMap as in, DevframeServicesState as it, SharedStateOptions as j, McpPrompt as jt, SharedState as k, McpContentBlock as kt, RpcFunctionsHost as l, DevframeSettingsRegistry as lt, RpcStreamingHost as m, ScopedServerFunctions as mt, ConnectionMetaSse as n, EventEmitter as nn, DevframeServicesRegistry as nt, DevframeNodeContext as o, DevframeScopedNodeRpc as ot, RpcStreamingChannelOptions as p, ScopedRpcFn as pt, McpSetting as q, AgentResource as qt, ConnectionMetaWebsocket as r, EventUnsubscribe as rn, DevframeServicesScopeRegistry as rt, DevframeNodeRpcSession as s, DevframeScopedStreamingHost as st, ConnectionMeta as t, DevframeAgentHostEvents as tn, 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, McpServerHandle as zt };
@@ -1,4 +1,4 @@
1
- //#region src/utils/crypto-token.ts
1
+ // src/utils/crypto-token.ts
2
2
  const HEX = "0123456789abcdef";
3
3
  /**
4
4
  * Generate a high-entropy, URL-safe (hex) random token suitable for use as a
@@ -41,5 +41,4 @@ function timingSafeEqual(a, b) {
41
41
  for (let i = 0; i < a.length; i++) mismatch |= a.charCodeAt(i) ^ b.charCodeAt(i);
42
42
  return mismatch === 0;
43
43
  }
44
- //#endregion
45
44
  export { randomToken as n, timingSafeEqual as r, randomDigits as t };
@@ -1,4 +1,4 @@
1
- //#region src/rpc/define.ts
1
+ // src/rpc/define.ts
2
2
  function defineRpcFunction(definition) {
3
3
  return definition;
4
4
  }
@@ -7,5 +7,4 @@ function createDefineWrapperWithContext() {
7
7
  return definition;
8
8
  };
9
9
  }
10
- //#endregion
11
10
  export { defineRpcFunction as n, createDefineWrapperWithContext as t };
@@ -1,17 +1,17 @@
1
- import { DEVFRAME_CONNECTION_META_FILENAME } from "./constants.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
- import { t as createH3DevframeHost } from "./host-h3-BROI6SQ4.mjs";
7
- import { a as isAddressInUse, i as normalizeHttpServerUrl, n as resolveInstanceRegister, o as listenWithLoopbackTwin, t as createInstanceShell } from "./instance-shell-CBgy8YzK.mjs";
8
1
  import { open } from "./utils/open.mjs";
2
+ 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-BGb9aDxr.mjs";
3
+ import { t as diagnostics } from "./diagnostics-DC1-WcvN.mjs";
4
+ import { a as isAddressInUse, i as normalizeHttpServerUrl, n as resolveInstanceRegister, o as listenWithLoopbackTwin, t as createInstanceShell } from "./instance-shell-Dk2SejFT.mjs";
5
+ import { t as resolveStaticAssetsSource } from "./remote-assets-DhonNeo_.mjs";
9
6
  import { mountStaticHandler } from "./utils/serve-static.mjs";
7
+ import { DEVFRAME_CONNECTION_META_FILENAME } from "./constants.mjs";
8
+ import { t as createHostContext } from "./context-C5FcbWQi.mjs";
9
+ import { t as createH3DevframeHost } from "./host-h3-D1uj5EM8.mjs";
10
10
  import { resolve } from "pathe";
11
11
  import { createServer } from "node:http";
12
12
  import process from "node:process";
13
13
  import { H3, toNodeHandler } from "h3";
14
- //#region src/adapters/initiate.ts
14
+ // src/adapters/initiate.ts
15
15
  const INSTANCE_INTERNALS = /* @__PURE__ */ new WeakMap();
16
16
  /** @internal */
17
17
  function getInstanceInternals(handler) {
@@ -143,6 +143,7 @@ async function mountMcpRoute(app, context, def, base, setting) {
143
143
  instructions: config.instructions,
144
144
  resourceTemplates: config.resourceTemplates,
145
145
  onResourcesChanged: config.onResourcesChanged,
146
+ prompts: config.prompts,
146
147
  authorization: config.authorization,
147
148
  allowedOrigins: config.allowedOrigins
148
149
  });
@@ -151,8 +152,7 @@ async function mountMcpRoute(app, context, def, base, setting) {
151
152
  dispose: mounted.dispose
152
153
  };
153
154
  }
154
- //#endregion
155
- //#region src/adapters/dev.ts
155
+ // src/adapters/dev.ts
156
156
  /**
157
157
  * Start a devframe dev server for a {@link DevframeDefinition}:
158
158
  * h3 + WebSocket RPC + (optionally) the author's SPA mounted at the
@@ -285,5 +285,4 @@ async function maybeOpenBrowser(def, flags, origin, override, authHandler) {
285
285
  await open(authorizedTarget);
286
286
  } catch {}
287
287
  }
288
- //#endregion
289
288
  export { getInstanceInternals as n, initDevframe as r, createDevServer as t };
@@ -1,5 +1,5 @@
1
- import { i as defineDiagnostics } from "./nostics-D0PvLZsn.mjs";
2
- //#region src/node/diagnostics.ts
1
+ import { i as defineDiagnostics } from "./nostics-InlX4tmd.mjs";
2
+ // src/node/diagnostics.ts
3
3
  /**
4
4
  * DF00xx codes are allocated across packages (e.g. @devframes/json-render
5
5
  * owns DF0037–DF0041), so this file alone doesn't show the next free
@@ -194,8 +194,11 @@ const diagnostics = defineDiagnostics({
194
194
  DF0084: {
195
195
  why: (p) => `MCP resource template "${p.name}" has an invalid \`uriTemplate\` "${p.uriTemplate}": ${p.reason}`,
196
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."
197
+ },
198
+ DF0085: {
199
+ why: (p) => `MCP prompt "${p.name}" is listed more than once.`,
200
+ fix: "Give each entry in `prompts` its own `name`. `prompts/get` finds a prompt by its name, so two prompts cannot share one."
197
201
  }
198
202
  }
199
203
  });
200
- //#endregion
201
204
  export { diagnostics as t };
@@ -1,4 +1,4 @@
1
- //#region ../../node_modules/.pnpm/birpc@4.2.0/node_modules/birpc/dist/index.mjs
1
+ // ../../node_modules/.pnpm/birpc@4.2.0/node_modules/birpc/dist/index.mjs
2
2
  function createPromiseWithResolvers() {
3
3
  let resolve;
4
4
  let reject;
@@ -261,5 +261,4 @@ function createBirpcGroup(functions, channels, options = {}) {
261
261
  broadcast: broadcastProxy
262
262
  };
263
263
  }
264
- //#endregion
265
264
  export { createBirpcGroup as n, createBirpc as t };
@@ -1,15 +1,9 @@
1
- import { n as __exportAll } from "./rolldown-runtime-B4iAMlE-.mjs";
1
+ import { n as __exportAll } from "./rolldown-runtime-DYf_mQCB.mjs";
2
2
  import "node:fs/promises";
3
3
  import { createServer } from "node:net";
4
4
  import { networkInterfaces } from "node:os";
5
- //#region ../../node_modules/.pnpm/get-port-please@3.2.0/node_modules/get-port-please/dist/index.mjs
6
- var dist_exports = /* @__PURE__ */ __exportAll({
7
- checkPort: () => checkPort,
8
- getPort: () => getPort,
9
- getRandomPort: () => getRandomPort,
10
- isSafePort: () => isSafePort,
11
- isUnsafePort: () => isUnsafePort
12
- });
5
+ // ../../node_modules/.pnpm/get-port-please@3.2.0/node_modules/get-port-please/dist/index.mjs
6
+ var dist_exports = /* @__PURE__ */ __exportAll({ getPort: () => getPort });
13
7
  const unsafePorts = /* @__PURE__ */ new Set([
14
8
  1,
15
9
  7,
@@ -224,5 +218,4 @@ async function checkPort(port, host = process.env.HOST, verbose) {
224
218
  }
225
219
  return port;
226
220
  }
227
- //#endregion
228
221
  export { getPort as n, dist_exports as t };
@@ -1,4 +1,4 @@
1
- //#region src/events.ts
1
+ // src/events.ts
2
2
  /**
3
3
  * Centralized registry of the core devframe event names: the node-side host
4
4
  * bus events, the client RPC connection events, and the server→client
@@ -76,5 +76,4 @@ const DEVFRAME_EVENTS = {
76
76
  inPageChannel: "devframe:in-page-channel"
77
77
  }
78
78
  };
79
- //#endregion
80
79
  export { DEVFRAME_EVENTS as t };
@@ -1,5 +1,5 @@
1
- import { r as diagnostics } from "./serialization-BhuOoL80.mjs";
2
- //#region src/rpc/validate-io.ts
1
+ import { r as diagnostics } from "./serialization-iiTQ7n21.mjs";
2
+ // src/rpc/validate-io.ts
3
3
  /**
4
4
  * Run a single [Standard Schema](https://standardschema.dev) validator,
5
5
  * awaiting the result when the validator is asynchronous.
@@ -62,8 +62,7 @@ async function validateRpcReturn(name, returnSchema, value) {
62
62
  });
63
63
  return value;
64
64
  }
65
- //#endregion
66
- //#region src/rpc/handler.ts
65
+ // src/rpc/handler.ts
67
66
  async function getRpcResolvedSetupResult(definition, context) {
68
67
  if (!definition.setup) return {};
69
68
  if (typeof context === "object" && context !== null) {
@@ -106,5 +105,4 @@ async function getRpcHandler(definition, context) {
106
105
  };
107
106
  return validating;
108
107
  }
109
- //#endregion
110
108
  export { validateRpcReturn as i, getRpcResolvedSetupResult as n, validateRpcArgs as r, getRpcHandler as t };
@@ -1,4 +1,4 @@
1
- //#region ../../node_modules/.pnpm/ohash@2.0.12/node_modules/ohash/dist/_chunks/is-equal.mjs
1
+ // ../../node_modules/.pnpm/ohash@2.0.12/node_modules/ohash/dist/_chunks/is-equal.mjs
2
2
  function serialize(input) {
3
3
  if (typeof input === "string") return `'${input}'`;
4
4
  return new Serializer().serialize(input);
@@ -145,8 +145,7 @@ const Serializer = /*@__PURE__*/ (function() {
145
145
  };
146
146
  return Serializer;
147
147
  })();
148
- //#endregion
149
- //#region ../../node_modules/.pnpm/ohash@2.0.12/node_modules/ohash/dist/crypto/js/index.mjs
148
+ // ../../node_modules/.pnpm/ohash@2.0.12/node_modules/ohash/dist/crypto/js/index.mjs
150
149
  const H = [
151
150
  1779033703,
152
151
  -1150833019,
@@ -343,18 +342,15 @@ var WordArray = class WordArray {
343
342
  function digest(message) {
344
343
  return new SHA256().finalize(message).toBase64();
345
344
  }
346
- //#endregion
347
- //#region ../../node_modules/.pnpm/ohash@2.0.12/node_modules/ohash/dist/index.mjs
345
+ // ../../node_modules/.pnpm/ohash@2.0.12/node_modules/ohash/dist/index.mjs
348
346
  function hash$1(input) {
349
347
  return digest(serialize(input));
350
348
  }
351
- //#endregion
352
- //#region src/utils/hash.ts
349
+ // src/utils/hash.ts
353
350
  /**
354
351
  * Stable, deterministic hash of any structured-cloneable value.
355
352
  */
356
353
  function hash(value) {
357
354
  return hash$1(value);
358
355
  }
359
- //#endregion
360
356
  export { hash as t };
@@ -1,7 +1,7 @@
1
1
  import { join } from "pathe";
2
2
  import process from "node:process";
3
3
  import { homedir } from "node:os";
4
- //#region src/node/host-h3.ts
4
+ // src/node/host-h3.ts
5
5
  /**
6
6
  * h3-backed {@link DevframeHost}, used by the standalone CLI adapter.
7
7
  */
@@ -22,5 +22,4 @@ function createH3DevframeHost(options) {
22
22
  }
23
23
  };
24
24
  }
25
- //#endregion
26
25
  export { createH3DevframeHost as t };
@@ -1,5 +1,5 @@
1
- import { i as resolveServicePackage, r as importServicePackage } from "./services-install-D5YUwFXW.mjs";
2
- //#region src/node/import-runtime-module.ts
1
+ import { i as resolveServicePackage, r as importServicePackage } from "./services-install-DCuDzMJ-.mjs";
2
+ // src/node/import-runtime-module.ts
3
3
  /**
4
4
  * Resolve and import a package at runtime without adding it to a consumer's
5
5
  * bundle graph. First-party adapters use this for modules whose code is
@@ -20,5 +20,4 @@ async function importRuntimeModule(specifier) {
20
20
  function isRuntimeModuleResolvable(specifier) {
21
21
  return resolveServicePackage(specifier, [import.meta.url]) !== void 0;
22
22
  }
23
- //#endregion
24
23
  export { isRuntimeModuleResolvable as n, importRuntimeModule as t };
@@ -1,6 +1,5 @@
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 { Qt as EventEmitter, k as SharedState } from "../context-Dko5QFWF.mjs";
3
- //#region src/in-page-channel/types.d.ts
1
+ import { D as InferArgsType, E as Thenable, O as InferReturnType, T as RpcReturnSchema, m as RpcFunctionAgentOptions, n as RpcArgsSchema } from "../types-844OBepb.mjs";
2
+ import { k as SharedState, nn as EventEmitter } from "../context-WxTq6kqb.mjs";
4
3
  /**
5
4
  * The shared contract of one in-page channel, declared once (usually in a
6
5
  * `shared/protocol.ts` both sides import) and passed to both endpoints as a
@@ -327,8 +326,6 @@ interface PanelChannel<P extends InPageChannelProtocol> {
327
326
  /** Tear the endpoint down permanently. */
328
327
  close: () => void;
329
328
  }
330
- //#endregion
331
- //#region src/in-page-channel/internal.d.ts
332
329
  /** Stable failure codes of the in-page channel. */
333
330
  type InPageChannelErrorCode = 'timeout' |
334
331
  /** The endpoint was closed (or closed while calls were pending). */
@@ -349,8 +346,6 @@ export declare class InPageChannelError extends Error {
349
346
  cause?: unknown;
350
347
  });
351
348
  }
352
- //#endregion
353
- //#region src/in-page-channel/page-script.d.ts
354
349
  /**
355
350
  * Create the page-script endpoint of an in-page channel.
356
351
  *
@@ -361,8 +356,6 @@ export declare class InPageChannelError extends Error {
361
356
  * handshake. No server is involved at any point.
362
357
  */
363
358
  export declare function createPageScriptChannel<P extends InPageChannelProtocol>(options: CreatePageScriptChannelOptions<P>): PageScriptChannel<P>;
364
- //#endregion
365
- //#region src/in-page-channel/panel.d.ts
366
359
  /**
367
360
  * Connect the panel endpoint of an in-page channel.
368
361
  *
@@ -376,8 +369,6 @@ export declare function createPageScriptChannel<P extends InPageChannelProtocol>
376
369
  * the UI can key a fallback state off `status` / `whenConnected()`.
377
370
  */
378
371
  export declare function connectPanelChannel<P extends InPageChannelProtocol>(options: ConnectPanelChannelOptions<P>): PanelChannel<P>;
379
- //#endregion
380
- //#region src/in-page-channel/index.d.ts
381
372
  /**
382
373
  * Define one in-page channel function, the `defineRpcFunction` authoring
383
374
  * shape narrowed to the browser (see {@link InPageFunctionDefinition}).
@@ -387,5 +378,4 @@ export declare function connectPanelChannel<P extends InPageChannelProtocol>(opt
387
378
  * constant.
388
379
  */
389
380
  export declare function defineChannelFunction<NAME extends string, TYPE extends InPageFunctionType, ARGS extends any[], RETURN = void, const AS extends RpcArgsSchema | undefined = undefined, const RS extends RpcReturnSchema | undefined = undefined>(definition: InPageFunctionDefinition<NAME, TYPE, ARGS, RETURN, AS, RS>): InPageFunctionDefinition<NAME, TYPE, ARGS, RETURN, AS, RS>;
390
- //#endregion
391
381
  export type { ConnectPanelChannelOptions, CreatePageScriptChannelOptions, InPageChannelErrorCode, InPageChannelProtocol, InPageChannelStatus, InPageFunctionDefinition, PageScriptChannel, PanelChannel, PanelPeer };
@@ -1,9 +1,9 @@
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
- import { createEventEmitter } from "../utils/events.mjs";
3
- import { t as createSharedState } from "../shared-state-Cc-Jrhma.mjs";
1
+ import { a as defineDiagnostics, i as createBirpc, n as argsToJsonSchema, o as DEVFRAME_EVENTS, r as resolveAgentSafety, t as toolInputToRpcArgs } from "../tool-input-CcCgJ8jq.mjs";
2
+ import { r as registerBrowserAgentTool } from "../browser-agent-DmAotroz.mjs";
4
3
  import { nanoid } from "../utils/nanoid.mjs";
5
- import { r as registerBrowserAgentTool } from "../browser-agent-Pu-FLk6I.mjs";
6
- //#region src/in-page-channel/diagnostics.ts
4
+ import { createEventEmitter } from "../utils/events.mjs";
5
+ import { t as createSharedState } from "../shared-state-COV7NCbd.mjs";
6
+ // src/in-page-channel/diagnostics.ts
7
7
  const diagnostics = /* #__PURE__ */ defineDiagnostics({
8
8
  docsBase: "https://devfra.me/errors",
9
9
  codes: {
@@ -17,8 +17,7 @@ const diagnostics = /* #__PURE__ */ defineDiagnostics({
17
17
  }
18
18
  }
19
19
  });
20
- //#endregion
21
- //#region src/in-page-channel/protocol.ts
20
+ // src/in-page-channel/protocol.ts
22
21
  /**
23
22
  * Wire protocol of the in-page channel handshake and its port-level control
24
23
  * frames. The envelope is transport-neutral by design: it identifies the
@@ -348,8 +347,7 @@ function withCallDeadline(promise, ms, describeTimeout) {
348
347
  });
349
348
  });
350
349
  }
351
- //#endregion
352
- //#region src/in-page-channel/state.ts
350
+ // src/in-page-channel/state.ts
353
351
  /**
354
352
  * The channel shared-state layer: `createSharedState` pumped over the
355
353
  * in-page channel, mirroring the RPC shared-state wire design with the page
@@ -503,8 +501,7 @@ function createPanelStateHost(options) {
503
501
  }
504
502
  };
505
503
  }
506
- //#endregion
507
- //#region src/in-page-channel/page-script.ts
504
+ // src/in-page-channel/page-script.ts
508
505
  /**
509
506
  * Create the page-script endpoint of an in-page channel.
510
507
  *
@@ -674,8 +671,7 @@ function createPageScriptChannel(options) {
674
671
  }
675
672
  };
676
673
  }
677
- //#endregion
678
- //#region src/in-page-channel/panel.ts
674
+ // src/in-page-channel/panel.ts
679
675
  const DEFAULT_HELLO_INTERVAL_MS = 300;
680
676
  const HELLO_INTERVAL_CAP_MS = 3e3;
681
677
  const DEFAULT_EVENT_BUFFER_LIMIT = 64;
@@ -916,8 +912,7 @@ function connectPanelChannel(options) {
916
912
  }
917
913
  };
918
914
  }
919
- //#endregion
920
- //#region src/in-page-channel/index.ts
915
+ // src/in-page-channel/index.ts
921
916
  /**
922
917
  * Define one in-page channel function, the `defineRpcFunction` authoring
923
918
  * shape narrowed to the browser (see {@link InPageFunctionDefinition}).
@@ -929,5 +924,4 @@ function connectPanelChannel(options) {
929
924
  function defineChannelFunction(definition) {
930
925
  return definition;
931
926
  }
932
- //#endregion
933
927
  export { InPageChannelError, connectPanelChannel, createPageScriptChannel, defineChannelFunction };
@@ -1,4 +1,3 @@
1
- //#region ../../node_modules/.pnpm/@standard-schema+spec@1.1.0/node_modules/@standard-schema/spec/dist/index.d.ts
2
1
  /** The Standard Typed interface. This is a base type extended by other specs. */
3
2
  interface StandardTypedV1<Input = unknown, Output = Input> {
4
3
  /** The Standard properties. */
@@ -74,5 +73,4 @@ declare namespace StandardSchemaV1 {
74
73
  /** Infers the output type of a Standard. */
75
74
  type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
76
75
  }
77
- //#endregion
78
76
  export { StandardSchemaV1 as t };
@@ -1,4 +1,3 @@
1
- //#region ../../node_modules/.pnpm/birpc@4.2.0/node_modules/birpc/dist/index.d.mts
2
1
  //#region src/messages.d.ts
3
2
  declare const TYPE_REQUEST: "q";
4
3
  interface RpcRequest {
@@ -214,5 +213,4 @@ interface BirpcGroup<RemoteFunctions extends object = Record<string, unknown>, L
214
213
  readonly broadcast: BirpcGroupReturn<RemoteFunctions, Proxify>;
215
214
  updateChannels: (fn?: ((channels: ChannelOptions[]) => void)) => BirpcReturn<RemoteFunctions, LocalFunctions, Proxify>[];
216
215
  }
217
- //#endregion
218
216
  export { ChannelOptions as a, BirpcReturn as i, BirpcGroup as n, EventOptions as o, BirpcOptions as r, BirpcFn as t };