@astralbeam/sdk 0.30.4 → 0.30.6

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
@@ -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.30.4/dist/client.js"
37
+ import { mountAstralBeamChat } from "https://cdn.jsdelivr.net/npm/@astralbeam/sdk@0.30.6/dist/client.js"
38
38
 
39
39
  mountAstralBeamChat(document.getElementById("sidebar"), {})
40
40
  </script>
@@ -1,12 +1,11 @@
1
- //#region src/lib/constants.ts
1
+ // src/lib/constants.ts
2
2
  /** Base URL of the AstralBeam API when the mount options give none; versioned routes hang off it. */
3
3
  const DEFAULT_API_URL = "https://astralbeam.ai/api";
4
4
  /** Host endpoint that mints chat JWTs when the mount options give none. */
5
5
  const DEFAULT_CHAT_AUTH_TOKEN_URL = "/api/astralbeam/token";
6
6
  /** Color scheme used when the mount options and the React prop give none. */
7
7
  const DEFAULT_COLOR_SCHEME = "system";
8
- //#endregion
9
- //#region src/api/api.ts
8
+ // src/api/api.ts
10
9
  function isAstralBeamApiError(error) {
11
10
  return error instanceof Error && error.name === "AstralBeamApiError" && "status" in error && typeof error.status === "number";
12
11
  }
@@ -68,8 +67,7 @@ async function astralBeamResourceFetch(path, options) {
68
67
  function astralBeamChatFetch(path, options) {
69
68
  return apiResponse(path, options);
70
69
  }
71
- //#endregion
72
- //#region src/api/generated/api.ts
70
+ // src/api/generated/api.ts
73
71
  /**
74
72
  * Generated by Orval. Do not edit by hand.
75
73
  */
@@ -862,5 +860,4 @@ const personalMcpCompleteAuthorization = (id, personalMcpCompleteAuthorizationBo
862
860
  body: JSON.stringify(personalMcpCompleteAuthorizationBody)
863
861
  });
864
862
  };
865
- //#endregion
866
863
  export { getPersonalMcpGetCatalogUrl as $, getDeleteChatThreadUrl as A, personalMcpTestConnection as At, getListChatMessagesUrl as B, uploadChatFile as Bt, getChatConfig as C, personalMcpAuthorizeConnection as Ct, getCreateTenantUrl as D, personalMcpDisconnectConnection as Dt, getCreateChatThreadUrl as E, personalMcpCreateConnection as Et, getGetOrganizationUrl as F, searchDocumentation as Ft, getListThreadsUrl as G, DEFAULT_CHAT_AUTH_TOKEN_URL as Gt, getListChatThreadsUrl as H, isAstralBeamApiError as Ht, getGetTenantUrl as I, setChatParticipant as It, getPersonalMcpAuthorizeConnectionUrl as J, getListUsersForTenantUrl as K, DEFAULT_COLOR_SCHEME as Kt, getGetTenantUserUrl as L, updateChatThread as Lt, getGetChatThreadUrl as M, resolveChatToolResult as Mt, getGetChatUsageUrl as N, runChat as Nt, getCreateTenantUserUrl as O, personalMcpGetCatalog as Ot, getGetCurrentUserUrl as P, searchChatTenantUsers as Pt, getPersonalMcpDisconnectConnectionUrl as Q, getGetTenantUserUsageUrl as R, updateTenant as Rt, deleteChatThread as S, listUsersForTenant as St, getChatUsage as T, personalMcpCompleteAuthorization as Tt, getListTenantsUrl as U, resolveApiUrl as Ut, getListChatParticipantsUrl as V, astralBeamChatFetch as Vt, getListThreadMessagesUrl as W, DEFAULT_API_URL as Wt, getPersonalMcpCompleteAuthorizationUrl as X, getPersonalMcpBindBrowserUrl as Y, getPersonalMcpCreateConnectionUrl as Z, UploadChatFileBodySourceType as _, listChatParticipants as _t, ChatMessageEncodedRole as a, getSearchChatTenantUsersUrl as at, createTenant as b, listThreadMessages as bt, ChatThreadEncodedRole as c, getTenant as ct, GetThreadAttachmentDelivery as d, getThreadAttachment as dt, getPersonalMcpSetHeadersUrl as et, ListUsersForTenantFilterAdmin as f, getUpdateChatThreadUrl as ft, SetChatParticipantInputEncodedRole as g, listChatMessages as gt, ResolveChatToolResultInputEncodedResultsItemOutcome as h, getUploadChatFileUrl as ht, ChatHistoryPageEncodedThreadRole as i, getRunChatUrl as it, getGetChatConfigUrl as j, removeChatParticipant as jt, getCurrentUser as k, personalMcpSetHeaders as kt, ChatUsageUsageLimitsItemMetric as l, getTenantUser as lt, McpServerEncodedAuthKind as m, getUpdateTenantUserUrl as mt, ChatHistoryPageEncodedMessagesItemState as n, getRemoveChatParticipantUrl as nt, ChatMessageEncodedState as o, getSearchDocumentationUrl as ot, McpConnectionEncodedAuthState as p, getUpdateTenantUrl as pt, getOrganization as q, ChatHistoryPageEncodedPendingInteractionsItemExecutionLocation as r, getResolveChatToolResultUrl as rt, ChatParticipantEncodedRole as s, getSetChatParticipantUrl as st, ChatHistoryPageEncodedMessagesItemRole as t, getPersonalMcpTestConnectionUrl as tt, ChatUsageUsageLimitsItemScope as u, getTenantUserUsage as ut, UploadChatFileBodyType as v, listChatThreads as vt, getChatThread as w, personalMcpBindBrowser as wt, createTenantUser as x, listThreads as xt, createChatThread as y, listTenants as yt, getGetThreadAttachmentUrl as z, updateTenantUser as zt };
