@astralbeam/sdk 0.21.0 → 0.23.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
@@ -14,22 +14,27 @@ One component in React, one function everywhere else. Full setup, including the
14
14
  import { AstralBeamChat } from "@astralbeam/sdk/react"
15
15
 
16
16
  export function Sidebar() {
17
- return <AstralBeamChat />
17
+ return (
18
+ <aside style={{ height: "100dvh" }}>
19
+ <AstralBeamChat />
20
+ </aside>
21
+ )
18
22
  }
19
23
  ```
20
24
 
21
25
  ```ts
22
26
  import { mountAstralBeamChat } from "@astralbeam/sdk/client"
23
27
 
24
- const handle = mountAstralBeamChat(document.getElementById("sidebar"), {})
28
+ const handle = mountAstralBeamChat(document.getElementById("sidebar")!, {})
25
29
  // Update with handle.update({ colorScheme: "dark" }), then clean up with handle.unmount().
26
30
  ```
27
31
 
28
32
  Without npm or a bundler, import the same entry from jsDelivr in a module script. Pin an exact version and the full `/dist/client.js` path, because the loader imports its lazy chunks relative to itself. See [Script tag](https://astralbeam.ai/docs/sdk/script-tag).
29
33
 
30
34
  ```html
35
+ <div id="sidebar" style="height:100dvh"></div>
31
36
  <script type="module">
32
- import { mountAstralBeamChat } from "https://cdn.jsdelivr.net/npm/@astralbeam/sdk@0.21.0/dist/client.js"
37
+ import { mountAstralBeamChat } from "https://cdn.jsdelivr.net/npm/@astralbeam/sdk@0.23.0/dist/client.js"
33
38
 
34
39
  mountAstralBeamChat(document.getElementById("sidebar"), {})
35
40
  </script>
@@ -86,28 +91,7 @@ After acquiring a token, components call `POST /api/v1/me` and renew before expi
86
91
 
87
92
  ## Options
88
93
 
89
- Every option is also a prop on `<AstralBeamChat>`. `handle.update(options)` applies any subset in place, and no option is fixed at mount. Details in [Configuration](https://astralbeam.ai/docs/sdk/configuration).
90
-
91
- | Option | Default | Meaning |
92
- | --- | --- | --- |
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 |
95
- | `apiUrl` | `https://astralbeam.ai/api` | Base URL of the AstralBeam API. The widget calls `/v1/chat` there |
96
- | `fetchAstralBeamToken` | `{ url: "/api/astralbeam/token" }` | Chat auth token endpoint as `{ url, ...RequestInit }`, or a minter |
97
- | `title`, `showHeader` | `"AstralBeam"`, `true` | Header text, and whether the header with its chat history and new chat buttons shows |
98
- | `onClose` | none | Adds an X button and fullscreen chat at widths up to 900px. The host hides or unmounts chat in this callback |
99
- | `resizable` | `true` | Enables the resize edge and keyboard resizing |
100
- | `defaultWidth` | host's initial width | Width in pixels, or `"100%"` for available width, when no saved override exists |
101
- | `resizeContainer` | mount's parent | `() => HTMLElement \| null` returning the stable container that limits available width |
102
- | `showConversationTitle` | `false` | Bar with a titled conversation's title and a rename, delete, and Copy Markdown menu |
103
- | `emptyHeadline`, `emptyDescription` | generic copy | Headline and subtitle of the empty transcript |
104
- | `colorScheme`, `theme` | `"system"`, built-in palette | Light/dark/system, and shadcn token overrides |
105
- | `customCss` | None | Trusted CSS inside the widget's Shadow DOM |
106
- | `attachments` | `true` | `false` hides the feature, or pass limits |
107
- | `tools`, `widgets` | none | What the agent can do and draw in your app |
108
- | `sandboxPanel` | `false` | Collected sandbox panel: files with downloads, command log |
109
- | `header`, `headerActions`, `empty`, `composerActions` | widget's own chrome | Host-rendered replacements (React props. `slots` on the handle) |
110
- | `debug` | `false` | Log SDK actions in the browser, with server logs in development only |
94
+ Pass options as React props or apply a subset with `handle.update(options)`. Presentation changes preserve chat. Changing `threadId` selects a conversation, and changing `apiUrl` clears the previous deployment's state. See [Configuration](https://astralbeam.ai/docs/sdk/configuration) for all options, defaults, layout, and chrome slots.
111
95
 
112
96
  A `ref` on `<AstralBeamChat>` (and the vanilla handle) exposes `reset()` and `stop()` for hosts that draw their own controls.
113
97
 
@@ -145,14 +129,16 @@ widgets: {
145
129
  - Only a Standard Schema validates input in the browser. With plain JSON Schema, treat input as untrusted.
146
130
  - Return plain JSON values from tools, with no `undefined` fields. If a result cannot be sent, the action may still have happened.
147
131
 
148
- ## Documentation
132
+ ## MCP connections
149
133
 
150
- Remote tools appear under **MCP connections** in the authenticated Tenant widget. Organization admins configure the available MCP servers. Each TenantUser creates their own connection to a server. Public endpoints, static headers and OAuth are supported. Tool results follow the conversation's visibility and retention rules. Disconnect clears credentials locally.
134
+ Remote tools appear under **MCP connections** in the authenticated Tenant widget. Organization admins configure the available MCP servers. Each TenantUser creates their own connection to a server. Public endpoints, static headers and OAuth are supported. Tool results follow the conversation's visibility and retention rules. Disconnect removes the saved connection and its credentials from AstralBeam.
151
135
 
152
136
  Headless consumers can use `chat.getMcpCatalog()`, `chat.manageMcpConnection(operation)` and `chat.authorizeMcpConnection({ mcpServerId, id? })`. Start OAuth from a user gesture to open its popup. Browser binding and completion use the authenticated session. Server tool titles arrive in `state.serverToolTitles`, independently of host tool execution.
153
137
 
154
138
  Reuse the dashboard's server list and form with `AstralBeamMcpServers` from `/react` or `mountAstralBeamMcpServers` from `/client`. Supply the server list and authorized write callbacks. See [MCP server management](https://astralbeam.ai/docs/sdk/configuration#mcp-server-management).
155
139
 
140
+ ## Documentation
141
+
156
142
  | Guide | Covers |
157
143
  | --- | --- |
158
144
  | [API client](https://astralbeam.ai/docs/sdk/api) | Typed resource and chat requests with API keys or JWTs. |
@@ -173,13 +159,13 @@ Reuse the dashboard's server list and form with `AstralBeamMcpServers` from `/re
173
159
 
174
160
  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.
175
161
 
176
- Directory results stay fresh for 30 seconds, then refresh in the background when the tab becomes visible or the network reconnects. Unused queries expire after five minutes. For reuse across mounts, keep a stable session `cacheKey`, replacing it on sign-out or account changes. Each mount still authenticates. Use `refresh()` after writes.
162
+ React directory refs expose `refresh()` and `reset()`, both returning `Promise<void>`. Use props for updates and conditional rendering to unmount. Vanilla handles also expose `update()` and `unmount()`. Unmount during sign-out or identity changes. See the <a href="https://astralbeam.ai/docs/sdk/listings#account-changes-and-lifecycle" target="_blank" rel="noopener noreferrer">lifecycle contract</a> for authentication, caching, remount reuse, and action completion.
177
163
 
178
164
  There is no root export.
179
165
 
180
166
  | Entry point | Contents | Peer dependency |
181
167
  | ------------------------ | -------------------------------------------- | -------------------- |
182
- | `@astralbeam/sdk/client` | Chat and Tenant directory mounts | none |
168
+ | `@astralbeam/sdk/client` | Chat, directory, and MCP server mounts | none |
183
169
  | `@astralbeam/sdk/core` | `createAstralBeamChat`, the headless session | none |
184
170
  | `@astralbeam/sdk/react` | Chat hooks and isolated UI wrappers | `react`, `react-dom` |
185
171
  | `@astralbeam/sdk/server` | Tenant and organization token minters | none |
@@ -0,0 +1 @@
1
+ async function e(e,t){let n=Promise.withResolvers(),r=()=>n.reject(t.reason);t.addEventListener(`abort`,r,{once:!0}),t.aborted&&r();try{return await Promise.race([e,n.promise])}finally{t.removeEventListener(`abort`,r)}}export{e as t};
@@ -309,6 +309,24 @@ const updateTenantUser = (tenantId, id, updateTenantUserInput, options) => {
309
309
  body: JSON.stringify(updateTenantUserInput)
310
310
  });
311
311
  };
312
+ const getGetTenantUserUsageUrl = (tenantId, params) => {
313
+ const normalizedParams = new URLSearchParams();
314
+ Object.entries(params || {}).forEach(([key, value]) => {
315
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
316
+ });
317
+ const stringifiedParams = normalizedParams.toString();
318
+ return stringifiedParams.length > 0 ? `/api/v1/tenants/${encodeURIComponent(String(tenantId))}/tenant_users/usage?${stringifiedParams}` : `/api/v1/tenants/${encodeURIComponent(String(tenantId))}/tenant_users/usage`;
319
+ };
320
+ /**
321
+ * Read usage in USD for up to 100 users within one Tenant over a positive time range no longer than 93 days. start is inclusive and end is exclusive. Supply ISO 8601 timestamps with an explicit timezone and at most millisecond precision. Only Organization API keys and organization owners or developers may read usage. Missing and out-of-scope user IDs are omitted. Existing users with no settled replies in the range return zero. Results are computed at request time from retained settled replies. Drafts and deleted conversations are excluded, and older replies without saved costs use current rates.
322
+ * @summary Get TenantUser usage
323
+ */
324
+ const getTenantUserUsage = (tenantId, params, options) => {
325
+ return astralBeamApiFetch(getGetTenantUserUsageUrl(tenantId, params), {
326
+ ...options,
327
+ method: "GET"
328
+ });
329
+ };
312
330
  const getGetOrganizationUrl = () => {
313
331
  return `/api/v1/organization`;
314
332
  };
@@ -816,4 +834,4 @@ const personalMcpCompleteAuthorization = (id, personalMcpCompleteAuthorizationBo
816
834
  });
