@syntrologie/runtime-sdk 2.8.0-canary.8 → 2.8.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/CAPABILITIES.md CHANGED
@@ -1284,3 +1284,25 @@ Control when adaptives activate using `DecisionStrategy`:
1284
1284
  - Listen for `action.failed` to handle errors
1285
1285
  - Track `action.applied` for analytics
1286
1286
  - Use EventBus for cross-adaptive coordination
1287
+
1288
+ ### 6. JavaScript API (window.SynOS)
1289
+
1290
+ When generating `content:insertHtml` with interactive elements (buttons, links) that need to control the SDK canvas panel, use the `window.SynOS.handle` API:
1291
+
1292
+ | Method | Description |
1293
+ |--------|-------------|
1294
+ | `window.SynOS.handle.open()` | Open the canvas panel |
1295
+ | `window.SynOS.handle.close()` | Close the canvas panel |
1296
+
1297
+ Example — button that opens the canvas:
1298
+
1299
+ ```json
1300
+ {
1301
+ "kind": "insert_html",
1302
+ "anchorId": ".pricing-heading",
1303
+ "html": "<button onclick='window.SynOS?.handle?.open()'>Help Me Choose</button>",
1304
+ "position": "after"
1305
+ }
1306
+ ```
1307
+
1308
+ **WARNING:** There is NO `window.SynOS.canvas` property. Always use `window.SynOS.handle`.