package/dist/api.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { $ as GetThreadAttachmentParams, $n as personalMcpAuthorizeConnection, $t as getChatConfig, A as ChatToolResultReceiptEncoded, An as getPersonalMcpSetHeadersUrl, At as TenantPage, B as CreateTenantUserInputMetadata, Bn as getTenantUserUsage, Bt as UpdateTenantInputMetadata, C as ChatRunInputForwardedProps, Cn as getOrganization, Ct as ResolveChatToolResultInputEncoded, D as ChatThreadEncoded, Dn as getPersonalMcpCreateConnectionUrl, Dt as SearchDocumentationParams, E as ChatTenantUserPage, En as getPersonalMcpCompleteAuthorizationUrl, Et as SearchChatTenantUsersParams, F as ChatUsageUsageLimitsItemScope, Fn as getSearchChatTenantUsersUrl, Ft as TenantUserRecordEncodedMetadata, G as DirectoryThreadHistoryPage, Gn as getUploadChatFileUrl, Gt as UploadChatFileBodySource, H as DeleteChatThreadParams, Hn as getUpdateChatThreadUrl, Ht as UpdateTenantUserInputMetadata, I as CreateChatThreadInputEncoded, In as getSearchDocumentationUrl, It as TenantUserUsage, J as DocumentationSearchResultsItem, Jn as listChatThreads, Jt as UploadedChatFile, K as DirectoryThreadPage, Kn as listChatMessages, Kt as UploadChatFileBodySourceType, L as CreateTenantInput, Ln as getSetChatParticipantUrl, Lt as TenantUserUsageItemsItem, M as ChatUsage, Mn as getRemoveChatParticipantUrl, Mt as TenantRecordEncodedMetadata, N as ChatUsageUsageLimitsItem, Nn as getResolveChatToolResultUrl, Nt as TenantUserPage, O as ChatThreadEncodedRole, On as getPersonalMcpDisconnectConnectionUrl, Ot as SetChatParticipantInputEncoded, P as ChatUsageUsageLimitsItemMetric, Pn as getRunChatUrl, Pt as TenantUserRecordEncoded, Q as GetThreadAttachmentDelivery, Qn as listUsersForTenant, Qt as deleteChatThread, R as CreateTenantInputMetadata, Rn as getTenant, Rt as UpdateChatThreadInputEncoded, S as ChatRunInput, Sn as getListUsersForTenantUrl, Sr as isAstralBeamApiError, St as RemoveChatParticipantParams, T as ChatTenantUserEncoded, Tn as getPersonalMcpBindBrowserUrl, Tt as ResolveChatToolResultInputEncodedResultsItemOutcome, U as DirectoryThreadEncoded, Un as getUpdateTenantUrl, Ut as UploadChatFileBody, V as CurrentUser, Vn as getThreadAttachment, Vt as UpdateTenantUserInput, W as DirectoryThreadEncodedParticipantsItem, Wn as getUpdateTenantUserUrl, Wt as UploadChatFileBodyMetadata, X as GetChatUsageParams, Xn as listThreadMessages, Xt as createTenant, Y as GetChatConfigParams, Yn as listTenants, Yt as createChatThread, Z as GetTenantUserUsageParams, Zn as listThreads, Zt as createTenantUser, _ as ChatMessageEncodedRole, _n as getListChatParticipantsUrl, _r as ApiKeyOptions, _t as PersonalMcpCreateConnectionBody, a as ChatConfigurationCapabilities, an as getCurrentUser, ar as personalMcpSetHeaders, at as ListThreadsParams, b as ChatParticipantEncodedRole, bn as getListThreadMessagesUrl, br as AstralBeamApiError, bt as PersonalMcpSetHeadersBodyHeaders, c as ChatHistoryPageEncodedMessagesItemPartsItem, cn as getGetChatThreadUrl, cr as resolveChatToolResult, ct as McpConnectionEncoded, d as ChatHistoryPageEncodedPendingInteractionsItem, dn as getGetOrganizationUrl, dr as searchDocumentation, dt as McpServerEncodedAuthKind, en as getChatThread, er as personalMcpBindBrowser, et as ListChatMessagesParams, f as ChatHistoryPageEncodedPendingInteractionsItemExecutionLocation, fn as getGetTenantUrl, fr as setChatParticipant, ft as Organization, g as ChatMessageEncodedPartsItem, gn as getListChatMessagesUrl, gr as uploadChatFile, gt as PersonalMcpCompleteAuthorizationBody, h as ChatMessageEncoded, hn as getGetThreadAttachmentUrl, hr as updateTenantUser, ht as PersonalMcpBindBrowserBody, i as ChatConfiguration, in as getCreateTenantUserUrl, ir as personalMcpGetCatalog, it as ListThreadMessagesParams, j as ChatToolResultReceiptEncodedUsageLimit, jn as getPersonalMcpTestConnectionUrl, jt as TenantRecordEncoded, k as ChatThreadPage, kn as getPersonalMcpGetCatalogUrl, kt as SetChatParticipantInputEncodedRole, l as ChatHistoryPageEncodedMessagesItemRole, ln as getGetChatUsageUrl, lr as runChat, lt as McpConnectionEncodedAuthState, m as ChatHistoryPageEncodedThreadRole, mn as getGetTenantUserUsageUrl, mr as updateTenant, mt as PersonalMcpAuthorizeConnection200Attempt, n as AstralBeamApiErrorIssuesItem, nn as getCreateChatThreadUrl, nr as personalMcpCreateConnection, nt as ListChatThreadsParams, o as ChatHistoryPageEncoded, on as getDeleteChatThreadUrl, or as personalMcpTestConnection, ot as ListUsersForTenantFilterAdmin, p as ChatHistoryPageEncodedThread, pn as getGetTenantUserUrl, pr as updateChatThread, pt as PersonalMcpAuthorizeConnection200, q as DocumentationSearch, qn as listChatParticipants, qt as UploadChatFileBodyType, r as AstralBeamApiErrorUsageLimit, rn as getCreateTenantUrl, rr as personalMcpDisconnectConnection, rt as ListTenantsParams, s as ChatHistoryPageEncodedMessagesItem, sn as getGetChatConfigUrl, sr as removeChatParticipant, st as ListUsersForTenantParams, t as AstralBeamApiError$1, tn as getChatUsage, tr as personalMcpCompleteAuthorization, tt as ListChatParticipantsParams, u as ChatHistoryPageEncodedMessagesItemState, un as getGetCurrentUserUrl, ur as searchChatTenantUsers, ut as McpServerEncoded, v as ChatMessageEncodedState, vn as getListChatThreadsUrl, vr as ApiOptions, vt as PersonalMcpGetCatalog200, w as ChatSubmissionReceiptEncoded, wn as getPersonalMcpAuthorizeConnectionUrl, wt as ResolveChatToolResultInputEncodedResultsItem, x as ChatParticipantPage, xn as getListThreadsUrl, xr as JwtOptions, xt as PersonalMcpTestConnection200, y as ChatParticipantEncoded, yn as getListTenantsUrl, yr as ApiRequestOptions, yt as PersonalMcpSetHeadersBody, z as CreateTenantUserInput, zn as getTenantUser, zt as UpdateTenantInput } from "./index-CI5Jut1h.js";
1
+ import { $ as GetThreadAttachmentParams, $n as personalMcpAuthorizeConnection, $t as getChatConfig, A as ChatToolResultReceiptEncoded, An as getPersonalMcpSetHeadersUrl, At as TenantPage, B as CreateTenantUserInputMetadata, Bn as getTenantUserUsage, Bt as UpdateTenantInputMetadata, C as ChatRunInputForwardedProps, Cn as getOrganization, Ct as ResolveChatToolResultInputEncoded, D as ChatThreadEncoded, Dn as getPersonalMcpCreateConnectionUrl, Dt as SearchDocumentationParams, E as ChatTenantUserPage, En as getPersonalMcpCompleteAuthorizationUrl, Et as SearchChatTenantUsersParams, F as ChatUsageUsageLimitsItemScope, Fn as getSearchChatTenantUsersUrl, Ft as TenantUserRecordEncodedMetadata, G as DirectoryThreadHistoryPage, Gn as getUploadChatFileUrl, Gt as UploadChatFileBodySource, H as DeleteChatThreadParams, Hn as getUpdateChatThreadUrl, Ht as UpdateTenantUserInputMetadata, I as CreateChatThreadInputEncoded, In as getSearchDocumentationUrl, It as TenantUserUsage, J as DocumentationSearchResultsItem, Jn as listChatThreads, Jt as UploadedChatFile, K as DirectoryThreadPage, Kn as listChatMessages, Kt as UploadChatFileBodySourceType, L as CreateTenantInput, Ln as getSetChatParticipantUrl, Lt as TenantUserUsageItemsItem, M as ChatUsage, Mn as getRemoveChatParticipantUrl, Mt as TenantRecordEncodedMetadata, N as ChatUsageUsageLimitsItem, Nn as getResolveChatToolResultUrl, Nt as TenantUserPage, O as ChatThreadEncodedRole, On as getPersonalMcpDisconnectConnectionUrl, Ot as SetChatParticipantInputEncoded, P as ChatUsageUsageLimitsItemMetric, Pn as getRunChatUrl, Pt as TenantUserRecordEncoded, Q as GetThreadAttachmentDelivery, Qn as listUsersForTenant, Qt as deleteChatThread, R as CreateTenantInputMetadata, Rn as getTenant, Rt as UpdateChatThreadInputEncoded, S as ChatRunInput, Sn as getListUsersForTenantUrl, Sr as isAstralBeamApiError, St as RemoveChatParticipantParams, T as ChatTenantUserEncoded, Tn as getPersonalMcpBindBrowserUrl, Tt as ResolveChatToolResultInputEncodedResultsItemOutcome, U as DirectoryThreadEncoded, Un as getUpdateTenantUrl, Ut as UploadChatFileBody, V as CurrentUser, Vn as getThreadAttachment, Vt as UpdateTenantUserInput, W as DirectoryThreadEncodedParticipantsItem, Wn as getUpdateTenantUserUrl, Wt as UploadChatFileBodyMetadata, X as GetChatUsageParams, Xn as listThreadMessages, Xt as createTenant, Y as GetChatConfigParams, Yn as listTenants, Yt as createChatThread, Z as GetTenantUserUsageParams, Zn as listThreads, Zt as createTenantUser, _ as ChatMessageEncodedRole, _n as getListChatParticipantsUrl, _r as ApiKeyOptions, _t as PersonalMcpCreateConnectionBody, a as ChatConfigurationCapabilities, an as getCurrentUser, ar as personalMcpSetHeaders, at as ListThreadsParams, b as ChatParticipantEncodedRole, bn as getListThreadMessagesUrl, br as AstralBeamApiError, bt as PersonalMcpSetHeadersBodyHeaders, c as ChatHistoryPageEncodedMessagesItemPartsItem, cn as getGetChatThreadUrl, cr as resolveChatToolResult, ct as McpConnectionEncoded, d as ChatHistoryPageEncodedPendingInteractionsItem, dn as getGetOrganizationUrl, dr as searchDocumentation, dt as McpServerEncodedAuthKind, en as getChatThread, er as personalMcpBindBrowser, et as ListChatMessagesParams, f as ChatHistoryPageEncodedPendingInteractionsItemExecutionLocation, fn as getGetTenantUrl, fr as setChatParticipant, ft as Organization, g as ChatMessageEncodedPartsItem, gn as getListChatMessagesUrl, gr as uploadChatFile, gt as PersonalMcpCompleteAuthorizationBody, h as ChatMessageEncoded, hn as getGetThreadAttachmentUrl, hr as updateTenantUser, ht as PersonalMcpBindBrowserBody, i as ChatConfiguration, in as getCreateTenantUserUrl, ir as personalMcpGetCatalog, it as ListThreadMessagesParams, j as ChatToolResultReceiptEncodedUsageLimit, jn as getPersonalMcpTestConnectionUrl, jt as TenantRecordEncoded, k as ChatThreadPage, kn as getPersonalMcpGetCatalogUrl, kt as SetChatParticipantInputEncodedRole, l as ChatHistoryPageEncodedMessagesItemRole, ln as getGetChatUsageUrl, lr as runChat, lt as McpConnectionEncodedAuthState, m as ChatHistoryPageEncodedThreadRole, mn as getGetTenantUserUsageUrl, mr as updateTenant, mt as PersonalMcpAuthorizeConnection200Attempt, n as AstralBeamApiErrorIssuesItem, nn as getCreateChatThreadUrl, nr as personalMcpCreateConnection, nt as ListChatThreadsParams, o as ChatHistoryPageEncoded, on as getDeleteChatThreadUrl, or as personalMcpTestConnection, ot as ListUsersForTenantFilterAdmin, p as ChatHistoryPageEncodedThread, pn as getGetTenantUserUrl, pr as updateChatThread, pt as PersonalMcpAuthorizeConnection200, q as DocumentationSearch, qn as listChatParticipants, qt as UploadChatFileBodyType, r as AstralBeamApiErrorUsageLimit, rn as getCreateTenantUrl, rr as personalMcpDisconnectConnection, rt as ListTenantsParams, s as ChatHistoryPageEncodedMessagesItem, sn as getGetChatConfigUrl, sr as removeChatParticipant, st as ListUsersForTenantParams, t as AstralBeamApiError$1, tn as getChatUsage, tr as personalMcpCompleteAuthorization, tt as ListChatParticipantsParams, u as ChatHistoryPageEncodedMessagesItemState, un as getGetCurrentUserUrl, ur as searchChatTenantUsers, ut as McpServerEncoded, v as ChatMessageEncodedState, vn as getListChatThreadsUrl, vr as ApiOptions, vt as PersonalMcpGetCatalog200, w as ChatSubmissionReceiptEncoded, wn as getPersonalMcpAuthorizeConnectionUrl, wt as ResolveChatToolResultInputEncodedResultsItem, x as ChatParticipantPage, xn as getListThreadsUrl, xr as JwtOptions, xt as PersonalMcpTestConnection200, y as ChatParticipantEncoded, yn as getListTenantsUrl, yr as ApiRequestOptions, yt as PersonalMcpSetHeadersBody, z as CreateTenantUserInput, zn as getTenantUser, zt as UpdateTenantInput } from "./index-BVfd2Jll.js";
2
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, DocumentationSearch, DocumentationSearchResultsItem, GetChatConfigParams, GetChatUsageParams, GetTenantUserUsageParams, GetThreadAttachmentDelivery, 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, SearchDocumentationParams, 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, getSearchDocumentationUrl, 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, searchDocumentation, 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 GetThreadAttachmentDelivery, f as ListUsersForTenantFilterAdmin, p as McpConnectionEncodedAuthState, m as McpServerEncodedAuthKind, h as ResolveChatToolResultInputEncodedResultsItemOutcome, g as SetChatParticipantInputEncodedRole, _ as UploadChatFileBodySourceType, v as UploadChatFileBodyType, y as createChatThread, b as createTenant, x as createTenantUser, S as deleteChatThread, C as getChatConfig, w as getChatThread, T as getChatUsage, E as getCreateChatThreadUrl, D as getCreateTenantUrl, O as getCreateTenantUserUrl, k as getCurrentUser, A as getDeleteChatThreadUrl, j as getGetChatConfigUrl, M as getGetChatThreadUrl, N as getGetChatUsageUrl, P as getGetCurrentUserUrl, F as getGetOrganizationUrl, I as getGetTenantUrl, L as getGetTenantUserUrl, R as getGetTenantUserUsageUrl, z as getGetThreadAttachmentUrl, B as getListChatMessagesUrl, V as getListChatParticipantsUrl, H as getListChatThreadsUrl, U as getListTenantsUrl, W as getListThreadMessagesUrl, G as getListThreadsUrl, K as getListUsersForTenantUrl, q as getOrganization, J as getPersonalMcpAuthorizeConnectionUrl, Y as getPersonalMcpBindBrowserUrl, X as getPersonalMcpCompleteAuthorizationUrl, Z as getPersonalMcpCreateConnectionUrl, Q as getPersonalMcpDisconnectConnectionUrl, $ as getPersonalMcpGetCatalogUrl, et as getPersonalMcpSetHeadersUrl, tt as getPersonalMcpTestConnectionUrl, nt as getRemoveChatParticipantUrl, rt as getResolveChatToolResultUrl, it as getRunChatUrl, at as getSearchChatTenantUsersUrl, ot as getSearchDocumentationUrl, st as getSetChatParticipantUrl, ct as getTenant, lt as getTenantUser, ut as getTenantUserUsage, dt as getThreadAttachment, ft as getUpdateChatThreadUrl, pt as getUpdateTenantUrl, mt as getUpdateTenantUserUrl, ht as getUploadChatFileUrl, Ht as isAstralBeamApiError, gt as listChatMessages, _t as listChatParticipants, vt as listChatThreads, yt as listTenants, bt as listThreadMessages, xt as listThreads, St as listUsersForTenant, Ct as personalMcpAuthorizeConnection, wt as personalMcpBindBrowser, Tt as personalMcpCompleteAuthorization, Et as personalMcpCreateConnection, Dt as personalMcpDisconnectConnection, Ot as personalMcpGetCatalog, kt as personalMcpSetHeaders, At as personalMcpTestConnection, jt as removeChatParticipant, Mt as resolveChatToolResult, Nt as runChat, Pt as searchChatTenantUsers, Ft as searchDocumentation, It as setChatParticipant, Lt as updateChatThread, Rt as updateTenant, zt as updateTenantUser, Bt as uploadChatFile } from "./api-CzXKVU8Z.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 GetThreadAttachmentDelivery, f as ListUsersForTenantFilterAdmin, p as McpConnectionEncodedAuthState, m as McpServerEncodedAuthKind, h as ResolveChatToolResultInputEncodedResultsItemOutcome, g as SetChatParticipantInputEncodedRole, _ as UploadChatFileBodySourceType, v as UploadChatFileBodyType, y as createChatThread, b as createTenant, x as createTenantUser, S as deleteChatThread, C as getChatConfig, w as getChatThread, T as getChatUsage, E as getCreateChatThreadUrl, D as getCreateTenantUrl, O as getCreateTenantUserUrl, k as getCurrentUser, A as getDeleteChatThreadUrl, j as getGetChatConfigUrl, M as getGetChatThreadUrl, N as getGetChatUsageUrl, P as getGetCurrentUserUrl, F as getGetOrganizationUrl, I as getGetTenantUrl, L as getGetTenantUserUrl, R as getGetTenantUserUsageUrl, z as getGetThreadAttachmentUrl, B as getListChatMessagesUrl, V as getListChatParticipantsUrl, H as getListChatThreadsUrl, U as getListTenantsUrl, W as getListThreadMessagesUrl, G as getListThreadsUrl, K as getListUsersForTenantUrl, q as getOrganization, J as getPersonalMcpAuthorizeConnectionUrl, Y as getPersonalMcpBindBrowserUrl, X as getPersonalMcpCompleteAuthorizationUrl, Z as getPersonalMcpCreateConnectionUrl, Q as getPersonalMcpDisconnectConnectionUrl, $ as getPersonalMcpGetCatalogUrl, et as getPersonalMcpSetHeadersUrl, tt as getPersonalMcpTestConnectionUrl, nt as getRemoveChatParticipantUrl, rt as getResolveChatToolResultUrl, it as getRunChatUrl, at as getSearchChatTenantUsersUrl, ot as getSearchDocumentationUrl, st as getSetChatParticipantUrl, ct as getTenant, lt as getTenantUser, ut as getTenantUserUsage, dt as getThreadAttachment, ft as getUpdateChatThreadUrl, pt as getUpdateTenantUrl, mt as getUpdateTenantUserUrl, ht as getUploadChatFileUrl, Ht as isAstralBeamApiError, gt as listChatMessages, _t as listChatParticipants, vt as listChatThreads, yt as listTenants, bt as listThreadMessages, xt as listThreads, St as listUsersForTenant, Ct as personalMcpAuthorizeConnection, wt as personalMcpBindBrowser, Tt as personalMcpCompleteAuthorization, Et as personalMcpCreateConnection, Dt as personalMcpDisconnectConnection, Ot as personalMcpGetCatalog, kt as personalMcpSetHeaders, At as personalMcpTestConnection, jt as removeChatParticipant, Mt as resolveChatToolResult, Nt as runChat, Pt as searchChatTenantUsers, Ft as searchDocumentation, It as setChatParticipant, Lt as updateChatThread, Rt as updateTenant, zt as updateTenantUser, Bt as uploadChatFile } from "./api-CHFaeV-i.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-BBScqnSk.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-BrC_vo9p.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
@@ -1,4 +1,3 @@
1
- //#region ../node_modules/.bun/@standard-schema+spec@1.1.0/node_modules/@standard-schema/spec/dist/index.d.ts
2
1
  /** The Standard Typed interface. This is a base type extended by other specs. */