817
835
  };
818
836
  //#endregion
819
- export { getPersonalMcpTestConnectionUrl as $, getGetChatConfigUrl as A, searchChatTenantUsers as At, getListChatThreadsUrl as B, DEFAULT_CHAT_AUTH_TOKEN_URL as Bt, getChatThread as C, personalMcpDisconnectConnection as Ct, getCreateTenantUserUrl as D, removeChatParticipant as Dt, getCreateTenantUrl as E, personalMcpTestConnection as Et, getGetTenantUrl as F, uploadChatFile as Ft, getOrganization as G, getListThreadMessagesUrl as H, getGetTenantUserUrl as I, astralBeamChatFetch as It, getPersonalMcpCompleteAuthorizationUrl as J, getPersonalMcpAuthorizeConnectionUrl as K, getGetThreadAttachmentUrl as L, isAstralBeamApiError as Lt, getGetChatUsageUrl as M, updateChatThread as Mt, getGetCurrentUserUrl as N, updateTenant as Nt, getCurrentUser as O, resolveChatToolResult as Ot, getGetOrganizationUrl as P, updateTenantUser as Pt, getPersonalMcpSetHeadersUrl as Q, getListChatMessagesUrl as R, resolveApiUrl as Rt, getChatConfig as S, personalMcpCreateConnection as St, getCreateChatThreadUrl as T, personalMcpSetHeaders as Tt, getListThreadsUrl as U, getListTenantsUrl as V, DEFAULT_COLOR_SCHEME as Vt, getListUsersForTenantUrl as W, getPersonalMcpDisconnectConnectionUrl as X, getPersonalMcpCreateConnectionUrl as Y, getPersonalMcpGetCatalogUrl as Z, UploadChatFileBodyType as _, listThreads as _t, ChatMessageEncodedRole as a, getTenant as at, createTenantUser as b, personalMcpBindBrowser as bt, ChatThreadEncodedRole as c, getUpdateChatThreadUrl as ct, ListUsersForTenantFilterAdmin as d, getUploadChatFileUrl as dt, getRemoveChatParticipantUrl as et, McpConnectionEncodedAuthState as f, listChatMessages as ft, UploadChatFileBodySourceType as g, listThreadMessages as gt, SetChatParticipantInputEncodedRole as h, listTenants as ht, ChatHistoryPageEncodedThreadRole as i, getSetChatParticipantUrl as it, getGetChatThreadUrl as j, setChatParticipant as jt, getDeleteChatThreadUrl as k, runChat as kt, ChatUsageUsageLimitsItemMetric as l, getUpdateTenantUrl as lt, ResolveChatToolResultInputEncodedResultsItemOutcome as m, listChatThreads as mt, ChatHistoryPageEncodedMessagesItemState as n, getRunChatUrl as nt, ChatMessageEncodedState as o, getTenantUser as ot, McpServerEncodedAuthKind as p, listChatParticipants as pt, getPersonalMcpBindBrowserUrl as q, ChatHistoryPageEncodedPendingInteractionsItemExecutionLocation as r, getSearchChatTenantUsersUrl as rt, ChatParticipantEncodedRole as s, getThreadAttachment as st, ChatHistoryPageEncodedMessagesItemRole as t, getResolveChatToolResultUrl as tt, ChatUsageUsageLimitsItemScope as u, getUpdateTenantUserUrl as ut, createChatThread as v, listUsersForTenant as vt, getChatUsage as w, personalMcpGetCatalog as wt, deleteChatThread as x, personalMcpCompleteAuthorization as xt, createTenant as y, personalMcpAuthorizeConnection as yt, getListChatParticipantsUrl as z, DEFAULT_API_URL as zt };
837
+ export { getPersonalMcpSetHeadersUrl as $, getGetChatConfigUrl as A, resolveChatToolResult as At, getListChatParticipantsUrl as B, resolveApiUrl as Bt, getChatThread as C, personalMcpCompleteAuthorization as Ct, getCreateTenantUserUrl as D, personalMcpSetHeaders as Dt, getCreateTenantUrl as E, personalMcpGetCatalog as Et, getGetTenantUrl as F, updateTenant as Ft, getListUsersForTenantUrl as G, getListTenantsUrl as H, DEFAULT_CHAT_AUTH_TOKEN_URL as Ht, getGetTenantUserUrl as I, updateTenantUser as It, getPersonalMcpBindBrowserUrl as J, getOrganization as K, getGetTenantUserUsageUrl as L, uploadChatFile as Lt, getGetChatUsageUrl as M, searchChatTenantUsers as Mt, getGetCurrentUserUrl as N, setChatParticipant as Nt, getCurrentUser as O, personalMcpTestConnection as Ot, getGetOrganizationUrl as P, updateChatThread as Pt, getPersonalMcpGetCatalogUrl as Q, getGetThreadAttachmentUrl as R, astralBeamChatFetch as Rt, getChatConfig as S, personalMcpBindBrowser as St, getCreateChatThreadUrl as T, personalMcpDisconnectConnection as Tt, getListThreadMessagesUrl as U, DEFAULT_COLOR_SCHEME as Ut, getListChatThreadsUrl as V, DEFAULT_API_URL as Vt, getListThreadsUrl as W, getPersonalMcpCreateConnectionUrl as X, getPersonalMcpCompleteAuthorizationUrl as Y, getPersonalMcpDisconnectConnectionUrl as Z, UploadChatFileBodyType as _, listTenants as _t, ChatMessageEncodedRole as a, getSetChatParticipantUrl as at, createTenantUser as b, listUsersForTenant as bt, ChatThreadEncodedRole as c, getTenantUserUsage as ct, ListUsersForTenantFilterAdmin as d, getUpdateTenantUrl as dt, getPersonalMcpTestConnectionUrl as et, McpConnectionEncodedAuthState as f, getUpdateTenantUserUrl as ft, UploadChatFileBodySourceType as g, listChatThreads as gt, SetChatParticipantInputEncodedRole as h, listChatParticipants as ht, ChatHistoryPageEncodedThreadRole as i, getSearchChatTenantUsersUrl as it, getGetChatThreadUrl as j, runChat as jt, getDeleteChatThreadUrl as k, removeChatParticipant as kt, ChatUsageUsageLimitsItemMetric as l, getThreadAttachment as lt, ResolveChatToolResultInputEncodedResultsItemOutcome as m, listChatMessages as mt, ChatHistoryPageEncodedMessagesItemState as n, getResolveChatToolResultUrl as nt, ChatMessageEncodedState as o, getTenant as ot, McpServerEncodedAuthKind as p, getUploadChatFileUrl as pt, getPersonalMcpAuthorizeConnectionUrl as q, ChatHistoryPageEncodedPendingInteractionsItemExecutionLocation as r, getRunChatUrl as rt, ChatParticipantEncodedRole as s, getTenantUser as st, ChatHistoryPageEncodedMessagesItemRole as t, getRemoveChatParticipantUrl as tt, ChatUsageUsageLimitsItemScope as u, getUpdateChatThreadUrl as ut, createChatThread as v, listThreadMessages as vt, getChatUsage as w, personalMcpCreateConnection as wt, deleteChatThread as x, personalMcpAuthorizeConnection as xt, createTenant as y, listThreads as yt, getListChatMessagesUrl as z, isAstralBeamApiError as zt };
package/dist/api.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { $ as ListChatThreadsParams, $n as resolveChatToolResult, $t as getCurrentUser, A as ChatThreadPage, An as getTenant, At as TenantUserRecordEncoded, B as CreateTenantUserInput, Bn as listTenants, Bt as UploadChatFileBodySourceType, C as ChatRunInputData, Cn as getPersonalMcpSetHeadersUrl, Ct as SearchChatTenantUsersParams, D as ChatTenantUserPage, Dn as getRunChatUrl, Dt as TenantRecordEncoded, E as ChatTenantUserEncoded, En as getResolveChatToolResultUrl, Et as TenantPage, F as ChatUsageUsageLimitsItemMetric, Fn as getUpdateTenantUserUrl, Ft as UpdateTenantUserInput, G as DirectoryThreadEncodedParticipantsItem, Gn as personalMcpBindBrowser, Gt as createTenantUser, H as CurrentUser, Hn as listThreads, Ht as UploadedChatFile, I as ChatUsageUsageLimitsItemScope, In as getUploadChatFileUrl, It as UpdateTenantUserInputMetadata, J as GetChatConfigParams, Jn as personalMcpDisconnectConnection, Jt as getChatThread, K as DirectoryThreadHistoryPage, Kn as personalMcpCompleteAuthorization, Kt as deleteChatThread, L as CreateChatThreadInputEncoded, Ln as listChatMessages, Lt as UploadChatFileBody, M as ChatToolResultReceiptEncodedUsageLimit, Mn as getThreadAttachment, Mt as UpdateChatThreadInputEncoded, N as ChatUsage, Nn as getUpdateChatThreadUrl, Nt as UpdateTenantInput, O as ChatThreadEncoded, On as getSearchChatTenantUsersUrl, Ot as TenantRecordEncodedMetadata, P as ChatUsageUsageLimitsItem, Pn as getUpdateTenantUrl, Pt as UpdateTenantInputMetadata, Q as ListChatParticipantsParams, Qn as removeChatParticipant, Qt as getCreateTenantUserUrl, R as CreateTenantInput, Rn as listChatParticipants, Rt as UploadChatFileBodyMetadata, S as ChatRunInput, Sn as getPersonalMcpGetCatalogUrl, St as ResolveChatToolResultInputEncodedResultsItemOutcome, T as ChatSubmissionReceiptEncoded, Tn as getRemoveChatParticipantUrl, Tt as SetChatParticipantInputEncodedRole, U as DeleteChatThreadParams, Un as listUsersForTenant, Ut as createChatThread, V as CreateTenantUserInputMetadata, Vn as listThreadMessages, Vt as UploadChatFileBodyType, W as DirectoryThreadEncoded, Wn as personalMcpAuthorizeConnection, Wt as createTenant, X as GetThreadAttachmentParams, Xn as personalMcpSetHeaders, Xt as getCreateChatThreadUrl, Y as GetChatUsageParams, Yn as personalMcpGetCatalog, Yt as getChatUsage, Z as ListChatMessagesParams, Zn as personalMcpTestConnection, Zt as getCreateTenantUrl, _ as ChatMessageEncodedRole, _n as getPersonalMcpAuthorizeConnectionUrl, _t as PersonalMcpSetHeadersBodyHeaders, a as ChatConfigurationCapabilities, an as getGetOrganizationUrl, ar as updateTenantUser, at as McpConnectionEncoded, b as ChatParticipantEncodedRole, bn as getPersonalMcpCreateConnectionUrl, bt as ResolveChatToolResultInputEncoded, c as ChatHistoryPageEncodedMessagesItemPartsItem, cn as getGetThreadAttachmentUrl, cr as ApiOptions, ct as McpServerEncodedAuthKind, d as ChatHistoryPageEncodedPendingInteractionsItem, dn as getListChatThreadsUrl, dr as JwtOptions, dt as PersonalMcpAuthorizeConnection200Attempt, en as getDeleteChatThreadUrl, er as runChat, et as ListTenantsParams, f as ChatHistoryPageEncodedPendingInteractionsItemExecutionLocation, fn as getListTenantsUrl, fr as isAstralBeamApiError, ft as PersonalMcpBindBrowserBody, g as ChatMessageEncodedPartsItem, gn as getOrganization, gt as PersonalMcpSetHeadersBody, h as ChatMessageEncoded, hn as getListUsersForTenantUrl, ht as PersonalMcpGetCatalog200, i as ChatConfiguration, in as getGetCurrentUserUrl, ir as updateTenant, it as ListUsersForTenantParams, j as ChatToolResultReceiptEncoded, jn as getTenantUser, jt as TenantUserRecordEncodedMetadata, k as ChatThreadEncodedRole, kn as getSetChatParticipantUrl, kt as TenantUserPage, l as ChatHistoryPageEncodedMessagesItemRole, ln as getListChatMessagesUrl, lr as ApiRequestOptions, lt as Organization, m as ChatHistoryPageEncodedThreadRole, mn as getListThreadsUrl, mt as PersonalMcpCreateConnectionBody, n as AstralBeamApiErrorIssuesItem, nn as getGetChatThreadUrl, nr as setChatParticipant, nt as ListThreadsParams, o as ChatHistoryPageEncoded, on as getGetTenantUrl, or as uploadChatFile, ot as McpConnectionEncodedAuthState, p as ChatHistoryPageEncodedThread, pn as getListThreadMessagesUrl, pt as PersonalMcpCompleteAuthorizationBody, q as DirectoryThreadPage, qn as personalMcpCreateConnection, qt as getChatConfig, r as AstralBeamApiErrorUsageLimit, rn as getGetChatUsageUrl, rr as updateChatThread, rt as ListUsersForTenantFilterAdmin, s as ChatHistoryPageEncodedMessagesItem, sn as getGetTenantUserUrl, sr as ApiKeyOptions, st as McpServerEncoded, t as AstralBeamApiError$1, tn as getGetChatConfigUrl, tr as searchChatTenantUsers, tt as ListThreadMessagesParams, u as ChatHistoryPageEncodedMessagesItemState, un as getListChatParticipantsUrl, ur as AstralBeamApiError, ut as PersonalMcpAuthorizeConnection200, v as ChatMessageEncodedState, vn as getPersonalMcpBindBrowserUrl, vt as PersonalMcpTestConnection200, w as ChatRunInputForwardedProps, wn as getPersonalMcpTestConnectionUrl, wt as SetChatParticipantInputEncoded, x as ChatParticipantPage, xn as getPersonalMcpDisconnectConnectionUrl, xt as ResolveChatToolResultInputEncodedResultsItem, y as ChatParticipantEncoded, yn as getPersonalMcpCompleteAuthorizationUrl, yt as RemoveChatParticipantParams, z as CreateTenantInputMetadata, zn as listChatThreads, zt as UploadChatFileBodySource } from "./index-Bc8nJgEh.js";
2
- export { type ApiKeyOptions, type ApiOptions, type ApiRequestOptions, AstralBeamApiError, type AstralBeamApiError$1 as AstralBeamApiErrorBody, AstralBeamApiErrorIssuesItem, AstralBeamApiErrorUsageLimit, ChatConfiguration, ChatConfigurationCapabilities, ChatHistoryPageEncoded, ChatHistoryPageEncodedMessagesItem, ChatHistoryPageEncodedMessagesItemPartsItem, ChatHistoryPageEncodedMessagesItemRole, ChatHistoryPageEncodedMessagesItemState, ChatHistoryPageEncodedPendingInteractionsItem, ChatHistoryPageEncodedPendingInteractionsItemExecutionLocation, ChatHistoryPageEncodedThread, ChatHistoryPageEncodedThreadRole, ChatMessageEncoded, ChatMessageEncodedPartsItem, ChatMessageEncodedRole, ChatMessageEncodedState, ChatParticipantEncoded, ChatParticipantEncodedRole, ChatParticipantPage, ChatRunInput, ChatRunInputData, ChatRunInputForwardedProps, ChatSubmissionReceiptEncoded, ChatTenantUserEncoded, ChatTenantUserPage, ChatThreadEncoded, ChatThreadEncodedRole, ChatThreadPage, ChatToolResultReceiptEncoded, ChatToolResultReceiptEncodedUsageLimit, ChatUsage, ChatUsageUsageLimitsItem, ChatUsageUsageLimitsItemMetric, ChatUsageUsageLimitsItemScope, CreateChatThreadInputEncoded, CreateTenantInput, CreateTenantInputMetadata, CreateTenantUserInput, CreateTenantUserInputMetadata, CurrentUser, DeleteChatThreadParams, DirectoryThreadEncoded, DirectoryThreadEncodedParticipantsItem, DirectoryThreadHistoryPage, DirectoryThreadPage, GetChatConfigParams, GetChatUsageParams, GetThreadAttachmentParams, type JwtOptions, ListChatMessagesParams, ListChatParticipantsParams, ListChatThreadsParams, ListTenantsParams, ListThreadMessagesParams, ListThreadsParams, ListUsersForTenantFilterAdmin, ListUsersForTenantParams, McpConnectionEncoded, McpConnectionEncodedAuthState, McpServerEncoded, McpServerEncodedAuthKind, Organization, PersonalMcpAuthorizeConnection200, PersonalMcpAuthorizeConnection200Attempt, PersonalMcpBindBrowserBody, PersonalMcpCompleteAuthorizationBody, PersonalMcpCreateConnectionBody, PersonalMcpGetCatalog200, PersonalMcpSetHeadersBody, PersonalMcpSetHeadersBodyHeaders, PersonalMcpTestConnection200, RemoveChatParticipantParams, ResolveChatToolResultInputEncoded, ResolveChatToolResultInputEncodedResultsItem, ResolveChatToolResultInputEncodedResultsItemOutcome, SearchChatTenantUsersParams, SetChatParticipantInputEncoded, SetChatParticipantInputEncodedRole, TenantPage, TenantRecordEncoded, TenantRecordEncodedMetadata, TenantUserPage, TenantUserRecordEncoded, TenantUserRecordEncodedMetadata, UpdateChatThreadInputEncoded, UpdateTenantInput, UpdateTenantInputMetadata, UpdateTenantUserInput, UpdateTenantUserInputMetadata, UploadChatFileBody, UploadChatFileBodyMetadata, UploadChatFileBodySource, UploadChatFileBodySourceType, UploadChatFileBodyType, UploadedChatFile, createChatThread, createTenant, createTenantUser, deleteChatThread, getChatConfig, getChatThread, getChatUsage, getCreateChatThreadUrl, getCreateTenantUrl, getCreateTenantUserUrl, getCurrentUser, getDeleteChatThreadUrl, getGetChatConfigUrl, getGetChatThreadUrl, getGetChatUsageUrl, getGetCurrentUserUrl, getGetOrganizationUrl, getGetTenantUrl, getGetTenantUserUrl, getGetThreadAttachmentUrl, getListChatMessagesUrl, getListChatParticipantsUrl, getListChatThreadsUrl, getListTenantsUrl, getListThreadMessagesUrl, getListThreadsUrl, getListUsersForTenantUrl, getOrganization, getPersonalMcpAuthorizeConnectionUrl, getPersonalMcpBindBrowserUrl, getPersonalMcpCompleteAuthorizationUrl, getPersonalMcpCreateConnectionUrl, getPersonalMcpDisconnectConnectionUrl, getPersonalMcpGetCatalogUrl, getPersonalMcpSetHeadersUrl, getPersonalMcpTestConnectionUrl, getRemoveChatParticipantUrl, getResolveChatToolResultUrl, getRunChatUrl, getSearchChatTenantUsersUrl, getSetChatParticipantUrl, getTenant, getTenantUser, getThreadAttachment, getUpdateChatThreadUrl, getUpdateTenantUrl, getUpdateTenantUserUrl, getUploadChatFileUrl, isAstralBeamApiError, listChatMessages, listChatParticipants, listChatThreads, listTenants, listThreadMessages, listThreads, listUsersForTenant, personalMcpAuthorizeConnection, personalMcpBindBrowser, personalMcpCompleteAuthorization, personalMcpCreateConnection, personalMcpDisconnectConnection, personalMcpGetCatalog, personalMcpSetHeaders, personalMcpTestConnection, removeChatParticipant, resolveChatToolResult, runChat, searchChatTenantUsers, setChatParticipant, updateChatThread, updateTenant, updateTenantUser, uploadChatFile };
1
+ import { $ as ListChatThreadsParams, $n as personalMcpGetCatalog, $t as getCreateTenantUrl, A as ChatToolResultReceiptEncoded, An as getRunChatUrl, At as TenantUserRecordEncoded, B as CreateTenantUserInputMetadata, Bn as getUploadChatFileUrl, Bt as UploadChatFileBodyMetadata, C as ChatRunInputForwardedProps, Cn as getPersonalMcpCreateConnectionUrl, Ct as SearchChatTenantUsersParams, D as ChatThreadEncoded, Dn as getPersonalMcpTestConnectionUrl, Dt as TenantRecordEncoded, E as ChatTenantUserPage, En as getPersonalMcpSetHeadersUrl, Et as TenantPage, F as ChatUsageUsageLimitsItemScope, Fn as getTenantUserUsage, Ft as UpdateTenantInput, G as DirectoryThreadHistoryPage, Gn as listThreadMessages, Gt as createChatThread, H as DeleteChatThreadParams, Hn as listChatParticipants, Ht as UploadChatFileBodySourceType, I as CreateChatThreadInputEncoded, In as getThreadAttachment, It as UpdateTenantInputMetadata, J as GetChatUsageParams, Jn as personalMcpAuthorizeConnection, Jt as deleteChatThread, K as DirectoryThreadPage, Kn as listThreads, Kt as createTenant, L as CreateTenantInput, Ln as getUpdateChatThreadUrl, Lt as UpdateTenantUserInput, M as ChatUsage, Mn as getSetChatParticipantUrl, Mt as TenantUserUsage, N as ChatUsageUsageLimitsItem, Nn as getTenant, Nt as TenantUserUsageItemsItem, O as ChatThreadEncodedRole, On as getRemoveChatParticipantUrl, Ot as TenantRecordEncodedMetadata, P as ChatUsageUsageLimitsItemMetric, Pn as getTenantUser, Pt as UpdateChatThreadInputEncoded, Q as ListChatParticipantsParams, Qn as personalMcpDisconnectConnection, Qt as getCreateChatThreadUrl, R as CreateTenantInputMetadata, Rn as getUpdateTenantUrl, Rt as UpdateTenantUserInputMetadata, S as ChatRunInput, Sn as getPersonalMcpCompleteAuthorizationUrl, St as ResolveChatToolResultInputEncodedResultsItemOutcome, T as ChatTenantUserEncoded, Tn as getPersonalMcpGetCatalogUrl, Tt as SetChatParticipantInputEncodedRole, U as DirectoryThreadEncoded, Un as listChatThreads, Ut as UploadChatFileBodyType, V as CurrentUser, Vn as listChatMessages, Vt as UploadChatFileBodySource, W as DirectoryThreadEncodedParticipantsItem, Wn as listTenants, Wt as UploadedChatFile, X as GetThreadAttachmentParams, Xn as personalMcpCompleteAuthorization, Xt as getChatThread, Y as GetTenantUserUsageParams, Yn as personalMcpBindBrowser, Yt as getChatConfig, Z as ListChatMessagesParams, Zn as personalMcpCreateConnection, Zt as getChatUsage, _ as ChatMessageEncodedRole, _n as getListThreadsUrl, _t as PersonalMcpSetHeadersBodyHeaders, a as ChatConfigurationCapabilities, an as getGetChatUsageUrl, ar as searchChatTenantUsers, at as McpConnectionEncoded, b as ChatParticipantEncodedRole, bn as getPersonalMcpAuthorizeConnectionUrl, bt as ResolveChatToolResultInputEncoded, c as ChatHistoryPageEncodedMessagesItemPartsItem, cn as getGetTenantUrl, cr as updateTenant, ct as McpServerEncodedAuthKind, d as ChatHistoryPageEncodedPendingInteractionsItem, dn as getGetThreadAttachmentUrl, dr as ApiKeyOptions, dt as PersonalMcpAuthorizeConnection200Attempt, en as getCreateTenantUserUrl, er as personalMcpSetHeaders, et as ListTenantsParams, f as ChatHistoryPageEncodedPendingInteractionsItemExecutionLocation, fn as getListChatMessagesUrl, fr as ApiOptions, ft as PersonalMcpBindBrowserBody, g as ChatMessageEncodedPartsItem, gn as getListThreadMessagesUrl, gr as isAstralBeamApiError, gt as PersonalMcpSetHeadersBody, h as ChatMessageEncoded, hn as getListTenantsUrl, hr as JwtOptions, ht as PersonalMcpGetCatalog200, i as ChatConfiguration, in as getGetChatThreadUrl, ir as runChat, it as ListUsersForTenantParams, j as ChatToolResultReceiptEncodedUsageLimit, jn as getSearchChatTenantUsersUrl, jt as TenantUserRecordEncodedMetadata, k as ChatThreadPage, kn as getResolveChatToolResultUrl, kt as TenantUserPage, l as ChatHistoryPageEncodedMessagesItemRole, ln as getGetTenantUserUrl, lr as updateTenantUser, lt as Organization, m as ChatHistoryPageEncodedThreadRole, mn as getListChatThreadsUrl, mr as AstralBeamApiError, mt as PersonalMcpCreateConnectionBody, n as AstralBeamApiErrorIssuesItem, nn as getDeleteChatThreadUrl, nr as removeChatParticipant, nt as ListThreadsParams, o as ChatHistoryPageEncoded, on as getGetCurrentUserUrl, or as setChatParticipant, ot as McpConnectionEncodedAuthState, p as ChatHistoryPageEncodedThread, pn as getListChatParticipantsUrl, pr as ApiRequestOptions, pt as PersonalMcpCompleteAuthorizationBody, q as GetChatConfigParams, qn as listUsersForTenant, qt as createTenantUser, r as AstralBeamApiErrorUsageLimit, rn as getGetChatConfigUrl, rr as resolveChatToolResult, rt as ListUsersForTenantFilterAdmin, s as ChatHistoryPageEncodedMessagesItem, sn as getGetOrganizationUrl, sr as updateChatThread, st as McpServerEncoded, t as AstralBeamApiError$1, tn as getCurrentUser, tr as personalMcpTestConnection, tt as ListThreadMessagesParams, u as ChatHistoryPageEncodedMessagesItemState, un as getGetTenantUserUsageUrl, ur as uploadChatFile, ut as PersonalMcpAuthorizeConnection200, v as ChatMessageEncodedState, vn as getListUsersForTenantUrl, vt as PersonalMcpTestConnection200, w as ChatSubmissionReceiptEncoded, wn as getPersonalMcpDisconnectConnectionUrl, wt as SetChatParticipantInputEncoded, x as ChatParticipantPage, xn as getPersonalMcpBindBrowserUrl, xt as ResolveChatToolResultInputEncodedResultsItem, y as ChatParticipantEncoded, yn as getOrganization, yt as RemoveChatParticipantParams, z as CreateTenantUserInput, zn as getUpdateTenantUserUrl, zt as UploadChatFileBody } from "./index-D8X2hDGe.js";
2
+ export { type ApiKeyOptions, type ApiOptions, type ApiRequestOptions, AstralBeamApiError, type AstralBeamApiError$1 as AstralBeamApiErrorBody, AstralBeamApiErrorIssuesItem, AstralBeamApiErrorUsageLimit, ChatConfiguration, ChatConfigurationCapabilities, ChatHistoryPageEncoded, ChatHistoryPageEncodedMessagesItem, ChatHistoryPageEncodedMessagesItemPartsItem, ChatHistoryPageEncodedMessagesItemRole, ChatHistoryPageEncodedMessagesItemState, ChatHistoryPageEncodedPendingInteractionsItem, ChatHistoryPageEncodedPendingInteractionsItemExecutionLocation, ChatHistoryPageEncodedThread, ChatHistoryPageEncodedThreadRole, ChatMessageEncoded, ChatMessageEncodedPartsItem, ChatMessageEncodedRole, ChatMessageEncodedState, ChatParticipantEncoded, ChatParticipantEncodedRole, ChatParticipantPage, ChatRunInput, ChatRunInputForwardedProps, ChatSubmissionReceiptEncoded, ChatTenantUserEncoded, ChatTenantUserPage, ChatThreadEncoded, ChatThreadEncodedRole, ChatThreadPage, ChatToolResultReceiptEncoded, ChatToolResultReceiptEncodedUsageLimit, ChatUsage, ChatUsageUsageLimitsItem, ChatUsageUsageLimitsItemMetric, ChatUsageUsageLimitsItemScope, CreateChatThreadInputEncoded, CreateTenantInput, CreateTenantInputMetadata, CreateTenantUserInput, CreateTenantUserInputMetadata, CurrentUser, DeleteChatThreadParams, DirectoryThreadEncoded, DirectoryThreadEncodedParticipantsItem, DirectoryThreadHistoryPage, DirectoryThreadPage, GetChatConfigParams, GetChatUsageParams, GetTenantUserUsageParams, GetThreadAttachmentParams, type JwtOptions, ListChatMessagesParams, ListChatParticipantsParams, ListChatThreadsParams, ListTenantsParams, ListThreadMessagesParams, ListThreadsParams, ListUsersForTenantFilterAdmin, ListUsersForTenantParams, McpConnectionEncoded, McpConnectionEncodedAuthState, McpServerEncoded, McpServerEncodedAuthKind, Organization, PersonalMcpAuthorizeConnection200, PersonalMcpAuthorizeConnection200Attempt, PersonalMcpBindBrowserBody, PersonalMcpCompleteAuthorizationBody, PersonalMcpCreateConnectionBody, PersonalMcpGetCatalog200, PersonalMcpSetHeadersBody, PersonalMcpSetHeadersBodyHeaders, PersonalMcpTestConnection200, RemoveChatParticipantParams, ResolveChatToolResultInputEncoded, ResolveChatToolResultInputEncodedResultsItem, ResolveChatToolResultInputEncodedResultsItemOutcome, SearchChatTenantUsersParams, SetChatParticipantInputEncoded, SetChatParticipantInputEncodedRole, TenantPage, TenantRecordEncoded, TenantRecordEncodedMetadata, TenantUserPage, TenantUserRecordEncoded, TenantUserRecordEncodedMetadata, TenantUserUsage, TenantUserUsageItemsItem, UpdateChatThreadInputEncoded, UpdateTenantInput, UpdateTenantInputMetadata, UpdateTenantUserInput, UpdateTenantUserInputMetadata, UploadChatFileBody, UploadChatFileBodyMetadata, UploadChatFileBodySource, UploadChatFileBodySourceType, UploadChatFileBodyType, UploadedChatFile, createChatThread, createTenant, createTenantUser, deleteChatThread, getChatConfig, getChatThread, getChatUsage, getCreateChatThreadUrl, getCreateTenantUrl, getCreateTenantUserUrl, getCurrentUser, getDeleteChatThreadUrl, getGetChatConfigUrl, getGetChatThreadUrl, getGetChatUsageUrl, getGetCurrentUserUrl, getGetOrganizationUrl, getGetTenantUrl, getGetTenantUserUrl, getGetTenantUserUsageUrl, getGetThreadAttachmentUrl, getListChatMessagesUrl, getListChatParticipantsUrl, getListChatThreadsUrl, getListTenantsUrl, getListThreadMessagesUrl, getListThreadsUrl, getListUsersForTenantUrl, getOrganization, getPersonalMcpAuthorizeConnectionUrl, getPersonalMcpBindBrowserUrl, getPersonalMcpCompleteAuthorizationUrl, getPersonalMcpCreateConnectionUrl, getPersonalMcpDisconnectConnectionUrl, getPersonalMcpGetCatalogUrl, getPersonalMcpSetHeadersUrl, getPersonalMcpTestConnectionUrl, getRemoveChatParticipantUrl, getResolveChatToolResultUrl, getRunChatUrl, getSearchChatTenantUsersUrl, getSetChatParticipantUrl, getTenant, getTenantUser, getTenantUserUsage, getThreadAttachment, getUpdateChatThreadUrl, getUpdateTenantUrl, getUpdateTenantUserUrl, getUploadChatFileUrl, isAstralBeamApiError, listChatMessages, listChatParticipants, listChatThreads, listTenants, listThreadMessages, listThreads, listUsersForTenant, personalMcpAuthorizeConnection, personalMcpBindBrowser, personalMcpCompleteAuthorization, personalMcpCreateConnection, personalMcpDisconnectConnection, personalMcpGetCatalog, personalMcpSetHeaders, personalMcpTestConnection, removeChatParticipant, resolveChatToolResult, runChat, searchChatTenantUsers, setChatParticipant, updateChatThread, updateTenant, updateTenantUser, uploadChatFile };
package/dist/api.js CHANGED
@@ -1 +1 @@
1
- export { t as ChatHistoryPageEncodedMessagesItemRole, n as ChatHistoryPageEncodedMessagesItemState, r as ChatHistoryPageEncodedPendingInteractionsItemExecutionLocation, i as ChatHistoryPageEncodedThreadRole, a as ChatMessageEncodedRole, o as ChatMessageEncodedState, s as ChatParticipantEncodedRole, c as ChatThreadEncodedRole, l as ChatUsageUsageLimitsItemMetric, u as ChatUsageUsageLimitsItemScope, d as ListUsersForTenantFilterAdmin, f as McpConnectionEncodedAuthState, p as McpServerEncodedAuthKind, m as ResolveChatToolResultInputEncodedResultsItemOutcome, h as SetChatParticipantInputEncodedRole, g as UploadChatFileBodySourceType, _ as UploadChatFileBodyType, v as createChatThread, y as createTenant, b as createTenantUser, x as deleteChatThread, S as getChatConfig, C as getChatThread, w as getChatUsage, T as getCreateChatThreadUrl, E as getCreateTenantUrl, D as getCreateTenantUserUrl, O as getCurrentUser, k as getDeleteChatThreadUrl, A as getGetChatConfigUrl, j as getGetChatThreadUrl, M as getGetChatUsageUrl, N as getGetCurrentUserUrl, P as getGetOrganizationUrl, F as getGetTenantUrl, I as getGetTenantUserUrl, L as getGetThreadAttachmentUrl, R as getListChatMessagesUrl, z as getListChatParticipantsUrl, B as getListChatThreadsUrl, V as getListTenantsUrl, H as getListThreadMessagesUrl, U as getListThreadsUrl, W as getListUsersForTenantUrl, G as getOrganization, K as getPersonalMcpAuthorizeConnectionUrl, q as getPersonalMcpBindBrowserUrl, J as getPersonalMcpCompleteAuthorizationUrl, Y as getPersonalMcpCreateConnectionUrl, X as getPersonalMcpDisconnectConnectionUrl, Z as getPersonalMcpGetCatalogUrl, Q as getPersonalMcpSetHeadersUrl, $ as getPersonalMcpTestConnectionUrl, et as getRemoveChatParticipantUrl, tt as getResolveChatToolResultUrl, nt as getRunChatUrl, rt as getSearchChatTenantUsersUrl, it as getSetChatParticipantUrl, at as getTenant, ot as getTenantUser, st as getThreadAttachment, ct as getUpdateChatThreadUrl, lt as getUpdateTenantUrl, ut as getUpdateTenantUserUrl, dt as getUploadChatFileUrl, Lt as isAstralBeamApiError, ft as listChatMessages, pt as listChatParticipants, mt as listChatThreads, ht as listTenants, gt as listThreadMessages, _t as listThreads, vt as listUsersForTenant, yt as personalMcpAuthorizeConnection, bt as personalMcpBindBrowser, xt as personalMcpCompleteAuthorization, St as personalMcpCreateConnection, Ct as personalMcpDisconnectConnection, wt as personalMcpGetCatalog, Tt as personalMcpSetHeaders, Et as personalMcpTestConnection, Dt as removeChatParticipant, Ot as resolveChatToolResult, kt as runChat, At as searchChatTenantUsers, jt as setChatParticipant, Mt as updateChatThread, Nt as updateTenant, Pt as updateTenantUser, Ft as uploadChatFile } from "./api-qmAF_i2J.js";
1
+ export { t as ChatHistoryPageEncodedMessagesItemRole, n as ChatHistoryPageEncodedMessagesItemState, r as ChatHistoryPageEncodedPendingInteractionsItemExecutionLocation, i as ChatHistoryPageEncodedThreadRole, a as ChatMessageEncodedRole, o as ChatMessageEncodedState, s as ChatParticipantEncodedRole, c as ChatThreadEncodedRole, l as ChatUsageUsageLimitsItemMetric, u as ChatUsageUsageLimitsItemScope, d as ListUsersForTenantFilterAdmin, f as McpConnectionEncodedAuthState, p as McpServerEncodedAuthKind, m as ResolveChatToolResultInputEncodedResultsItemOutcome, h as SetChatParticipantInputEncodedRole, g as UploadChatFileBodySourceType, _ as UploadChatFileBodyType, v as createChatThread, y as createTenant, b as createTenantUser, x as deleteChatThread, S as getChatConfig, C as getChatThread, w as getChatUsage, T as getCreateChatThreadUrl, E as getCreateTenantUrl, D as getCreateTenantUserUrl, O as getCurrentUser, k as getDeleteChatThreadUrl, A as getGetChatConfigUrl, j as getGetChatThreadUrl, M as getGetChatUsageUrl, N as getGetCurrentUserUrl, P as getGetOrganizationUrl, F as getGetTenantUrl, I as getGetTenantUserUrl, L as getGetTenantUserUsageUrl, R as getGetThreadAttachmentUrl, z as getListChatMessagesUrl, B as getListChatParticipantsUrl, V as getListChatThreadsUrl, H as getListTenantsUrl, U as getListThreadMessagesUrl, W as getListThreadsUrl, G as getListUsersForTenantUrl, K as getOrganization, q as getPersonalMcpAuthorizeConnectionUrl, J as getPersonalMcpBindBrowserUrl, Y as getPersonalMcpCompleteAuthorizationUrl, X as getPersonalMcpCreateConnectionUrl, Z as getPersonalMcpDisconnectConnectionUrl, Q as getPersonalMcpGetCatalogUrl, $ as getPersonalMcpSetHeadersUrl, et as getPersonalMcpTestConnectionUrl, tt as getRemoveChatParticipantUrl, nt as getResolveChatToolResultUrl, rt as getRunChatUrl, it as getSearchChatTenantUsersUrl, at as getSetChatParticipantUrl, ot as getTenant, st as getTenantUser, ct as getTenantUserUsage, lt as getThreadAttachment, ut as getUpdateChatThreadUrl, dt as getUpdateTenantUrl, ft as getUpdateTenantUserUrl, pt as getUploadChatFileUrl, zt as isAstralBeamApiError, mt as listChatMessages, ht as listChatParticipants, gt as listChatThreads, _t as listTenants, vt as listThreadMessages, yt as listThreads, bt as listUsersForTenant, xt as personalMcpAuthorizeConnection, St as personalMcpBindBrowser, Ct as personalMcpCompleteAuthorization, wt as personalMcpCreateConnection, Tt as personalMcpDisconnectConnection, Et as personalMcpGetCatalog, Dt as personalMcpSetHeaders, Ot as personalMcpTestConnection, kt as removeChatParticipant, At as resolveChatToolResult, jt as runChat, Mt as searchChatTenantUsers, Nt as setChatParticipant, Pt as updateChatThread, Ft as updateTenant, It as updateTenantUser, Lt as uploadChatFile } from "./api-SpkUzEv3.js";
@@ -1 +1 @@
1
- import{Jn as e,Or as t,Yn as n,qn as r,tt as i,ur as a,wr as o}from"./styles.generated-3vAmuPc7.js";t();var s=r();function c({className:t,size:n=`default`,...r}){return/* @__PURE__ */ (0,s.jsxs)(`div`,{className:e(`group/native-select relative w-fit has-[select:disabled]:opacity-50`,t),"data-slot":`native-select-wrapper`,"data-size":n,children:[/* @__PURE__ */ (0,s.jsx)(`select`,{"data-slot":`native-select`,"data-size":n,className:`h-8 w-full min-w-0 appearance-none rounded-lg border border-input bg-transparent py-1 pe-8 ps-2.5 text-sm transition-colors outline-none select-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[size=sm]:py-0.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,...r}),/* @__PURE__ */ (0,s.jsx)(o,{className:`pointer-events-none absolute top-1/2 end-2.5 size-4 -translate-y-1/2 text-muted-foreground select-none`,"aria-hidden":`true`,"data-slot":`native-select-icon`})]})}function l({className:t,...n}){return/* @__PURE__ */ (0,s.jsx)(`option`,{"data-slot":`native-select-option`,className:e(`bg-[Canvas] text-[CanvasText]`,t),...n})}const u=n(`group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,destructive:`bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20`,outline:`border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`}},defaultVariants:{variant:`default`}});function d({className:t,variant:n=`default`,render:r,...o}){return i({defaultTagName:`span`,props:a({className:e(u({variant:n}),t)},o),render:r,state:{slot:`badge`,variant:n}})}export{c as n,l as r,d as t};
1
+ import{Jn as e,Or as t,Yn as n,qn as r,tt as i,ur as a,wr as o}from"./styles.generated-CwyGUg6r.js";t();var s=r();function c({className:t,size:n=`default`,...r}){return/* @__PURE__ */ (0,s.jsxs)(`div`,{className:e(`group/native-select relative w-fit has-[select:disabled]:opacity-50`,t),"data-slot":`native-select-wrapper`,"data-size":n,children:[/* @__PURE__ */ (0,s.jsx)(`select`,{"data-slot":`native-select`,"data-size":n,className:`h-8 w-full min-w-0 appearance-none rounded-lg border border-input bg-transparent py-1 pe-8 ps-2.5 text-sm transition-colors outline-none select-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[size=sm]:py-0.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,...r}),/* @__PURE__ */ (0,s.jsx)(o,{className:`pointer-events-none absolute top-1/2 end-2.5 size-4 -translate-y-1/2 text-muted-foreground select-none`,"aria-hidden":`true`,"data-slot":`native-select-icon`})]})}function l({className:t,...n}){return/* @__PURE__ */ (0,s.jsx)(`option`,{"data-slot":`native-select-option`,className:e(`bg-[Canvas] text-[CanvasText]`,t),...n})}const u=n(`group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,destructive:`bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20`,outline:`border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`}},defaultVariants:{variant:`default`}});function d({className:t,variant:n=`default`,render:r,...o}){return i({defaultTagName:`span`,props:a({className:e(u({variant:n}),t)},o),render:r,state:{slot:`badge`,variant:n}})}export{c as n,l as r,d as t};
package/dist/client.d.ts CHANGED
@@ -110,14 +110,8 @@ type AstralBeamChatThemeVariables = Record<`--${string}`, string>;
110
110
  interface AstralBeamTokenRequest extends RequestInit {
111
111
  url: string;
112
112
  }
113
- /**
114
- * Where the widget's short-lived chat auth token comes from: an endpoint to POST, or a function that
115
- * mints the token in the host page and returns `{ token }`, optionally as a promise.
116
- *
117
- * Either form runs again on every renewal — near expiry and after a token is rejected — so a
118
- * rotating credential stays current rather than being captured once. A function that returns
119
- * `undefined`, or throws, fails authentication closed; the composer's retry link asks again.
120
- */
113
+ /** Retrieves a server-minted token on acquisition and renewal, including after a token rejection.
114
+ * Returning undefined or throwing fails authentication closed. The composer's retry link asks again. */
121
115
  type AstralBeamTokenSource = AstralBeamTokenRequest | (() => {
122
116
  token: string;
123
117
  } | undefined | Promise<{
@@ -177,12 +171,8 @@ interface MountAstralBeamChatOptions {
177
171
  * hosted cloud; self-hosted deployments must set their own origin.
178
172
  */
179
173
  apiUrl?: string | undefined;
180
- /**
181
- * Where the short-lived chat auth token comes from: `{ url, ...RequestInit }` for a token
182
- * endpoint, or a function that mints `{ token }` in the host page. Read for every token, so a
183
- * change applies to the next one, which is minted when the cached token nears expiry. Default
184
- * `{ url: "/api/astralbeam/token" }`, posted with the page's cookies.
185
- */
174
+ /** Endpoint or callback retrieving a server-minted token, read on each acquisition and renewal.
175
+ * Defaults to POST /api/astralbeam/token with the page's cookies. Never expose API keys here. */
186
176
  fetchAstralBeamToken?: AstralBeamTokenSource | undefined;
187
177
  /** Host-defined tools the agent can call, executed in the host page, keyed by tool name. */
188
178
  tools?: Record<string, ToolDefinition> | undefined;
@@ -213,20 +203,15 @@ interface MountAstralBeamChatOptions {
213
203
  */
214
204
  debug?: boolean | undefined;
215
205
  }
216
- /**
217
- * What the handle's `update` takes: every mount option, none of them fixed. The transport options
218
- * are re-read per request rather than captured, so changing them keeps the transcript and the
219
- * chat session instead of forcing a fresh mount.
220
- */
206
+ /** Updates only supplied options. Presentation changes preserve chat.
207
+ * Changing apiUrl clears the previous session, while threadId selects a conversation. */
221
208
  type AstralBeamChatUpdate = Partial<MountAstralBeamChatOptions>;
222
209
  interface AstralBeamChatHandle {
223
210
  unmount: () => void;
224
- /**
225
- * Merges option changes into the live mount options and applies them in place, keeping the
226
- * transcript, the chat session, and live widget renders. Only the keys given are replaced.
227
- */
211
+ /** Applies supplied options in place. Presentation changes preserve chat.
212
+ * Changing apiUrl clears the previous session, while threadId selects a conversation. */
228
213
  update: (options: AstralBeamChatUpdate) => void;
229
- /** Clears the conversation: transcript, drafts, attachments, and live widget renders. */
214
+ /** Starts a fresh conversation and clears its draft, preserving saved conversations and their drafts. */
230
215
  reset: () => void;
231
216
  /** Stops the in-flight generation, if any; the transcript keeps what already streamed. */
232
217
  stop: () => void;
@@ -306,7 +291,7 @@ interface AstralBeamListingCoreOptions {
306
291
  //#region src/client/listings.d.ts
307
292
  interface AstralBeamListingOptions extends AstralBeamListingCoreOptions {
308
293
  fetchAstralBeamToken: NonNullable<AstralBeamListingCoreOptions["fetchAstralBeamToken"]>;
309
- /** Stable host-session object to reuse directory data across mounts. Replace it on sign-out. */
294
+ /** Host-session boundary for remount reuse. Replacing it resets authentication and view state. */
310
295
  cacheKey?: object | undefined;
311
296
  pageSize?: 20 | 50 | 100 | undefined;
312
297
  title?: string | undefined;
@@ -332,9 +317,10 @@ interface MountAstralBeamThreadListOptions extends AstralBeamListingOptions {
332
317
  type AstralBeamThreadListHandle = AstralBeamListingHandle<MountAstralBeamThreadListOptions>;
333
318
  interface AstralBeamListingHandle<T extends AstralBeamListingOptions = AstralBeamListingOptions> {
334
319
  update(options: Partial<T>): void;
335
- refresh(): void;
336
- /** Clears state and reloads using the ready host session. Unmount during sign-out or account transitions. */
337
- reset(): void;
320
+ /** Waits for this mount's refreshed view, including lazy loading. May reuse valid authentication. */
321
+ refresh(): Promise<void>;
322
+ /** Clears state, reacquires authentication, and waits for the initial view. Requires a ready host session. */
323
+ reset(): Promise<void>;
338
324
  unmount(): void;
339
325
  }
340
326
  type AstralBeamTenantListHandle = AstralBeamListingHandle<MountAstralBeamTenantListOptions>;
@@ -357,6 +343,7 @@ interface McpServerInput {
357
343
  applicationOrigin?: string;
358
344
  requestedScopes: readonly string[];
359
345
  client?: {
346
+ issuer: string;
360
347
  clientId: string;
361
348
  clientSecret?: string;
362
349
  };
package/dist/client.js CHANGED
@@ -1 +1 @@
1
- import{s as e}from"./constants-C-Yp0Vhg.js";import{t}from"./debug-DLDY8CZb.js";function n(e,t,n,r){let i=n.colorScheme??`system`,a=i===`dark`||i===`system`&&r;e.classList.toggle(`dark`,a);for(let n of t)e.style.removeProperty(n);t.clear();let o={...n.theme?.light,...a?n.theme?.dark:void 0};for(let[n,r]of Object.entries(o))n.startsWith(`--`)&&(e.style.setProperty(n,r),t.add(n));return{colorScheme:i,dark:a}}function r(e){return e}function i(e){return e}function a(e,t){return c(e,t,`tenants`)}function o(e,t){return c(e,t,`users`)}function s(e,t){return c(e,t,`threads`)}function c(t,n,r){let i=t.shadowRoot??t.attachShadow({mode:`open`}),a=document.createElement(`div`);a.className=`${e} bg-transparent`,a.style.height=`100%`,i.append(a);let o=matchMedia(`(prefers-color-scheme: dark)`),s={options:{...n},kind:r,shadow:i,container:a,media:o,variables:/* @__PURE__ */ new Set,disposed:!1},c=()=>l(s);return c(),o.addEventListener(`change`,c),u(s),{update:e=>d(s,e),refresh:()=>{!s.disposed&&s.renderer&&s.runtime.refreshListing(s.renderer)},reset:()=>{!s.disposed&&s.renderer&&s.runtime.resetListing(s.renderer)},unmount:()=>f(s,c)}}function l({options:e,media:t,container:r,variables:i}){n(r,i,e,t.matches)}async function u(e){e.retryLoad?.remove();try{if(e.runtime=await import(`./listings-Ce0aH6yf.js`),e.disposed)return;e.renderer=e.runtime.renderListing(e.shadow,e.container,e.options,e.kind)}catch{if(e.disposed)return;e.retryLoad=document.createElement(`button`),e.retryLoad.textContent=`Could not load directory. Retry`,e.retryLoad.onclick=()=>void u(e),e.container.append(e.retryLoad)}}function d(e,t){e.disposed||(e.options={...e.options,...t},l(e),e.renderer&&e.runtime.updateListing(e.renderer,e.options))}function f(e,t){e.disposed||(e.disposed=!0,e.media.removeEventListener(`change`,t),e.renderer&&e.runtime.disposeListing(e.renderer),e.container.remove())}function p(t,r){let i=t.shadowRoot??t.attachShadow({mode:`open`}),a=document.createElement(`div`);a.className=e,i.append(a);let o=matchMedia(`(prefers-color-scheme: dark)`),s=/* @__PURE__ */ new Set,c=r,l=!1,u,d=()=>n(a,s,c,o.matches);d(),o.addEventListener(`change`,d);let f=async()=>{a.replaceChildren();try{let{renderMcpServers:e}=await import(`./mcp-servers-Bl0jxCiZ.js`);l||(u=e(a,c))}catch{if(l)return;let e=document.createElement(`button`);e.textContent=`Could not load MCP servers. Retry`,e.onclick=()=>void f(),a.replaceChildren(e)}};return f(),{update(e){l||(c={...c,...e},d(),u?.update(c))},unmount(){l=!0,o.removeEventListener(`change`,d),u?.unmount(),a.remove()}}}function m(r,i){let a={...i},o=t(a.debug);o?.(`mount`,`mounting chat widget`,{agentId:a.agentId??`(organization default)`,title:a.title??`AstralBeam`,showHeader:a.showHeader??!0,emptyHeadline:a.emptyHeadline??`Ask the assistant`,emptyDescription:a.emptyDescription??`Ask a question or describe what you want to do in this app.`,apiUrl:a.apiUrl??`https://astralbeam.ai/api`,authentication:`configured`,colorScheme:a.colorScheme??`system`,theme:a.theme,tools:Object.keys(a.tools??{}),widgets:Object.keys(a.widgets??{}),attachments:a.attachments??!0});let s=r.shadowRoot??r.attachShadow({mode:`open`}),c=document.createElement(`div`);c.className=e,c.style.height=`100%`,s.append(c);let l=document.createElement(`div`);l.style.cssText=`display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px;font:14px system-ui`;let u=document.createElement(`span`);u.setAttribute(`role`,`status`),u.textContent=`Loading chat…`;let d=document.createElement(`button`);d.type=`button`,d.textContent=`Close chat`,d.style.cssText=`min-width:44px;min-height:44px;padding:8px;font:inherit;cursor:pointer`,d.hidden=!a.onClose,d.onclick=e=>{e.detail<2&&a.onClose?.()},l.append(u,d),c.append(l);let f=matchMedia(`(prefers-color-scheme: dark)`),p=/* @__PURE__ */ new Set,m=()=>{let{colorScheme:e,dark:t}=n(c,p,a,f.matches);o?.(`theme`,`color scheme "${e}" resolved to ${t?`dark`:`light`}`,{themeVariables:[...p]})};m(),f.addEventListener(`change`,m);let h=!1,g;return import(`./widget-Cvh8BS9U.js`).then(({renderChat:e})=>{o?.(`mount`,`chat chunk loaded`),h||(g=e(s,c,a))}).catch(()=>{h||(u.textContent=`Could not load chat. Reload this page to try again.`)}),{update:e=>{a={...a,...e},o=t(a.debug),o?.(`mount`,`options updated`,{changed:Object.keys(e)}),m(),d.hidden=!a.onClose,g?.update(a)},reset:()=>g?.reset(),stop:()=>g?.stop(),unmount:()=>{o?.(`mount`,`unmounting chat widget`),h=!0,f.removeEventListener(`change`,m),g?.dispose(),g=void 0,c.remove()}}}export{r as defineTool,i as defineWidget,m as mountAstralBeamChat,p as mountAstralBeamMcpServers,a as mountAstralBeamTenantList,o as mountAstralBeamTenantUserList,s as mountAstralBeamThreadList};
1
+ import{s as e}from"./constants-C-Yp0Vhg.js";import{t}from"./debug-DLDY8CZb.js";import{t as n}from"./abort-_ZeHSwUG.js";function r(e,t,n,r){let i=n.colorScheme??`system`,a=i===`dark`||i===`system`&&r;e.classList.toggle(`dark`,a);for(let n of t)e.style.removeProperty(n);t.clear();let o={...n.theme?.light,...a?n.theme?.dark:void 0};for(let[n,r]of Object.entries(o))n.startsWith(`--`)&&(e.style.setProperty(n,r),t.add(n));return{colorScheme:i,dark:a}}function i(e){return e}function a(e){return e}function o(e,t){return l(e,t,`tenants`)}function s(e,t){return l(e,t,`users`)}function c(e,t){return l(e,t,`threads`)}function l(t,n,r){let i=t.shadowRoot??t.attachShadow({mode:`open`}),a=document.createElement(`div`);a.className=`${e} bg-transparent`,a.style.height=`100%`,i.append(a);let o=matchMedia(`(prefers-color-scheme: dark)`),s={options:{...n},kind:r,shadow:i,container:a,media:o,variables:/* @__PURE__ */ new Set,disposed:!1},c=()=>u(s);return c(),o.addEventListener(`change`,c),d(s).catch(()=>{}),{update:e=>m(s,e),refresh:()=>p(s,!1),reset:()=>p(s,!0),unmount:()=>h(s,c)}}function u({options:e,media:t,container:n,variables:i}){r(n,i,e,t.matches)}function d(e){return e.loading??=f(e)}async function f(e){e.retryLoad?.remove();try{if(e.runtime=await import(`./listings-CyliP2E5.js`),e.disposed)return;e.renderer=e.runtime.renderListing(e.shadow,e.container,e.options,e.kind,()=>p(e,!1))}catch(t){throw e.loading=void 0,e.disposed||(e.retryLoad=document.createElement(`button`),e.retryLoad.textContent=`Could not load directory. Retry`,e.retryLoad.onclick=()=>void d(e).catch(()=>{}),e.container.append(e.retryLoad)),t}}async function p(e,t){if(e.disposed)throw new DOMException(`Directory unmounted`,`AbortError`);e.action?.abort();let r=new AbortController;e.action=r;try{e.renderer||await n(d(e),r.signal),r.signal.throwIfAborted(),await e.runtime.refreshListing(e.renderer,r.signal,t)}finally{e.action===r&&(e.action=void 0)}}function m(e,t){if(e.disposed)return;let n={...e.options,...t};(n.apiUrl!==e.options.apiUrl||n.cacheKey!==e.options.cacheKey||n.scope!==e.options.scope||n.tenantId!==e.options.tenantId||n.tenantExternalId!==e.options.tenantExternalId)&&e.action?.abort(),e.options=n,u(e),e.renderer&&e.runtime.updateListing(e.renderer,e.options)}function h(e,t){e.disposed||(e.disposed=!0,e.action?.abort(),e.media.removeEventListener(`change`,t),e.renderer&&e.runtime.disposeListing(e.renderer),e.container.remove())}function g(t,n){let i=t.shadowRoot??t.attachShadow({mode:`open`}),a=document.createElement(`div`);a.className=e,i.append(a);let o=matchMedia(`(prefers-color-scheme: dark)`),s=/* @__PURE__ */ new Set,c=n,l=!1,u,d=()=>r(a,s,c,o.matches);d(),o.addEventListener(`change`,d);let f=async()=>{a.replaceChildren();try{let{renderMcpServers:e}=await import(`./mcp-servers-DvCu1KuJ.js`);l||(u=e(a,c))}catch{if(l)return;let e=document.createElement(`button`);e.textContent=`Could not load MCP servers. Retry`,e.onclick=()=>void f(),a.replaceChildren(e)}};return f(),{update(e){l||(c={...c,...e},d(),u?.update(c))},unmount(){l=!0,o.removeEventListener(`change`,d),u?.unmount(),a.remove()}}}function _(n,i){let a={...i},o=t(a.debug);o?.(`mount`,`mounting chat widget`,{agentId:a.agentId??`(organization default)`,title:a.title??`AstralBeam`,showHeader:a.showHeader??!0,emptyHeadline:a.emptyHeadline??`Ask the assistant`,emptyDescription:a.emptyDescription??`Ask a question or describe what you want to do in this app.`,apiUrl:a.apiUrl??`https://astralbeam.ai/api`,authentication:`configured`,colorScheme:a.colorScheme??`system`,theme:a.theme,tools:Object.keys(a.tools??{}),widgets:Object.keys(a.widgets??{}),attachments:a.attachments??!0});let s=n.shadowRoot??n.attachShadow({mode:`open`}),c=document.createElement(`div`);c.className=e,c.style.height=`100%`,s.append(c);let l=document.createElement(`div`);l.style.cssText=`display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px;font:14px system-ui`;let u=document.createElement(`span`);u.setAttribute(`role`,`status`),u.textContent=`Loading chat…`;let d=document.createElement(`button`);d.type=`button`,d.textContent=`Close chat`,d.style.cssText=`min-width:44px;min-height:44px;padding:8px;font:inherit;cursor:pointer`,d.hidden=!a.onClose,d.onclick=e=>{e.detail<2&&a.onClose?.()},l.append(u,d),c.append(l);let f=matchMedia(`(prefers-color-scheme: dark)`),p=/* @__PURE__ */ new Set,m=()=>{let{colorScheme:e,dark:t}=r(c,p,a,f.matches);o?.(`theme`,`color scheme "${e}" resolved to ${t?`dark`:`light`}`,{themeVariables:[...p]})};m(),f.addEventListener(`change`,m);let h=!1,g;return import(`./widget-BYZdWupG.js`).then(({renderChat:e})=>{o?.(`mount`,`chat chunk loaded`),h||(g=e(s,c,a))}).catch(()=>{h||(u.textContent=`Could not load chat. Reload this page to try again.`)}),{update:e=>{a={...a,...e},o=t(a.debug),o?.(`mount`,`options updated`,{changed:Object.keys(e)}),m(),d.hidden=!a.onClose,g?.update(a)},reset:()=>g?.reset(),stop:()=>g?.stop(),unmount:()=>{o?.(`mount`,`unmounting chat widget`),h=!0,f.removeEventListener(`change`,m),g?.dispose(),g=void 0,c.remove()}}}export{i as defineTool,a as defineWidget,_ as mountAstralBeamChat,g as mountAstralBeamMcpServers,o as mountAstralBeamTenantList,s as mountAstralBeamTenantUserList,c as mountAstralBeamThreadList};