@astralbeam/sdk 0.26.0 → 0.28.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.
Files changed (2) hide show
  1. package/README.md +3 -3
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -34,7 +34,7 @@ Without npm or a bundler, import the same entry from jsDelivr in a module script
34
34
  ```html
35
35
  <div id="sidebar" style="height:100dvh"></div>
36
36
  <script type="module">
37
- import { mountAstralBeamChat } from "https://cdn.jsdelivr.net/npm/@astralbeam/sdk@0.26.0/dist/client.js"
37
+ import { mountAstralBeamChat } from "https://cdn.jsdelivr.net/npm/@astralbeam/sdk@0.28.0/dist/client.js"
38
38
 
39
39
  mountAstralBeamChat(document.getElementById("sidebar"), {})
40
40
  </script>
@@ -50,6 +50,8 @@ Without npm or a bundler, import the same entry from jsDelivr in a module script
50
50
 
51
51
  Your server must authenticate the host session and mint a chat token before the widget can chat. Keep the API key server-only. See [Authentication](https://astralbeam.ai/docs/sdk/authentication).
52
52
 
53
+ Replace `getApplicationSession` below with your application's authenticated session lookup. Return the current user and their verified customer-account membership as `session.user` and `session.tenant`.
54
+
53
55
  ```ts
54
56
  import { createAstralBeamToken } from "@astralbeam/sdk/server"
55
57
 
@@ -95,8 +97,6 @@ Pass options as React props or apply a subset with `handle.update(options)`. Pre
95
97
 
96
98
  Most embeds let `<AstralBeamChat {...options} />` manage the session. For external controls, create `chat` with `useAstralBeamChat(options)` and render `<AstralBeamChat chat={chat} />`. Configure authentication and tools on the hook, with widgets and appearance on the view. Call actions directly on `chat` and read state through `chat.getState()`.
97
99
 
98
- **Migration:** replace chat refs and mount-handle commands with session actions. Use `chat` instead of `chat.core`, and `chat.getState()` instead of snapshot fields. Directory handles are unchanged. See Configuration for ownership and JavaScript usage.
99
-
100
100
  Conversations are saved automatically and start private. The widget searches saved conversation titles. Reopening history does not execute earlier tool calls. Disconnecting can interrupt the current response.
101
101
 
102
102
  The headless session exposes conversation navigation, search, and pagination. With `useAstralBeamChat`, access these through `chat`, for example `chat.openThread(threadId)`. History loads a page at a time. `reset()` starts a new chat and keeps the saved one.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astralbeam/sdk",
3
- "version": "0.26.0",
3
+ "version": "0.28.0",
4
4
  "description": "Frontend SDK for AstralBeam: drop-in agent UI, chat streaming, and server helpers",
5
5
  "homepage": "https://astralbeam.ai",
6
6
  "bugs": "https://github.com/AstralBeamAI/astralbeam/issues",