3
2
  interface StandardTypedV1<Input = unknown, Output = Input> {
4
3
  /** The Standard properties. */
@@ -114,8 +113,6 @@ declare namespace StandardJSONSchemaV1 {
114
113
  /** Infers the output type of a Standard. */
115
114
  type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
116
115
  }
117
- //#endregion
118
- //#region ../node_modules/.bun/@tanstack+ai@1.2.0+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/activities/chat/middleware/capabilities.d.ts
119
116
  /**
120
117
  * The minimal context shape a capability accessor needs. The full
121
118
  * `ChatMiddlewareContext` satisfies this (it has `capabilities`), so accessors
@@ -167,8 +164,6 @@ declare class CapabilityRegistry {
167
164
  markProvided(handle: CapabilityHandle): void;
168
165
  has(handle: CapabilityHandle): boolean;
169
166
  }
170
- //#endregion
171
- //#region ../node_modules/.bun/@tanstack+ai@1.2.0+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/interrupts.d.ts
172
167
  interface InterruptCorrelation {
173
168
  threadId: string;
174
169
  interruptedRunId: string;
@@ -245,18 +240,12 @@ type InterruptBinding = (ResponseSchemaInterruptBindingBase & {
245
240
  batchIndex?: number;
246
241
  payloadSchemaHash?: string;
247
242
  });
248
- //#endregion
249
- //#region ../node_modules/.bun/@tanstack+devtools-event-client@0.4.4/node_modules/@tanstack/devtools-event-client/dist/esm/plugin.d.ts
250
243
  declare global {
251
244
  var __TANSTACK_EVENT_TARGET__: EventTarget | null;
252
245
  }
253
- //#endregion
254
- //#region ../node_modules/.bun/@tanstack+ai-event-client@1.0.1/node_modules/@tanstack/ai-event-client/dist/esm/envelope.d.ts
255
246
  declare global {
256
247
  var __TANSTACK_AI_DEVTOOLS_RUNTIME_ID__: string | undefined;
257
248
  }
258
- //#endregion
259
- //#region ../node_modules/.bun/@tanstack+ai-event-client@1.0.1/node_modules/@tanstack/ai-event-client/dist/esm/index.d.ts
260
249
  /**
261
250
  * Detailed breakdown of prompt/input token usage.
262
251
  * Fields are populated based on provider support.
@@ -386,8 +375,6 @@ interface TokenUsage$1<TProviderDetails = ProviderUsageDetails> {
386
375
  /** Provider-reported cost breakdown, when available. */
387
376
  costDetails?: UsageCostBreakdown;
388
377
  }
