@astralbeam/sdk 0.13.6 → 0.13.7
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 +1 -1
- package/dist/{api-ImuMGEar.d.ts → api-B_IIYO7t.d.ts} +3 -1
- package/dist/{api-DiwSihrG.js → api-CsRaydMf.js} +1 -1
- package/dist/api.d.ts +1 -1
- package/dist/api.js +1 -1
- package/dist/client.js +1 -1
- package/dist/{core-c6eS1h0R.js → core-BhxhgxMN.js} +1863 -524
- package/dist/core.d.ts +1 -1
- package/dist/core.js +1 -1
- package/dist/{index-B3y8nySY.d.ts → index-CpLgwh4y.d.ts} +2798 -387
- package/dist/react.d.ts +2 -2
- package/dist/react.js +2 -2
- package/dist/{widget-C31rEqSh.js → widget-DtcXZ3qb.js} +12 -6
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -29,7 +29,7 @@ Without npm or a bundler, import the same entry from jsDelivr in a module script
|
|
|
29
29
|
|
|
30
30
|
```html
|
|
31
31
|
<script type="module">
|
|
32
|
-
import { mountAstralBeamChat } from "https://cdn.jsdelivr.net/npm/@astralbeam/sdk@0.13.
|
|
32
|
+
import { mountAstralBeamChat } from "https://cdn.jsdelivr.net/npm/@astralbeam/sdk@0.13.7/dist/client.js"
|
|
33
33
|
|
|
34
34
|
mountAstralBeamChat(document.getElementById("sidebar"), {})
|
|
35
35
|
</script>
|
|
@@ -67,6 +67,8 @@ interface AstralBeamApiError {
|
|
|
67
67
|
status: number;
|
|
68
68
|
detail: string;
|
|
69
69
|
issues?: AstralBeamApiErrorIssuesItem[];
|
|
70
|
+
/** Identifies the server log entry of an internal error. Quote it for support. */
|
|
71
|
+
reference?: string;
|
|
70
72
|
}
|
|
71
73
|
/**
|
|
72
74
|
* Customer-defined JSON object; keys are preserved. Defaults to {} on creation. Updates replace the entire object.
|
|
@@ -344,7 +346,7 @@ declare const getGetOrganizationUrl: () => string;
|
|
|
344
346
|
declare const getOrganization: (options: Parameters<typeof astralBeamApiFetch>[1]) => Promise<Organization>;
|
|
345
347
|
declare const getRunChatUrl: () => string;
|
|
346
348
|
/**
|
|
347
|
-
* Stream an AG-UI agent run using a tenant user JWT. No admin claim required. HTTP failures before streaming use AstralBeamApiError. Once streaming starts, failures use RUN_ERROR events. Tool results continue in a subsequent request. Disconnecting cancels the run. Limited to
|
|
349
|
+
* Stream an AG-UI agent run using a tenant user JWT. No admin claim required. HTTP failures before streaming use AstralBeamApiError. Once streaming starts, failures use RUN_ERROR events. Tool results continue in a subsequent request. Disconnecting cancels the run. Limited to 200 requests per minute per organization, tenant, and user.
|
|
348
350
|
* @summary Run chat
|
|
349
351
|
*/
|
|
350
352
|
declare const runChat: (chatRunInput: ChatRunInput, options: Parameters<typeof astralBeamChatFetch>[1]) => Promise<Response>;
|
|
@@ -248,7 +248,7 @@ const getRunChatUrl = () => {
|
|
|
248
248
|
return `/api/v1/chat`;
|
|
249
249
|
};
|
|
250
250
|
/**
|
|
251
|
-
* Stream an AG-UI agent run using a tenant user JWT. No admin claim required. HTTP failures before streaming use AstralBeamApiError. Once streaming starts, failures use RUN_ERROR events. Tool results continue in a subsequent request. Disconnecting cancels the run. Limited to
|
|
251
|
+
* Stream an AG-UI agent run using a tenant user JWT. No admin claim required. HTTP failures before streaming use AstralBeamApiError. Once streaming starts, failures use RUN_ERROR events. Tool results continue in a subsequent request. Disconnecting cancels the run. Limited to 200 requests per minute per organization, tenant, and user.
|
|
252
252
|
* @summary Run chat
|
|
253
253
|
*/
|
|
254
254
|
const runChat = (chatRunInput, options) => {
|
package/dist/api.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as updateTenant, A as createTenantUser, B as getGetTenantUrl, C as TenantUserRecordEncoded, D as UpdateTenantUserInput, E as UpdateTenantInputMetadata, F as getCurrentUser, G as getRunChatUrl, H as getListTenantsUrl, I as getGetChatConfigUrl, J as getUpdateTenantUrl, K as getTenant, L as getGetChatFileUrl, M as getChatFile, N as getCreateTenantUrl, O as UpdateTenantUserInputMetadata, P as getCreateTenantUserUrl, Q as runChat, R as getGetCurrentUserUrl, S as TenantUserPage, T as UpdateTenantInput, U as getListUsersForTenantUrl, V as getGetTenantUserUrl, W as getOrganization, X as listTenants, Y as getUpdateTenantUserUrl, Z as listUsersForTenant, _ as ListUsersForTenantParams, a as ChatRunInput, at as FileOptions, b as TenantRecordEncoded, c as CreateTenantInput, d as CreateTenantUserInputMetadata, et as updateTenantUser, f as CurrentUser, g as ListUsersForTenantFilterAdmin, h as ListTenantsParams, i as ChatConfigurationCapabilities, it as AstralBeamApiError, j as getChatConfig, k as createTenant, l as CreateTenantInputMetadata, m as GetChatFileParams, n as AstralBeamApiErrorIssuesItem, nt as ApiOptions, o as ChatRunInputData, ot as JwtOptions, p as GetChatConfigParams, q as getTenantUser, r as ChatConfiguration, rt as ApiRequestOptions, s as ChatRunInputForwardedProps, st as isAstralBeamApiError, t as AstralBeamApiError$1, tt as ApiKeyOptions, u as CreateTenantUserInput, v as Organization, w as TenantUserRecordEncodedMetadata, x as TenantRecordEncodedMetadata, y as TenantPage, z as getGetOrganizationUrl } from "./api-
|
|
1
|
+
import { $ as updateTenant, A as createTenantUser, B as getGetTenantUrl, C as TenantUserRecordEncoded, D as UpdateTenantUserInput, E as UpdateTenantInputMetadata, F as getCurrentUser, G as getRunChatUrl, H as getListTenantsUrl, I as getGetChatConfigUrl, J as getUpdateTenantUrl, K as getTenant, L as getGetChatFileUrl, M as getChatFile, N as getCreateTenantUrl, O as UpdateTenantUserInputMetadata, P as getCreateTenantUserUrl, Q as runChat, R as getGetCurrentUserUrl, S as TenantUserPage, T as UpdateTenantInput, U as getListUsersForTenantUrl, V as getGetTenantUserUrl, W as getOrganization, X as listTenants, Y as getUpdateTenantUserUrl, Z as listUsersForTenant, _ as ListUsersForTenantParams, a as ChatRunInput, at as FileOptions, b as TenantRecordEncoded, c as CreateTenantInput, d as CreateTenantUserInputMetadata, et as updateTenantUser, f as CurrentUser, g as ListUsersForTenantFilterAdmin, h as ListTenantsParams, i as ChatConfigurationCapabilities, it as AstralBeamApiError, j as getChatConfig, k as createTenant, l as CreateTenantInputMetadata, m as GetChatFileParams, n as AstralBeamApiErrorIssuesItem, nt as ApiOptions, o as ChatRunInputData, ot as JwtOptions, p as GetChatConfigParams, q as getTenantUser, r as ChatConfiguration, rt as ApiRequestOptions, s as ChatRunInputForwardedProps, st as isAstralBeamApiError, t as AstralBeamApiError$1, tt as ApiKeyOptions, u as CreateTenantUserInput, v as Organization, w as TenantUserRecordEncodedMetadata, x as TenantRecordEncodedMetadata, y as TenantPage, z as getGetOrganizationUrl } from "./api-B_IIYO7t.js";
|
|
2
2
|
export { type ApiKeyOptions, type ApiOptions, type ApiRequestOptions, AstralBeamApiError, type AstralBeamApiError$1 as AstralBeamApiErrorBody, AstralBeamApiErrorIssuesItem, ChatConfiguration, ChatConfigurationCapabilities, ChatRunInput, ChatRunInputData, ChatRunInputForwardedProps, CreateTenantInput, CreateTenantInputMetadata, CreateTenantUserInput, CreateTenantUserInputMetadata, CurrentUser, type FileOptions, GetChatConfigParams, GetChatFileParams, type JwtOptions, ListTenantsParams, ListUsersForTenantFilterAdmin, ListUsersForTenantParams, Organization, TenantPage, TenantRecordEncoded, TenantRecordEncodedMetadata, TenantUserPage, TenantUserRecordEncoded, TenantUserRecordEncodedMetadata, UpdateTenantInput, UpdateTenantInputMetadata, UpdateTenantUserInput, UpdateTenantUserInputMetadata, createTenant, createTenantUser, getChatConfig, getChatFile, getCreateTenantUrl, getCreateTenantUserUrl, getCurrentUser, getGetChatConfigUrl, getGetChatFileUrl, getGetCurrentUserUrl, getGetOrganizationUrl, getGetTenantUrl, getGetTenantUserUrl, getListTenantsUrl, getListUsersForTenantUrl, getOrganization, getRunChatUrl, getTenant, getTenantUser, getUpdateTenantUrl, getUpdateTenantUserUrl, isAstralBeamApiError, listTenants, listUsersForTenant, runChat, updateTenant, updateTenantUser };
|
package/dist/api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as listTenants, D as updateTenantUser, E as updateTenant, S as getUpdateTenantUserUrl, T as runChat, _ as getOrganization, a as getChatFile, b as getTenantUser, c as getCurrentUser, d as getGetCurrentUserUrl, f as getGetOrganizationUrl, g as getListUsersForTenantUrl, h as getListTenantsUrl, i as getChatConfig, k as isAstralBeamApiError, l as getGetChatConfigUrl, m as getGetTenantUserUrl, n as createTenant, o as getCreateTenantUrl, p as getGetTenantUrl, r as createTenantUser, s as getCreateTenantUserUrl, t as ListUsersForTenantFilterAdmin, u as getGetChatFileUrl, v as getRunChatUrl, w as listUsersForTenant, x as getUpdateTenantUrl, y as getTenant } from "./api-
|
|
1
|
+
import { C as listTenants, D as updateTenantUser, E as updateTenant, S as getUpdateTenantUserUrl, T as runChat, _ as getOrganization, a as getChatFile, b as getTenantUser, c as getCurrentUser, d as getGetCurrentUserUrl, f as getGetOrganizationUrl, g as getListUsersForTenantUrl, h as getListTenantsUrl, i as getChatConfig, k as isAstralBeamApiError, l as getGetChatConfigUrl, m as getGetTenantUserUrl, n as createTenant, o as getCreateTenantUrl, p as getGetTenantUrl, r as createTenantUser, s as getCreateTenantUserUrl, t as ListUsersForTenantFilterAdmin, u as getGetChatFileUrl, v as getRunChatUrl, w as listUsersForTenant, x as getUpdateTenantUrl, y as getTenant } from "./api-CsRaydMf.js";
|
|
2
2
|
export { ListUsersForTenantFilterAdmin, createTenant, createTenantUser, getChatConfig, getChatFile, getCreateTenantUrl, getCreateTenantUserUrl, getCurrentUser, getGetChatConfigUrl, getGetChatFileUrl, getGetCurrentUserUrl, getGetOrganizationUrl, getGetTenantUrl, getGetTenantUserUrl, getListTenantsUrl, getListUsersForTenantUrl, getOrganization, getRunChatUrl, getTenant, getTenantUser, getUpdateTenantUrl, getUpdateTenantUserUrl, isAstralBeamApiError, listTenants, listUsersForTenant, runChat, updateTenant, updateTenantUser };
|
package/dist/client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as e}from"./constants-CgaMxV3q.js";import{t}from"./debug-qLts7gEt.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 s(e,t,`tenants`)}function o(e,t){return s(e,t,`users`)}function s(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:new Set,disposed:!1},f=()=>c(s);return f(),o.addEventListener(`change`,f),l(s),{update:e=>u(s,e),refresh:()=>{!s.disposed&&s.renderer&&s.runtime.refreshListing(s.renderer)},reset:()=>{!s.disposed&&s.renderer&&s.runtime.resetListing(s.renderer)},unmount:()=>d(s,f)}}function c({options:e,media:t,container:r,variables:i}){n(r,i,e,t.matches)}async function l(e){e.retryLoad?.remove();try{if(e.runtime=await import(`./listings-BQZUPClK.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 l(e),e.container.append(e.retryLoad)}}function u(e,t){e.disposed||(e.options={...e.options,...t},c(e),e.renderer&&e.runtime.updateListing(e.renderer,e.options))}function d(e,t){e.disposed||(e.disposed=!0,e.media.removeEventListener(`change`,t),e.renderer&&e.runtime.disposeListing(e.renderer),e.container.remove())}function f(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,emptyTitle:a.emptyTitle??`Ask the assistant`,emptyDescription:a.emptyDescription??`It can answer questions and act through this app's own tools and widgets.`,apiUrl:a.apiUrl??`https://app.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=matchMedia(`(prefers-color-scheme: dark)`),u=new Set,d=()=>{let{colorScheme:e,dark:t}=n(c,u,a,l.matches);o?.(`theme`,`color scheme "${e}" resolved to ${t?`dark`:`light`}`,{themeVariables:[...u]})};d(),l.addEventListener(`change`,d);let f=!1,p;return import(`./widget-
|
|
1
|
+
import{s as e}from"./constants-CgaMxV3q.js";import{t}from"./debug-qLts7gEt.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 s(e,t,`tenants`)}function o(e,t){return s(e,t,`users`)}function s(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:new Set,disposed:!1},f=()=>c(s);return f(),o.addEventListener(`change`,f),l(s),{update:e=>u(s,e),refresh:()=>{!s.disposed&&s.renderer&&s.runtime.refreshListing(s.renderer)},reset:()=>{!s.disposed&&s.renderer&&s.runtime.resetListing(s.renderer)},unmount:()=>d(s,f)}}function c({options:e,media:t,container:r,variables:i}){n(r,i,e,t.matches)}async function l(e){e.retryLoad?.remove();try{if(e.runtime=await import(`./listings-BQZUPClK.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 l(e),e.container.append(e.retryLoad)}}function u(e,t){e.disposed||(e.options={...e.options,...t},c(e),e.renderer&&e.runtime.updateListing(e.renderer,e.options))}function d(e,t){e.disposed||(e.disposed=!0,e.media.removeEventListener(`change`,t),e.renderer&&e.runtime.disposeListing(e.renderer),e.container.remove())}function f(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,emptyTitle:a.emptyTitle??`Ask the assistant`,emptyDescription:a.emptyDescription??`It can answer questions and act through this app's own tools and widgets.`,apiUrl:a.apiUrl??`https://app.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=matchMedia(`(prefers-color-scheme: dark)`),u=new Set,d=()=>{let{colorScheme:e,dark:t}=n(c,u,a,l.matches);o?.(`theme`,`color scheme "${e}" resolved to ${t?`dark`:`light`}`,{themeVariables:[...u]})};d(),l.addEventListener(`change`,d);let f=!1,p;return import(`./widget-DtcXZ3qb.js`).then(({renderChat:e})=>{o?.(`mount`,`chat chunk loaded`),f||(p=e(s,c,a))}),{update:e=>{a={...a,...e},o=t(a.debug),o?.(`mount`,`options updated`,{changed:Object.keys(e)}),d(),p?.update(a)},reset:()=>p?.reset(),stop:()=>p?.stop(),unmount:()=>{o?.(`mount`,`unmounting chat widget`),f=!0,l.removeEventListener(`change`,d),p?.dispose(),p=void 0,c.remove()}}}export{r as defineTool,i as defineWidget,f as mountAstralBeamChat,a as mountAstralBeamTenantList,o as mountAstralBeamTenantUserList};
|