@astralbeam/sdk 0.15.2 → 0.16.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
@@ -29,7 +29,7 @@ Without npm or a bundler, import the same entry from jsDelivr in a module script
29
29
 
30
30
  ```html
31
31
  <script type="module">
32
- import { mountAstralBeamChat } from "https://cdn.jsdelivr.net/npm/@astralbeam/sdk@0.15.2/dist/client.js"
32
+ import { mountAstralBeamChat } from "https://cdn.jsdelivr.net/npm/@astralbeam/sdk@0.16.0/dist/client.js"
33
33
 
34
34
  mountAstralBeamChat(document.getElementById("sidebar"), {})
35
35
  </script>
@@ -91,20 +91,28 @@ Every option is also a prop on `<AstralBeamChat>`. `handle.update(options)` appl
91
91
  | Option | Default | Meaning |
92
92
  | --- | --- | --- |
93
93
  | `agentId` | organization's default | `agent_<orgId>_<id>`, copied from the dashboard |
94
+ | `threadId` | `"auto"` | Restore this tab's selection, use `"new"` for a fresh chat, or pass a saved thread UUID |
94
95
  | `apiUrl` | `https://astralbeam.ai/api` | Base URL of the AstralBeam API. The widget calls `/v1/chat` there |
95
96
  | `fetchAstralBeamToken` | `{ url: "/api/astralbeam/token" }` | Chat auth token endpoint as `{ url, ...RequestInit }`, or a minter |
96
- | `title`, `showHeader` | `"AstralBeam"`, `true` | Header text, and whether the header and reset button show |
97
- | `emptyTitle`, `emptyDescription` | generic copy | Headline and subtitle of the empty transcript |
97
+ | `title`, `showHeader` | `"AstralBeam"`, `true` | Header text, and whether the header with its chat history and new chat buttons shows |
98
+ | `showConversationTitle` | `false` | Bar with a titled conversation's title and a rename, delete, and Copy Markdown menu |
99
+ | `emptyHeadline`, `emptyDescription` | generic copy | Headline and subtitle of the empty transcript |
98
100
  | `colorScheme`, `theme` | `"system"`, built-in palette | Light/dark/system, and shadcn token overrides |
99
101
  | `customCss` | None | Trusted CSS inside the widget's Shadow DOM |
100
102
  | `attachments` | `true` | `false` hides the feature, or pass limits |
101
103
  | `tools`, `widgets` | none | What the agent can do and draw in your app |
102
104
  | `sandboxPanel` | `false` | Collected sandbox panel: files with downloads, command log |
103
- | `header`, `empty`, `composerActions` | widget's own chrome | Host-rendered replacements (React props. `slots` on the handle) |
105
+ | `header`, `headerActions`, `empty`, `composerActions` | widget's own chrome | Host-rendered replacements (React props. `slots` on the handle) |
104
106
  | `debug` | `false` | Log SDK actions in the browser, with server logs in development only |
105
107
 
106
108
  A `ref` on `<AstralBeamChat>` (and the vanilla handle) exposes `reset()` and `stop()` for hosts that draw their own controls.
107
109
 
110
+ 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.
111
+
112
+ The headless session exposes conversation navigation, search, and pagination. With `useAstralBeamChat`, access these through `chat.core`, for example `chat.core.openThread(threadId)`. History loads a page at a time. `reset()` starts a new chat and keeps the saved one.
113
+
114
+ By default, `threadId: "auto"` restores this tab's selection after reload using session storage, scoped to the current account and API. A fresh, independently opened tab starts a new chat. Use `threadId: "new"` to bypass restoration, or pass a saved thread UUID. The widget's unsent text per thread stays in local storage and never sends automatically. Selected attachments remain in memory. The host owns sidebar visibility and can persist it separately in session storage.
115
+
108
116
  ## Tools and widgets
109
117
 
110
118
  A tool does something: its `execute` runs in your page. A widget shows something: its `render` draws your UI into the conversation. Both are declared with a `description` and a `parameters` schema. See [Tools and widgets](https://astralbeam.ai/docs/sdk/tools-and-widgets).
@@ -139,7 +147,7 @@ widgets: {
139
147
  | [Getting started](https://astralbeam.ai/docs/sdk/getting-started) | install, mount, layout requirements. |
140
148
  | [Script tag](https://astralbeam.ai/docs/sdk/script-tag) | loading from jsDelivr without a bundler, and Ruby on Rails. |
141
149
  | [Authentication](https://astralbeam.ai/docs/sdk/authentication) | the token endpoint, its security rules, and minting in other languages. |
142
- | [Tenant directories](https://astralbeam.ai/docs/sdk/listings) | provisioning, tenant-user and Tenant listings, lifecycle, and options. |
150
+ | [Tenant directories](https://astralbeam.ai/docs/sdk/listings) | provisioning, Tenant and user listings, saved conversation browsing, lifecycle, and options. |
143
151
  | [Configuration](https://astralbeam.ai/docs/sdk/configuration) | every option, and what `update` can change. |
144
152
  | [Theming](https://astralbeam.ai/docs/sdk/theming) | color schemes, CSS tokens, the shadow-root boundary. |
145
153
  | [Tools and widgets](https://astralbeam.ai/docs/sdk/tools-and-widgets) | schemas, live state, rendering into the transcript. |
@@ -151,9 +159,9 @@ widgets: {
151
159
 
152
160
  ## Entry points
153
161
 
154
- Read-only Tenant and TenantUser widgets are available from `/client` and `/react`. See [Tenant directories](https://astralbeam.ai/docs/sdk/listings) for setup and embedding examples.
162
+ Read-only Tenant, TenantUser and conversation widgets are available from `/client` and `/react`. See [Tenant directories](https://astralbeam.ai/docs/sdk/listings) for setup and embedding examples.
155
163
 
156
- There is no root export. Conversation history is not built yet.
164
+ There is no root export. Conversations are saved on the server and can be reopened across clients.
157
165
 
158
166
  | Entry point | Contents | Peer dependency |
159
167
  | ------------------------ | -------------------------------------------- | -------------------- |