389
- //#endregion
390
- //#region ../node_modules/.bun/@ag-ui+core@1.0.0+969a6d035afea0f4/node_modules/@ag-ui/core/dist/version-DEKfpZNa.d.ts
391
378
  //#region src/generated/types.d.ts
392
379
  /**
393
380
  * The discriminator carried by every event.
@@ -2850,12 +2837,8 @@ type SubagentInfo = {
2850
2837
  */
2851
2838
  description?: string;
2852
2839
  };
2853
- //#endregion
2854
- //#region ../node_modules/.bun/@tanstack+ai@1.2.0+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/utilities/ag-ui-usage.d.ts
2855
2840
  /** TokenUsage fields that have no AG-UI `usage[]` equivalent. */
2856
2841
  type TokenUsageLeftover = Omit<TokenUsage$1, 'promptTokens' | 'completionTokens' | 'totalTokens'>;
2857
- //#endregion
2858
- //#region ../node_modules/.bun/@tanstack+ai@1.2.0+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/utilities/subagent-wire.d.ts
2859
2842
  /**
2860
2843
  * Card data that travels on each child wire message, in
2861
2844
  * `metadata.tanstack.subagent`. The messages carry the AG-UI `subagentRunId`.
@@ -2864,8 +2847,6 @@ interface SubagentWireInfo extends SubagentInfo, Pick<SubagentHandleData, 'statu
2864
2847
  /** The child has no messages yet. This wire message only holds the card. */
