@runtypelabs/persona 3.24.0 → 3.26.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.
package/README.md CHANGED
@@ -525,6 +525,31 @@ inside the subtree is still pierced.
525
525
  > provenance and update steps. Once upstream republishes correctly this can revert to a
526
526
  > normal optional peer dependency.
527
527
 
528
+ ### WebMCP page tools
529
+
530
+ When `webmcp: { enabled: true }` is set, the widget consumes tools the page
531
+ registers on `document.modelContext` (the [WebMCP](https://github.com/webmachinelearning/webmcp)
532
+ producer surface), snapshots them into each request as `clientTools[]`, runs the
533
+ agent's calls on the page, and gates each behind a confirm bubble (override with
534
+ `autoApprove` / `onConfirm`).
535
+
536
+ ```ts
537
+ initAgentWidget({
538
+ // ...config
539
+ webmcp: {
540
+ enabled: true,
541
+ autoApprove: (info) => READ_ONLY_TOOLS.has(info.toolName),
542
+ },
543
+ });
544
+ ```
545
+
546
+ **Using WebMCP against a non-Runtype backend (e.g. the Vercel AI SDK)?** The
547
+ widget's WebMCP loop expects Runtype's proxy wire protocol (a `step_await` pause
548
+ → `/resume` round-trip). See
549
+ [`docs/webmcp-without-runtype.md`](../../docs/webmcp-without-runtype.md) for the
550
+ exact contract and two integration paths, with a runnable Next.js example at
551
+ [`examples/ai-sdk-webmcp/`](../../examples/ai-sdk-webmcp/).
552
+
528
553
  ### DOM Events
529
554
 
530
555
  The widget dispatches custom DOM events that you can listen to for integration with your application: