@tung-engineering/agent-platform-web-sdk 0.0.89 → 0.0.90
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 +8 -2
- package/dist/web-sdk.cjs +389 -313
- package/dist/web-sdk.cjs.map +1 -1
- package/dist/web-sdk.min.js +375 -299
- package/dist/web-sdk.min.js.map +1 -1
- package/dist/web-sdk.mjs +16704 -8402
- package/dist/web-sdk.mjs.map +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -58,10 +58,16 @@ destroy(); // removes the FAB, closes any open panels, tears down listeners
|
|
|
58
58
|
|
|
59
59
|
## Quick start (script tag, no build step)
|
|
60
60
|
|
|
61
|
-
You can also load the SDK directly from your Agent Platform backend without installing anything:
|
|
61
|
+
You can also load the SDK directly from your Agent Platform backend without installing anything. Pin the URL to a specific published version and verify it with Subresource Integrity so a compromised/mutated host asset can't silently execute in your page:
|
|
62
62
|
|
|
63
63
|
```html
|
|
64
|
-
|
|
64
|
+
<!-- TODO(security): CI must compute and inject the real sha384 integrity hash for each
|
|
65
|
+
published web-sdk.min.js version here, regenerated on every rebuild of this package. -->
|
|
66
|
+
<script
|
|
67
|
+
src="https://your-agent-platform-instance.example.com/web-sdk/web-sdk-1.0.0.min.js"
|
|
68
|
+
integrity="sha384-REPLACE_WITH_CI_GENERATED_HASH"
|
|
69
|
+
crossorigin="anonymous"
|
|
70
|
+
></script>
|
|
65
71
|
```
|
|
66
72
|
|
|
67
73
|
This self-boots: it looks for a saved connection in `sessionStorage` and either restores it (showing a ready-to-use FAB) or shows the FAB in "click to connect" mode. Once loaded, the same API is available on `window.AgentPlatformWebSdk`:
|