2865
2848
  placeholder?: true;
2866
2849
  }
2867
- //#endregion
2868
- //#region ../node_modules/.bun/@tanstack+ai@1.2.0+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/types.d.ts
2869
2850
  /**
2870
2851
  * Tool call states - track the lifecycle of a tool call
2871
2852
  */
@@ -3890,8 +3871,6 @@ interface SubagentErrorEvent extends SubagentErrorEvent$1 {}
3890
3871
  * Uses the AG-UI protocol event format.
3891
3872
  */
3892
3873
  type StreamChunk = AGUIEvent;
3893
- //#endregion
3894
- //#region ../node_modules/.bun/@tanstack+ai@1.2.0+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/interrupt-definition.d.ts
3895
3874
  type PortableSchema = StandardJSONSchemaV1<any, any> | StandardSchemaV1$1<any, any>;
3896
3875
  type InterruptInput<TPayloadSchema extends PortableSchema | undefined, TPayload = unknown> = {
3897
3876
  key: string;
@@ -3932,8 +3911,6 @@ interface InterruptDefinition<TId extends string, TPayloadSchema extends Portabl
3932
3911
  readonly responseSchema: TResponseSchema;
3933
3912
  interrupt: InterruptRequestMethod<TId, TPayloadSchema, TResponseSchema, TPayload, TPayloadInput>;
3934
3913
  }
3935
- //#endregion
3936
- //#region ../node_modules/.bun/@tanstack+ai@1.2.0+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/activities/chat/tools/tool-definition.d.ts
3937
3914
  /**
3938
3915
  * Type-level brand key for {@link ToolApprovalCapabilityMarker}. Only ever used
3939
3916
  * in type positions, but it must stay exported: a `unique symbol` referenced by
@@ -4014,8 +3991,6 @@ type InferToolInput<T> = T extends {
4014
3991
  type InferToolOutput<T> = T extends {
4015
3992
  outputSchema?: infer TOutput;
4016
3993
  } ? TOutput extends StandardJSONSchemaV1<any, any> ? InferSchemaType<TOutput> : TOutput extends StandardSchemaV1$1<any, any> ? InferSchemaType<TOutput> : TOutput extends JSONSchema ? unknown : InferSchemaType<TOutput> : unknown;
4017
- //#endregion
4018
- //#region ../node_modules/.bun/@tanstack+ai@1.2.0+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/byok/define-provider.d.ts
4019
3994
  /**
4020
3995
  * A BYOK provider declared by an adapter. `id` is the `x-byok-<id>` slug and
4021
3996
  * is required — `{ id?: string }` is not a {@link ByokProvider}.
@@ -4034,15 +4009,11 @@ interface ByokProvider<TId extends string = string> {
4034
4009
  */
4035
4010
  readonly with?: ReadonlyArray<ByokProvider>;
4036
4011
  }
4037
- //#endregion
4038
- //#region ../node_modules/.bun/@tanstack+ai@1.2.0+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/byok/providers.d.ts
4039
4012
  /**
4040
4013
  * Provider ids are open slugs, not a closed catalog. `@tanstack/ai` does not
4041
4014
  * list adapters. Any matching string is a valid id and becomes `x-byok-<id>`.
4042
4015
  */
