@astralbeam/sdk 0.13.7 → 0.13.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -29,7 +29,7 @@ Without npm or a bundler, import the same entry from jsDelivr in a module script
29
29
 
30
30
  ```html
31
31
  <script type="module">
32
- import { mountAstralBeamChat } from "https://cdn.jsdelivr.net/npm/@astralbeam/sdk@0.13.7/dist/client.js"
32
+ import { mountAstralBeamChat } from "https://cdn.jsdelivr.net/npm/@astralbeam/sdk@0.13.9/dist/client.js"
33
33
 
34
34
  mountAstralBeamChat(document.getElementById("sidebar"), {})
35
35
  </script>
@@ -29,34 +29,6 @@ declare function astralBeamChatFetch<_T>(path: string, options: JwtOptions): Pro
29
29
  declare function astralBeamFileFetch<_T>(path: string, options?: FileOptions): Promise<Response>;
30
30
  //#endregion
31
31
  //#region src/api/generated/api.d.ts
32
- /**
33
- * Customer-defined JSON object; keys are preserved.
34
- */
35
- type TenantRecordEncodedMetadata = {
36
- [key: string]: unknown;
37
- };
38
- /**
39
- * Persisted Tenant; id is internal, external_id is the customer's exact identity.
40
- */
41
- interface TenantRecordEncoded {
42
- id: string;
43
- external_id: string;
44
- name: string | null;
45
- /** Customer-defined JSON object; keys are preserved. */
46
- metadata: TenantRecordEncodedMetadata;
47
- created_at: string;
48
- updated_at: string;
49
- }
50
- /**
51
- * Live keyset page. Pass either non-null continuation value as the same-named request parameter.
52
- */
53
- interface TenantPage {
54
- items: TenantRecordEncoded[];
55
- /** Pass as page_after to fetch the next page; null means no next page. */
56
- page_after: string | null;
57
- /** Pass as page_before to fetch the previous page; null means no previous page. */
58
- page_before: string | null;
59
- }
60
32
  type AstralBeamApiErrorIssuesItem = {
61
33
  path: string;
62
34
  message: string;
@@ -71,34 +43,22 @@ interface AstralBeamApiError {
71
43
  reference?: string;
72
44
  }
73
45
  /**
74
- * Customer-defined JSON object; keys are preserved. Defaults to {} on creation. Updates replace the entire object.
46
+ * Customer-defined JSON object; keys are preserved.
75
47
  */
76
- type CreateTenantInputMetadata = {
48
+ type TenantRecordEncodedMetadata = {
77
49
  [key: string]: unknown;
78
50
  };
79
- interface CreateTenantInput {
80
- /**
81
- * Your stable external identity. Exact and case-sensitive; whitespace is preserved. Immutable after creation.
82
- * @minLength 1
83
- * @maxLength 255
84
- */
85
- external_id: string;
86
- /** Defaults to null on creation. Send null to clear the name. */
87
- name?: string | null;
88
- /** Customer-defined JSON object; keys are preserved. Defaults to {} on creation. Updates replace the entire object. */
89
- metadata?: CreateTenantInputMetadata;
90
- }
91
51
  /**
92
- * Customer-defined JSON object; keys are preserved. Defaults to {} on creation. Updates replace the entire object.
52
+ * Persisted Tenant; id is internal, external_id is the customer's exact identity.
93
53
  */
94
- type UpdateTenantInputMetadata = {
95
- [key: string]: unknown;
96
- };
97
- interface UpdateTenantInput {
98
- /** Defaults to null on creation. Send null to clear the name. */
99
- name?: string | null;
100
- /** Customer-defined JSON object; keys are preserved. Defaults to {} on creation. Updates replace the entire object. */
101
- metadata?: UpdateTenantInputMetadata;
54
+ interface TenantRecordEncoded {
55
+ id: string;
56
+ external_id: string;
57
+ name: string | null;
58
+ /** Customer-defined JSON object; keys are preserved. */
59
+ metadata: TenantRecordEncodedMetadata;
60
+ created_at: string;
61
+ updated_at: string;
102
62
  }
103
63
  /**
104
64
  * Customer-defined JSON object; keys are preserved.
@@ -120,15 +80,75 @@ interface TenantUserRecordEncoded {
120
80
  tenant_id: string;
121
81
  admin: boolean;
122
82
  }
83
+ type CurrentUser = {
84
+ scope: "tenant";
85
+ organization: {
86
+ id: string;
87
+ };
88
+ tenant: TenantRecordEncoded;
89
+ user: TenantUserRecordEncoded;
90
+ } | {
91
+ scope: "organization";
92
+ organization: {
93
+ id: string;
94
+ };
95
+ user: {
96
+ id: string;
97
+ name: string;
98
+ email: string;
99
+ role: string;
100
+ };
101
+ };
102
+ type ChatConfigurationCapabilities = {
103
+ attachments: boolean;
104
+ };
105
+ interface ChatConfiguration {
106
+ capabilities: ChatConfigurationCapabilities;
107
+ }
108
+ type ChatRunInputForwardedProps = {
109
+ [key: string]: unknown;
110
+ };
123
111
  /**
124
- * Live keyset page in ascending ID order within one Tenant. Pass either non-null continuation value as the same-named request parameter.
112
+ * Legacy mirror of forwardedProps sent by TanStack AI clients.
125
113
  */
126
- interface TenantUserPage {
127
- items: TenantUserRecordEncoded[];
128
- /** Pass as page_after to fetch the next page; null means no next page. */
129
- page_after: string | null;
130
- /** Pass as page_before to fetch the previous page; null means no previous page. */
131
- page_before: string | null;
114
+ type ChatRunInputData = {
115
+ [key: string]: unknown;
116
+ };
117
+ /**
118
+ * AG-UI RunAgentInput, validated by TanStack AI. Messages, tools, context, and resume entries follow AG-UI. forwardedProps accepts agentId and development-only debug. systemPrompt is rejected. Maximum request size: 32 MiB.
119
+ */
120
+ interface ChatRunInput {
121
+ threadId: string;
122
+ runId: string;
123
+ messages: unknown[];
124
+ tools: unknown[];
125
+ context: unknown[];
126
+ forwardedProps?: ChatRunInputForwardedProps;
127
+ /** Legacy mirror of forwardedProps sent by TanStack AI clients. */
128
+ data?: ChatRunInputData;
129
+ state?: unknown;
130
+ parentRunId?: string;
131
+ resume?: unknown[];
132
+ }
133
+ interface Organization {
134
+ id: string;
135
+ name: string;
136
+ /** Editable dashboard URL segment. Use id, not slug, as the stable identity. */
137
+ slug: string;
138
+ }
139
+ /**
140
+ * Customer-defined JSON object; keys are preserved. Defaults to {} on creation. Updates replace the entire object.
141
+ */
142
+ type UpdateTenantUserInputMetadata = {
143
+ [key: string]: unknown;
144
+ };
145
+ interface UpdateTenantUserInput {
146
+ /** Defaults to null on creation. Send null to clear the name. */
147
+ name?: string | null;
148
+ /** Customer-defined JSON object; keys are preserved. Defaults to {} on creation. Updates replace the entire object. */
149
+ metadata?: UpdateTenantUserInputMetadata;
150
+ /** Defaults to false on creation. Stored admin does not change signed JWT authority. */
151
+ admin?: boolean;
132
152
  }
133
153
  /**
134
154
  * Customer-defined JSON object; keys are preserved. Defaults to {} on creation. Updates replace the entire object.
@@ -150,76 +170,56 @@ interface CreateTenantUserInput {
150
170
  /** Defaults to false on creation. Stored admin does not change signed JWT authority. */
151
171
  admin?: boolean;
152
172
  }
173
+ /**
174
+ * Live keyset page in ascending ID order within one Tenant. Pass either non-null continuation value as the same-named request parameter.
175
+ */
176
+ interface TenantUserPage {
177
+ items: TenantUserRecordEncoded[];
178
+ /** Pass as page_after to fetch the next page; null means no next page. */
179
+ page_after: string | null;
180
+ /** Pass as page_before to fetch the previous page; null means no previous page. */
181
+ page_before: string | null;
182
+ }
153
183
  /**
154
184
  * Customer-defined JSON object; keys are preserved. Defaults to {} on creation. Updates replace the entire object.
155
185
  */
156
- type UpdateTenantUserInputMetadata = {
186
+ type UpdateTenantInputMetadata = {
157
187
  [key: string]: unknown;
158
188
  };
159
- interface UpdateTenantUserInput {
189
+ interface UpdateTenantInput {
160
190
  /** Defaults to null on creation. Send null to clear the name. */
161
191
  name?: string | null;
162
192
  /** Customer-defined JSON object; keys are preserved. Defaults to {} on creation. Updates replace the entire object. */
163
- metadata?: UpdateTenantUserInputMetadata;
164
- /** Defaults to false on creation. Stored admin does not change signed JWT authority. */
165
- admin?: boolean;
166
- }
167
- interface Organization {
168
- id: string;
169
- name: string;
170
- /** Editable dashboard URL segment. Use id, not slug, as the stable identity. */
171
- slug: string;
193
+ metadata?: UpdateTenantInputMetadata;
172
194
  }
173
- type ChatRunInputForwardedProps = {
174
- [key: string]: unknown;
175
- };
176
195
  /**
177
- * Legacy mirror of forwardedProps sent by TanStack AI clients.
196
+ * Customer-defined JSON object; keys are preserved. Defaults to {} on creation. Updates replace the entire object.
178
197
  */
179
- type ChatRunInputData = {
198
+ type CreateTenantInputMetadata = {
180
199
  [key: string]: unknown;
181
200
  };
201
+ interface CreateTenantInput {
202
+ /**
203
+ * Your stable external identity. Exact and case-sensitive; whitespace is preserved. Immutable after creation.
204
+ * @minLength 1
205
+ * @maxLength 255
206
+ */
207
+ external_id: string;
208
+ /** Defaults to null on creation. Send null to clear the name. */
209
+ name?: string | null;
210
+ /** Customer-defined JSON object; keys are preserved. Defaults to {} on creation. Updates replace the entire object. */
211
+ metadata?: CreateTenantInputMetadata;
212
+ }
182
213
  /**
183
- * AG-UI RunAgentInput, validated by TanStack AI. Messages, tools, context, and resume entries follow AG-UI. forwardedProps accepts agentId and development-only debug. systemPrompt is rejected. Maximum request size: 32 MiB.
214
+ * Live keyset page. Pass either non-null continuation value as the same-named request parameter.
184
215
  */
185
- interface ChatRunInput {
186
- threadId: string;
187
- runId: string;
188
- messages: unknown[];
189
- tools: unknown[];
190
- context: unknown[];
191
- forwardedProps?: ChatRunInputForwardedProps;
192
- /** Legacy mirror of forwardedProps sent by TanStack AI clients. */
193
- data?: ChatRunInputData;
194
- state?: unknown;
195
- parentRunId?: string;
196
- resume?: unknown[];
197
- }
198
- type ChatConfigurationCapabilities = {
199
- attachments: boolean;
200
- };
201
- interface ChatConfiguration {
202
- capabilities: ChatConfigurationCapabilities;
216
+ interface TenantPage {
217
+ items: TenantRecordEncoded[];
218
+ /** Pass as page_after to fetch the next page; null means no next page. */
219
+ page_after: string | null;
220
+ /** Pass as page_before to fetch the previous page; null means no previous page. */
221
+ page_before: string | null;
203
222
  }
204
- type CurrentUser = {
205
- scope: "tenant";
206
- organization: {
207
- id: string;
208
- };
209
- tenant: TenantRecordEncoded;
210
- user: TenantUserRecordEncoded;
211
- } | {
212
- scope: "organization";
213
- organization: {
214
- id: string;
215
- };
216
- user: {
217
- id: string;
218
- name: string;
219
- email: string;
220
- role: string;
221
- };
222
- };
223
223
  type ListTenantsParams = {
224
224
  /**
225
225
  * Case-insensitive literal substring of name or external_id. Trimmed, blank means no search.
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-B_IIYO7t.js";
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-BKUwOnRz.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/core.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { A as RenderWidgetInput, B as JsonSchemaObject, C as AstralBeamChatState, D as ChatAuthenticationState, E as createAstralBeamChat, F as SandboxStatus, H as StandardSchemaV1, M as SandboxArtifact, N as SandboxCommandRun, O as WidgetDeclaration, P as SandboxFileWrite, S as AstralBeamChatCoreOptions, T as WidgetRenderRequest, U as ToolDefinition, V as ParametersSchema, _ as hasPendingToolRun, a as SANDBOX_PUBLISH_ARTIFACT_TOOL, b as AgentToolInfo, c as SANDBOX_STATUS_EVENT, d as describeSandboxCommandRun, f as isSandboxTool, g as sandboxRefusal, h as readSandboxFileWrite, i as SANDBOX_LIST_FILES_TOOL, j as SandboxActivity, k as buildAgentTools, l as SANDBOX_WRITE_FILE_TOOL, m as readSandboxCommandRun, n as ASK_QUESTIONNAIRE_TOOL, o as SANDBOX_READ_FILE_TOOL, p as readSandboxArtifact, r as RENDER_WIDGET_TOOL, s as SANDBOX_RUN_COMMAND_TOOL, t as defineTool, u as collectSandboxActivity, v as isSettledToolCall, w as ChatStreamCallbacks, x as AstralBeamChatCore, y as lastPartInProgress, z as InferParameters } from "./index-CpLgwh4y.js";
1
+ import { A as RenderWidgetInput, B as JsonSchemaObject, C as AstralBeamChatState, D as ChatAuthenticationState, E as createAstralBeamChat, F as SandboxStatus, H as StandardSchemaV1, M as SandboxArtifact, N as SandboxCommandRun, O as WidgetDeclaration, P as SandboxFileWrite, S as AstralBeamChatCoreOptions, T as WidgetRenderRequest, U as ToolDefinition, V as ParametersSchema, _ as hasPendingToolRun, a as SANDBOX_PUBLISH_ARTIFACT_TOOL, b as AgentToolInfo, c as SANDBOX_STATUS_EVENT, d as describeSandboxCommandRun, f as isSandboxTool, g as sandboxRefusal, h as readSandboxFileWrite, i as SANDBOX_LIST_FILES_TOOL, j as SandboxActivity, k as buildAgentTools, l as SANDBOX_WRITE_FILE_TOOL, m as readSandboxCommandRun, n as ASK_QUESTIONNAIRE_TOOL, o as SANDBOX_READ_FILE_TOOL, p as readSandboxArtifact, r as RENDER_WIDGET_TOOL, s as SANDBOX_RUN_COMMAND_TOOL, t as defineTool, u as collectSandboxActivity, v as isSettledToolCall, w as ChatStreamCallbacks, x as AstralBeamChatCore, y as lastPartInProgress, z as InferParameters } from "./index-AigqeZ3t.js";
2
2
  export { ASK_QUESTIONNAIRE_TOOL, type AgentToolInfo, type AstralBeamChatCore, type AstralBeamChatCoreOptions, type AstralBeamChatState, type ChatAuthenticationState, type ChatStreamCallbacks, type InferParameters, type JsonSchemaObject, type ParametersSchema, RENDER_WIDGET_TOOL, type RenderWidgetInput, SANDBOX_LIST_FILES_TOOL, SANDBOX_PUBLISH_ARTIFACT_TOOL, SANDBOX_READ_FILE_TOOL, SANDBOX_RUN_COMMAND_TOOL, SANDBOX_STATUS_EVENT, SANDBOX_WRITE_FILE_TOOL, type SandboxActivity, type SandboxArtifact, type SandboxCommandRun, type SandboxFileWrite, type SandboxStatus, type StandardSchemaV1, type ToolDefinition, type WidgetDeclaration, type WidgetRenderRequest, buildAgentTools, collectSandboxActivity, createAstralBeamChat, defineTool, describeSandboxCommandRun, hasPendingToolRun, isSandboxTool, isSettledToolCall, lastPartInProgress, readSandboxArtifact, readSandboxCommandRun, readSandboxFileWrite, sandboxRefusal };
@@ -1,4 +1,4 @@
1
- import { f as CurrentUser } from "./api-B_IIYO7t.js";
1
+ import { f as CurrentUser } from "./api-BKUwOnRz.js";
2
2
 
3
3
  //#region node_modules/.deno/@standard-schema+spec@1.1.0/node_modules/@standard-schema/spec/dist/index.d.ts
4
4
  /** The Standard Typed interface. This is a base type extended by other specs. */
package/dist/react.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as TenantUserRecordEncoded, b as TenantRecordEncoded } from "./api-B_IIYO7t.js";
2
- import { C as AstralBeamChatState, I as AstralBeamChatColorScheme$1, L as AstralBeamChatTheme$1, R as AstralBeamTokenSource$1, S as AstralBeamChatCoreOptions, x as AstralBeamChatCore } from "./index-CpLgwh4y.js";
1
+ import { C as TenantUserRecordEncoded, b as TenantRecordEncoded } from "./api-BKUwOnRz.js";
2
+ import { C as AstralBeamChatState, I as AstralBeamChatColorScheme$1, L as AstralBeamChatTheme$1, R as AstralBeamTokenSource$1, S as AstralBeamChatCoreOptions, x as AstralBeamChatCore } from "./index-AigqeZ3t.js";
3
3
  import { CSSProperties, ReactNode } from "react";
4
4
  import { AstralBeamChatAttachmentOptions, AstralBeamChatColorScheme, AstralBeamChatTheme, AstralBeamTenantListHandle as AstralBeamTenantListHandle$1, AstralBeamTenantUserListHandle as AstralBeamTenantUserListHandle$1, AstralBeamTokenRequest, AstralBeamTokenSource, InferParameters, JsonSchemaObject, MountAstralBeamChatOptions, MountAstralBeamTenantListOptions, MountAstralBeamTenantUserListOptions, ParametersSchema, ToolDefinition, WidgetDefinition as WidgetDefinition$1, defineTool } from "@astralbeam/sdk/client";
5
5
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astralbeam/sdk",
3
- "version": "0.13.7",
3
+ "version": "0.13.9",
4
4
  "description": "Frontend SDK for AstralBeam: drop-in agent UI, chat streaming, and server helpers",
5
5
  "homepage": "https://astralbeam.ai",
6
6
  "bugs": "https://github.com/AstralBeamAI/astralbeam/issues",