The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
docs: align the ::preview description and storage example with shipped behavior
Brooklyn Nicholson20ec564684c3
diff --git a/plugins/plugin_storage.py b/plugins/plugin_storage.pyindex ca3e363a05d..ee32013052d 100644--- a/plugins/plugin_storage.py+++ b/plugins/plugin_storage.py@@ -21,8 +21,12 @@ Usage::state_file = plugin_data_dir("my-plugin") / "state.json"- with plugin_db("my-plugin") as conn: # <data dir>/data.db+ conn = plugin_db("my-plugin") # <data dir>/data.db+ try:conn.execute("CREATE TABLE IF NOT EXISTS ...")+ conn.commit()+ finally:+ conn.close()"""from __future__ import annotationsdiff --git a/website/docs/developer-guide/desktop-plugin-sdk.md b/website/docs/developer-guide/desktop-plugin-sdk.mdindex 45e45dbae21..ce670e1bb07 100644--- a/website/docs/developer-guide/desktop-plugin-sdk.md+++ b/website/docs/developer-guide/desktop-plugin-sdk.md@@ -383,11 +383,16 @@ Rules the host enforces so the surface stays safe:Core ships one directive as the reference consumer: `::preview{file="…"}`renders the workspace HTML file **live inside the message** — a sandboxed-`srcdoc` iframe with an opaque origin (scripts run; no reach into the app,-its storage, or the bridge), optional `height="480"`, with the classic-preview card below it as the rail escape hatch. Non-HTML targets and remote-gateways fall back to the card alone. Tell the agent about your directive in-a skill (that's how it learns to emit it).+`srcdoc` iframe with an opaque origin (scripts run and the widget is fully+interactive; no reach into the app, its storage, or the bridge). The frame+sizes itself to the content (height live, width adopted from the content's+intrinsic span, flush left in the message flow), and a theme prelude hands+the document the app's resolved tokens (`--foreground`, `--muted-foreground`,+`--accent`, `--border`, `--card`), the app font, and a transparent+background — so widget-shaped HTML reads as native while a full page keeps+its own design. Non-HTML targets and remote gateways fall back to the+classic preview card. Tell the agent about your directive in a skill (that's+how it learns to emit it).### Mount-scoped chrome (`Contribute`)