4043
4016
  type ProviderId = string;
4044
- //#endregion
4045
- //#region ../node_modules/.bun/@tanstack+ai@1.2.0+ac75b968c23456b3/node_modules/@tanstack/ai/dist/esm/activities/chat/stream/types.d.ts
4046
4017
  /**
4047
4018
  * Strategy for determining when to emit text updates
4048
4019
  */
@@ -4059,8 +4030,6 @@ interface ChunkStrategy {
4059
4030
  */
4060
4031
  reset?: () => void;
4061
4032
  }
4062
- //#endregion
4063
- //#region ../node_modules/.bun/@tanstack+ai-client@1.0.0+ac75b968c23456b3/node_modules/@tanstack/ai-client/dist/esm/byok/storage.d.ts
4064
4033
  type Keyring = Partial<Record<ProviderId, string>>;
4065
4034
  type KeyPreview = Partial<Record<ProviderId, string>>;
4066
4035
  interface KeyringStorage {
@@ -4074,8 +4043,6 @@ interface KeyringStorage {
4074
4043
  save: (keys: Keyring) => void | Promise<void>;
4075
4044
  clear: () => void | Promise<void>;
4076
4045
  }
4077
- //#endregion
4078
- //#region ../node_modules/.bun/@tanstack+ai-client@1.0.0+ac75b968c23456b3/node_modules/@tanstack/ai-client/dist/esm/byok/client.d.ts
4079
4046
  type KeyStatus = {
4080
4047
  state: 'empty';
4081
4048
  } | {
@@ -4129,8 +4096,6 @@ declare class ByokClient {
4129
4096
  clear(provider?: ProviderId): Promise<void>;
4130
4097
  unlock(): Promise<void>;
4131
4098
  }
4132
- //#endregion
4133
- //#region ../node_modules/.bun/@tanstack+ai-event-client@1.0.0/node_modules/@tanstack/ai-event-client/dist/esm/envelope.d.ts
4134
4099
  type AIDevtoolsEventSource = 'client' | 'server' | 'devtools';
4135
4100
  type AIDevtoolsEventVisibility = 'user-visible' | 'client-state' | 'server-internal' | 'devtools-action';
4136
4101
  interface AIDevtoolsEventEnvelope {
@@ -4155,8 +4120,6 @@ interface AIDevtoolsEventEnvelope {
4155
4120
  declare global {
4156
4121
  var __TANSTACK_AI_DEVTOOLS_RUNTIME_ID__: string | undefined;
4157
4122
  }
4158
- //#endregion
4159
- //#region ../node_modules/.bun/@tanstack+ai-client@1.0.0+ac75b968c23456b3/node_modules/@tanstack/ai-client/dist/esm/events.d.ts
4160
4123
  interface ChatClientRunEventContext {
4161
4124
  threadId: string;
4162
4125
  runId: string;
@@ -4271,8 +4234,6 @@ declare abstract class ChatClientEventEmitter {
4271
4234
  */
4272
4235
  toolFixtureApplied(fixture: ChatClientToolFixtureAppliedEvent): void;
4273
4236
  }
4274
- //#endregion
4275
- //#region ../node_modules/.bun/@tanstack+ai-client@1.0.0+ac75b968c23456b3/node_modules/@tanstack/ai-client/dist/esm/devtools.d.ts
4276
4237
  interface AIDevtoolsDisplayOptions {
4277
4238
  name?: string;
4278
4239
  }
@@ -4439,11 +4400,7 @@ declare class ChatDevtoolsBridge extends ClientDevtoolsBridge<AIDevtoolsChatSnap
4439
4400
  private resolveFixtureToolCallId;
4440
4401
  private findClientTool;
4441
4402
  }
4442
- //#endregion
4443
- //#region ../node_modules/.bun/@tanstack+ai-client@1.0.0+ac75b968c23456b3/node_modules/@tanstack/ai-client/dist/esm/devtools-noop.d.ts
4444
4403
  type ChatDevtoolsBridgeFactory = (options: ChatDevtoolsBridgeOptions) => ChatDevtoolsBridge;
4445
- //#endregion
4446
- //#region ../node_modules/.bun/@tanstack+ai-client@1.0.0+ac75b968c23456b3/node_modules/@tanstack/ai-client/dist/esm/types.d.ts
4447
4404
  interface ChatResumeState {
4448
4405
  threadId: string;
4449
4406
  runId: string;
@@ -5237,8 +5194,6 @@ interface ChatClientBaseOptions<TTools extends ReadonlyArray<AnyClientTool> = an
5237
5194
  * is required. See {@link ChatPersistenceOptions}.
5238
5195
  */
5239
5196
  type ChatClientOptions<TTools extends ReadonlyArray<AnyClientTool> = any, TContext = InferredClientContext<TTools>, TInterrupts extends ReadonlyArray<InterruptDefinition<any, any, any, any>> = readonly []> = DistributedOmit<ChatClientBaseOptions<TTools, TContext, TInterrupts>, 'context'> & ClientContextOptionFromTools<TTools, TContext> & ChatTransport & ChatPersistenceOptions<TTools>;
5240
- //#endregion
5241
- //#region ../node_modules/.bun/@tanstack+ai-client@1.0.0+ac75b968c23456b3/node_modules/@tanstack/ai-client/dist/esm/connection-adapters.d.ts
5242
5197
  /**
5243
5198
  * Per-send context provided by the chat client to the connection adapter.
5244
5199
  * The adapter combines this with serialized messages to build a full
@@ -5406,8 +5361,6 @@ interface SubscribeConnectionAdapter {
5406
5361
  * Provide either `connect`, or `subscribe` + `send`.
5407
5362
  */
5408
5363
  type ConnectionAdapter = ConnectConnectionAdapter | SubscribeConnectionAdapter;
5409
- //#endregion
5410
- //#region ../node_modules/.bun/@tanstack+ai-client@1.0.0+ac75b968c23456b3/node_modules/@tanstack/ai-client/dist/esm/chat-client.d.ts
5411
5364
  type ChatClientUpdateOptionsWithoutContext<TTools extends ReadonlyArray<AnyClientTool>, TInterrupts extends ReadonlyArray<InterruptDefinition<any, any, any, any>> = readonly []> = {
5412
5365
  connection?: ConnectionAdapter;
5413
5366
  fetcher?: ChatFetcher;
@@ -6023,8 +5976,6 @@ declare class ChatClient<TTools extends ReadonlyArray<AnyClientTool> = any, TCon
6023
5976
  updateOptions(options: ChatClientUpdateOptionsWithoutContext<TTools> & Pick<ChatClientOptions<TTools, TContext>, 'context'>): void;
6024
5977
  dispose(): void;
6025
5978
  }
6026
- //#endregion
6027
- //#region src/api/api.d.ts
6028
5979
  interface ApiRequestOptions extends RequestInit {
6029
5980
  apiUrl?: string | undefined;
6030
5981
  fetchClient?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
@@ -6034,8 +5985,6 @@ type JwtOptions = ApiRequestOptions & {
6034
5985
  apiKey?: never;
6035
5986
  };
6036
5987
  declare function astralBeamJwtFetch<T>(path: string, options: JwtOptions): Promise<T>;
6037
- //#endregion
6038
- //#region src/api/generated/api.d.ts
6039
5988
  type McpConnectionEncodedAuthState = (typeof McpConnectionEncodedAuthState)[keyof typeof McpConnectionEncodedAuthState];
6040
5989
  declare const McpConnectionEncodedAuthState: {
6041
5990
  readonly disconnected: "disconnected";
@@ -6162,8 +6111,6 @@ type PersonalMcpTestConnection200 = {
6162
6111
  tool_count: number;
6163
6112
  };
6164
6113
  declare const personalMcpGetCatalog: (options: Parameters<typeof astralBeamJwtFetch>[1]) => Promise<PersonalMcpGetCatalog200>;
6165
- //#endregion
6166
- //#region src/core/types.d.ts
6167
6114
  /** Sandbox provisioning progress, as the endpoint's CUSTOM status event reports it. */
6168
6115
  type SandboxStatus = "starting" | "ready" | "error";
6169
6116
  /** One file the agent wrote into the sandbox, read back out of its own tool call. */
@@ -6200,12 +6147,8 @@ interface SandboxActivity {
6200
6147
  files: SandboxFileWrite[];
6201
6148
  commands: SandboxCommandRun[];
6202
6149
  }
6203
- //#endregion
6204
- //#region src/core/agent-tools.d.ts
6205
6150
  /** What declaring a widget to the agent needs; `render` stays with whoever draws it. */
6206
6151
  type WidgetDeclaration = Pick<WidgetDefinition, "description" | "parameters">;
6207
- //#endregion
6208
- //#region src/core/auth.d.ts
6209
6152
  type ChatAuthenticationState = {
6210
6153
  status: "loading";
6211
6154
  } | {
@@ -6215,8 +6158,6 @@ type ChatAuthenticationState = {
6215
6158
  status: "error";
6216
6159
  error: Error;
6217
6160
  };
6218
- //#endregion
6219
- //#region src/core/mcp.d.ts
6220
6161
  type McpConnectionOperation = {
6221
6162
  action: "connect";
6222
6163
  mcpServerId: string;
@@ -6236,8 +6177,6 @@ declare function authorizeMcpConnection(input: {
6236
6177
  mcpServerId: string;
6237
6178
  id?: string;
6238
6179
  }, requestOptions: () => Promise<JwtOptions>): Promise<string>;
6239
- //#endregion
6240
- //#region src/core/threads.d.ts
6241
6180
  /** A saved conversation visible to the signed-in tenant user. */
6242
6181
  interface ChatThread {
6243
6182
  id: string;
@@ -6258,8 +6197,6 @@ interface ChatPendingInteraction {
6258
6197
  targetClientId: string | null;
6259
6198
  executionLocation: string;
6260
6199
  }
6261
- //#endregion
6262
- //#region src/core/session.d.ts
6263
6200
  /** A widget render the agent requested, handed to the host's `onRenderWidget`. */
6264
6201
  interface WidgetRenderRequest {
6265
6202
  widget: string;
@@ -6414,8 +6351,6 @@ interface AstralBeamChatCore {
6414
6351
  /** Tears the session down: the connection, authentication, and widget renders. */
6415
6352
  dispose: () => void;
6416
6353
  }
6417
- //#endregion
6418
- //#region src/lib/types.d.ts
6419
6354
  interface StandardSchemaV1<Input = unknown, Output = Input> {
6420
6355
  readonly "~standard": {
6421
6356
  readonly version: 1;
@@ -6633,8 +6568,6 @@ interface AstralBeamChatHandle {
6633
6568
  * Changing apiUrl clears the previous session, while threadId selects a conversation. */
6634
6569
  update: (options: AstralBeamChatUpdate) => void;
6635
6570
  }
6636
- //#endregion
6637
- //#region src/lib/define.d.ts
6638
6571
  interface TypedToolDefinition<S extends ParametersSchema = JsonSchemaObject> {
6639
6572
  description: string;
6640
6573
  metadata?: Record<string, unknown> | undefined;
@@ -6650,8 +6583,6 @@ interface TypedWidgetDefinition<S extends ParametersSchema = JsonSchemaObject> {
6650
6583
  export declare function defineTool<const S extends ParametersSchema = JsonSchemaObject>(tool: TypedToolDefinition<S>): ToolDefinition;
6651
6584
  /** Declares a host widget; a Standard Schema `parameters` types (and validates) `render`'s props. */
6652
6585
  export declare function defineWidget<const S extends ParametersSchema = JsonSchemaObject>(widget: TypedWidgetDefinition<S>): WidgetDefinition;
6653
- //#endregion
6654
- //#region src/core/listings.d.ts
6655
6586
  interface AstralBeamListingCoreOptions {
6656
6587
  apiUrl?: string | undefined;
6657
6588
  fetchAstralBeamToken?: AstralBeamTokenSource | undefined;
@@ -6664,12 +6595,12 @@ interface AstralBeamListingCoreOptions {
6664
6595
  /** Final request failures, after authentication retry. Cancellations are not reported. */
6665
6596
  onError?: ((error: Error) => void) | undefined;
6666
6597
  }
6667
- //#endregion
6668
- //#region src/client/listings.d.ts
6669
6598
  interface AstralBeamListingOptions extends AstralBeamListingCoreOptions {
6670
6599
  fetchAstralBeamToken: NonNullable<AstralBeamListingCoreOptions["fetchAstralBeamToken"]>;
6671
6600
  /** Host-session boundary for remount reuse. Replacing it resets authentication and view state. */
6672
6601
  cacheKey?: object | undefined;
6602
+ /** Keep retained rows visible while refreshing them after a remount. */
6603
+ revalidateOnMount?: boolean | undefined;
6673
6604
  pageSize?: 20 | 50 | 100 | undefined;
6674
6605
  title?: string | undefined;
6675
6606
  showHeader?: boolean | undefined;
@@ -6705,8 +6636,6 @@ type AstralBeamTenantUserListHandle = AstralBeamListingHandle<MountAstralBeamTen
6705
6636
  export declare function mountAstralBeamTenantList(target: HTMLElement, options: MountAstralBeamTenantListOptions): AstralBeamTenantListHandle;
6706
6637
  export declare function mountAstralBeamTenantUserList(target: HTMLElement, options: MountAstralBeamTenantUserListOptions): AstralBeamTenantUserListHandle;
6707
6638
  export declare function mountAstralBeamThreadList(target: HTMLElement, options: MountAstralBeamThreadListOptions): AstralBeamThreadListHandle;
6708
- //#endregion
6709
- //#region src/client/mcp-servers.d.ts
6710
6639
  interface McpServerInput {
6711
6640
  endpointUrl: string;
6712
6641
  authConfig: {
@@ -6752,8 +6681,5 @@ interface AstralBeamMcpServersHandle {
6752
6681
  }
6753
6682
  /** Unmount when the host's authenticated identity or management scope changes. */
6754
6683
  export declare function mountAstralBeamMcpServers(target: HTMLElement, options: MountAstralBeamMcpServersOptions): AstralBeamMcpServersHandle;
6755
- //#endregion
6756
- //#region src/client/index.d.ts
6757
6684
  export declare function mountAstralBeamChat(target: HTMLElement, options: MountAstralBeamChatOptions): AstralBeamChatHandle;
6758
- //#endregion
6759
6685
  export type { AstralBeamChatAttachmentOptions, AstralBeamChatColorScheme, AstralBeamChatHandle, AstralBeamChatSlotRenderer, AstralBeamChatSlots, AstralBeamChatTheme, AstralBeamChatThemeVariables, AstralBeamChatUpdate, AstralBeamListingHandle, AstralBeamListingOptions, AstralBeamMcpServersHandle, AstralBeamTenantListHandle, AstralBeamTenantUserListHandle, AstralBeamThreadListHandle, AstralBeamTokenRequest, AstralBeamTokenSource, InferParameters, JsonSchemaObject, McpServerFormError, McpServerInput, McpServerItem, MountAstralBeamChatOptions, MountAstralBeamMcpServersOptions, MountAstralBeamTenantListOptions, MountAstralBeamTenantUserListOptions, MountAstralBeamThreadListOptions, ParametersSchema, StandardSchemaV1, ToolDefinition, TypedToolDefinition, TypedWidgetDefinition, WidgetDefinition };
package/dist/client.js CHANGED
@@ -1,4 +1,4 @@
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-C1-zJbVB.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-B4IbhRo_.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 _(e){if(e.chat){for(let t of[`agentId`,`threadId`,`placementKey`,`apiUrl`,`fetchAstralBeamToken`,`tools`,`debug`])if(e[t]!==void 0)throw Error(`Configure ${t} on the supplied chat session`)}}function v(n,i){_(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.dataset.slot=`chat-loading`,l.innerHTML=`
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-CwKMku_E.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-CQTKrhfj.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 _(e){if(e.chat){for(let t of[`agentId`,`threadId`,`placementKey`,`apiUrl`,`fetchAstralBeamToken`,`tools`,`debug`])if(e[t]!==void 0)throw Error(`Configure ${t} on the supplied chat session`)}}function v(n,i){_(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.dataset.slot=`chat-loading`,l.innerHTML=`
2
2
  <style>
3
3
  [data-slot="chat-loading"] {
4
4
  position: relative; display: flex; flex-direction: column; height: 100%; color-scheme: light;
@@ -48,4 +48,4 @@ import{s as e}from"./constants-C-Yp0Vhg.js";import{t}from"./debug-DLDY8CZb.js";i
48
48
  <header><span data-slot="chat-loading-title"></span></header>
49
49
  <button type="button" aria-label="Close chat">×</button>
50
50
  <div data-slot="chat-loading-status" role="status" data-loading>Loading chat…</div>
51
- `,c.append(l);let u=l.querySelector(`header`),d=l.querySelector(`[data-slot="chat-loading-title"]`),f=l.querySelector(`button`),p=l.querySelector(`[role="status"]`),m=()=>{d.textContent=a.title??`AstralBeam`,u.hidden=a.showHeader===!1,f.hidden=!a.onClose};m(),f.onclick=e=>{e.detail<2&&a.onClose?.()};let h=matchMedia(`(prefers-color-scheme: dark)`),g=/* @__PURE__ */ new Set,v=()=>{let{colorScheme:e,dark:t}=r(c,g,a,h.matches);o?.(`theme`,`color scheme "${e}" resolved to ${t?`dark`:`light`}`,{themeVariables:[...g]})};v(),h.addEventListener(`change`,v);let y=!1,b;return import(`./widget-Bea4OV_z.js`).then(({renderChat:e})=>{o?.(`mount`,`chat chunk loaded`),y||(b=e(s,c,a))}).catch(()=>{y||(delete p.dataset.loading,p.textContent=`Could not load chat. Reload this page to try again.`)}),{update:e=>{let n={...a,...e};if(_(n),!!n.chat!=!!a.chat)throw Error(`Remount chat to change session ownership`);a=n,o=t(a.debug),o?.(`mount`,`options updated`,{changed:Object.keys(e)}),v(),m(),b?.update(a)},unmount:()=>{o?.(`mount`,`unmounting chat widget`),y=!0,h.removeEventListener(`change`,v),b?.dispose(),b=void 0,c.remove()}}}export{i as defineTool,a as defineWidget,v as mountAstralBeamChat,g as mountAstralBeamMcpServers,o as mountAstralBeamTenantList,s as mountAstralBeamTenantUserList,c as mountAstralBeamThreadList};
51
+ `,c.append(l);let u=l.querySelector(`header`),d=l.querySelector(`[data-slot="chat-loading-title"]`),f=l.querySelector(`button`),p=l.querySelector(`[role="status"]`),m=()=>{d.textContent=a.title??`AstralBeam`,u.hidden=a.showHeader===!1,f.hidden=!a.onClose};m(),f.onclick=e=>{e.detail<2&&a.onClose?.()};let h=matchMedia(`(prefers-color-scheme: dark)`),g=/* @__PURE__ */ new Set,v=()=>{let{colorScheme:e,dark:t}=r(c,g,a,h.matches);o?.(`theme`,`color scheme "${e}" resolved to ${t?`dark`:`light`}`,{themeVariables:[...g]})};v(),h.addEventListener(`change`,v);let y=!1,b;return import(`./widget-DoNGl4gQ.js`).then(({renderChat:e})=>{o?.(`mount`,`chat chunk loaded`),y||(b=e(s,c,a))}).catch(()=>{y||(delete p.dataset.loading,p.textContent=`Could not load chat. Reload this page to try again.`)}),{update:e=>{let n={...a,...e};if(_(n),!!n.chat!=!!a.chat)throw Error(`Remount chat to change session ownership`);a=n,o=t(a.debug),o?.(`mount`,`options updated`,{changed:Object.keys(e)}),v(),m(),b?.update(a)},unmount:()=>{o?.(`mount`,`unmounting chat widget`),y=!0,h.removeEventListener(`change`,v),b?.dispose(),b=void 0,c.remove()}}}export{i as defineTool,a as defineWidget,v as mountAstralBeamChat,g as mountAstralBeamMcpServers,o as mountAstralBeamTenantList,s as mountAstralBeamTenantUserList,c as mountAstralBeamThreadList};