@astralbeam/sdk 0.16.0 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/README.md +11 -4
  2. package/dist/{api-DzeMhfHU.js → api-B3UxSTtl.js} +200 -10
  3. package/dist/api.d.ts +2 -2
  4. package/dist/api.js +1 -2
  5. package/dist/auth-lifecycle-B0BXyDr7.js +25 -0
  6. package/dist/badge-B9WuChHI.js +1 -0
  7. package/dist/client.d.ts +57 -8
  8. package/dist/client.js +1 -1
  9. package/dist/constants-C-Yp0Vhg.js +1 -0
  10. package/dist/{core-D84VNYWJ.js → core-CLWlvgYl.js} +1534 -129
  11. package/dist/core.d.ts +2 -2
  12. package/dist/core.js +1 -2
  13. package/dist/css-BGIxQoYs.js +1 -0
  14. package/dist/css-DgaLhXQH.js +1 -0
  15. package/dist/{debug-qLts7gEt.js → debug-DLDY8CZb.js} +1 -1
  16. package/dist/diff-woXpYk--.js +1 -0
  17. package/dist/github-dark-C-LZuMrd.js +1 -0
  18. package/dist/github-light-EUqPIrTm.js +1 -0
  19. package/dist/highlighter-Bd_oZUcA.js +152 -0
  20. package/dist/html-B3xvRgDO.js +1 -0
  21. package/dist/{index-CM3pzsKR.d.ts → index-DDfmeUeU.d.ts} +209 -86
  22. package/dist/{index-CH3RVjha.d.ts → index-DFxtXIXy.d.ts} +232 -20
  23. package/dist/item-a9y_9nk7.js +1 -0
  24. package/dist/javascript-BzbQS41l.js +1 -0
  25. package/dist/javascript-CpIGwZ_Y.js +1 -0
  26. package/dist/json-qhed-kSA.js +1 -0
  27. package/dist/jsx-Bz0zcwM4.js +1 -0
  28. package/dist/listings-DzxJtGCD.js +1 -0
  29. package/dist/markdown-BYOwaDjH.js +1 -0
  30. package/dist/mcp-servers-ESbOt00F.js +1 -0
  31. package/dist/python-gzcpVVnB.js +1 -0
  32. package/dist/react.d.ts +23 -16
  33. package/dist/react.js +46 -8
  34. package/dist/server.d.ts +19 -25
  35. package/dist/server.js +196 -349
  36. package/dist/shellscript-CLZ0U2zV.js +1 -0
  37. package/dist/sql-CEbI0hMM.js +1 -0
  38. package/dist/styles.generated-D4k7izMB.js +80 -0
  39. package/dist/tsx-udAQXfEw.js +1 -0
  40. package/dist/typescript-bsJCZSQ-.js +1 -0
  41. package/dist/validate-BOw-BAyv.js +140 -0
  42. package/dist/widget-DGmCPqzk.js +24 -0
  43. package/dist/yaml-rwi0_p6S.js +1 -0
  44. package/package.json +20 -17
  45. package/dist/constants-enyqxaJi.js +0 -1
  46. package/dist/listings-dAoOEUGK.js +0 -1
  47. package/dist/rolldown-runtime-Bh1tDfsg.js +0 -1
  48. package/dist/styles.generated-Ucyw8D9G.js +0 -98
  49. package/dist/type_checks-C-WTHaWs.js +0 -117
  50. package/dist/widget-h5LX5aq8.js +0 -11
@@ -1,6 +1,5 @@
1
- import { F as CurrentUser } from "./index-CH3RVjha.js";
2
-
3
- //#region node_modules/.deno/@standard-schema+spec@1.1.0/node_modules/@standard-schema/spec/dist/index.d.ts
1
+ import { $n as personalMcpGetCatalog, H as CurrentUser, Ht as UploadedChatFile, at as McpConnectionEncoded, hr as JwtOptions, vt as PersonalMcpTestConnection200 } from "./index-DFxtXIXy.js";
2
+ //#region ../node_modules/.bun/@standard-schema+spec@1.1.0/node_modules/@standard-schema/spec/dist/index.d.ts
4
3
  /** The Standard Typed interface. This is a base type extended by other specs. */
5
4
  interface StandardTypedV1<Input = unknown, Output = Input> {
6
5
  /** The Standard properties. */
@@ -117,7 +116,7 @@ declare namespace StandardJSONSchemaV1 {
117
116
  type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
118
117
  }
119
118
  //#endregion
120
- //#region node_modules/.deno/@tanstack+ai@0.64.0/node_modules/@tanstack/ai/dist/esm/interrupts.d.ts
119
+ //#region ../node_modules/.bun/@tanstack+ai@0.68.0+367daa2260c029d6/node_modules/@tanstack/ai/dist/esm/interrupts.d.ts
121
120
  interface InterruptCorrelation {
122
121
  threadId: string;
123
122
  interruptedRunId: string;
@@ -185,20 +184,22 @@ type InterruptBinding = (ResponseSchemaInterruptBindingBase & {
185
184
  toolCallId: string;
186
185
  outputSchemaHash: string;
187
186
  }) | (InterruptBindingBase & {
188
- kind: 'generic'; /** Omitted when the generic interrupt accepts an unvalidated response. */
189
- responseSchemaHash?: string; /** Present only for a first-party generic interrupt. */
187
+ kind: 'generic';
188
+ /** Omitted when the generic interrupt accepts an unvalidated response. */
189
+ responseSchemaHash?: string;
190
+ /** Present only for a first-party generic interrupt. */
190
191
  definitionId?: string;
191
192
  key?: string;
192
193
  batchIndex?: number;
193
194
  payloadSchemaHash?: string;
194
195
  });
195
196
  //#endregion
196
- //#region node_modules/.deno/@tanstack+devtools-event-client@0.4.4/node_modules/@tanstack/devtools-event-client/dist/esm/plugin.d.ts
197
+ //#region ../node_modules/.bun/@tanstack+devtools-event-client@0.4.4/node_modules/@tanstack/devtools-event-client/dist/esm/plugin.d.ts
197
198
  declare global {
198
199
  var __TANSTACK_EVENT_TARGET__: EventTarget | null;
199
200
  }
200
201
  //#endregion
201
- //#region node_modules/.deno/@tanstack+ai-event-client@0.13.0/node_modules/@tanstack/ai-event-client/dist/esm/envelope.d.ts
202
+ //#region ../node_modules/.bun/@tanstack+ai-event-client@0.13.1/node_modules/@tanstack/ai-event-client/dist/esm/envelope.d.ts
202
203
  type AIDevtoolsEventSource = 'client' | 'server' | 'devtools';
203
204
  type AIDevtoolsEventVisibility = 'user-visible' | 'client-state' | 'server-internal' | 'devtools-action';
204
205
  interface AIDevtoolsEventEnvelope {
@@ -224,7 +225,7 @@ declare global {
224
225
  var __TANSTACK_AI_DEVTOOLS_RUNTIME_ID__: string | undefined;
225
226
  }
226
227
  //#endregion
227
- //#region node_modules/.deno/@tanstack+ai-event-client@0.13.0/node_modules/@tanstack/ai-event-client/dist/esm/index.d.ts
228
+ //#region ../node_modules/.bun/@tanstack+ai-event-client@0.13.1/node_modules/@tanstack/ai-event-client/dist/esm/index.d.ts
228
229
  /**
229
230
  * Detailed breakdown of prompt/input token usage.
230
231
  * Fields are populated based on provider support.
@@ -363,7 +364,7 @@ interface TokenUsage$1<TProviderDetails = ProviderUsageDetails> {
363
364
  costDetails?: UsageCostBreakdown;
364
365
  }
365
366
  //#endregion
366
- //#region node_modules/.deno/@ag-ui+core@1.0.0/node_modules/@ag-ui/core/dist/version-DEKfpZNa.d.ts
367
+ //#region ../node_modules/.bun/@ag-ui+core@1.0.0+969a6d035afea0f4/node_modules/@ag-ui/core/dist/version-DEKfpZNa.d.ts
367
368
  //#region src/generated/types.d.ts
368
369
  /**
369
370
  * The discriminator carried by every event.
@@ -2812,11 +2813,6 @@ type SubagentErrorEvent$1 = {
2812
2813
  */
2813
2814
  code?: string;
2814
2815
  };
2815
- /**
2816
- * Any AG-UI event. Every member is normative: there is no optional tier and no
2817
- * event a consumer may decline to implement. Discriminated by the type
2818
- * property.
2819
- */
2820
2816
  /**
2821
2817
  * Describes a subagent that can be invoked by a parent agent.
2822
2818
  */
@@ -2831,18 +2827,12 @@ type SubagentInfo = {
2831
2827
  */
2832
2828
  description?: string;
2833
2829
  };
2834
- /**
2835
- * Basic metadata about the agent. Useful for discovery UIs, agent
2836
- * marketplaces, and debugging. Set these when you want clients to display
2837
- * agent information or when multiple agents are available and users need to
2838
- * pick one.
2839
- */
2840
2830
  //#endregion
2841
- //#region node_modules/.deno/@tanstack+ai@0.64.0/node_modules/@tanstack/ai/dist/esm/utilities/ag-ui-usage.d.ts
2831
+ //#region ../node_modules/.bun/@tanstack+ai@0.68.0+367daa2260c029d6/node_modules/@tanstack/ai/dist/esm/utilities/ag-ui-usage.d.ts
2842
2832
  /** TokenUsage fields that have no AG-UI `usage[]` equivalent. */
2843
2833
  type TokenUsageLeftover = Omit<TokenUsage$1, 'promptTokens' | 'completionTokens' | 'totalTokens'>;
2844
2834
  //#endregion
2845
- //#region node_modules/.deno/@tanstack+ai@0.64.0/node_modules/@tanstack/ai/dist/esm/types.d.ts
2835
+ //#region ../node_modules/.bun/@tanstack+ai@0.68.0+367daa2260c029d6/node_modules/@tanstack/ai/dist/esm/types.d.ts
2846
2836
  /**
2847
2837
  * Tool call states - track the lifecycle of a tool call
2848
2838
  */
@@ -3082,6 +3072,14 @@ interface ThinkingPart$1 {
3082
3072
  */
3083
3073
  redacted?: boolean;
3084
3074
  }
3075
+ /**
3076
+ * Frontend-only AG-UI activity. Never converted into ModelMessage input.
3077
+ * Mirrors {@link https://docs.ag-ui.com/concepts/messages | ActivityMessage}:
3078
+ * `activityType` selects a renderer; `content` is the structured payload.
3079
+ */
3080
+ interface ActivityPart extends Pick<ActivityMessage, 'activityType' | 'content' | 'subagentRunId'> {
3081
+ type: 'activity';
3082
+ }
3085
3083
  /**
3086
3084
  * Recursive `Partial` — every nested field becomes optional. Used as the
3087
3085
  * `partial` type on a streaming structured-output part since the progressive
@@ -3089,21 +3087,30 @@ interface ThinkingPart$1 {
3089
3087
  * arrive. Defaulted in `DeepPartial<unknown>` → `unknown` so untyped parts
3090
3088
  * keep their existing shape.
3091
3089
  */
3092
- type DeepPartial<T> = T extends ReadonlyArray<infer U> ? Array<DeepPartial<U>> : T extends object ? { [K in keyof T]?: DeepPartial<T[K]> } : T;
3090
+ type DeepPartial<T> = T extends ReadonlyArray<infer U> ? Array<DeepPartial<U>> : T extends object ? { [K in keyof T]?: DeepPartial<T[K]>; } : T;
3093
3091
  /**
3094
3092
  * StructuredOutputPart — a typed structured response attached to the assistant
3095
3093
  * message that produced it. Generic over the schema-inferred data type so
3096
3094
  * consumers can thread `useChat({ outputSchema })`'s schema all the way down
3097
3095
  * to `messages[i].parts[j].data`. Defaults to `unknown` so untyped consumers
3098
3096
  * (e.g. internal codepaths that don't know about TSchema) keep working.
3099
- */
3100
- interface StructuredOutputPart<TData = unknown> {
3097
+ *
3098
+ * Discriminated on `status`: checking `status === 'complete'` narrows `data`
3099
+ * to `TData`.
3100
+ */
3101
+ type StructuredOutputPart<TData = unknown> = (StructuredOutputPartBase<TData> & {
3102
+ status: 'streaming' | 'error';
3103
+ /** Not set until `status === 'complete'`. */
3104
+ data?: undefined;
3105
+ }) | (StructuredOutputPartBase<TData> & {
3106
+ status: 'complete';
3107
+ /** Validated final object. */
3108
+ data: TData;
3109
+ });
3110
+ interface StructuredOutputPartBase<TData> {
3101
3111
  type: 'structured-output';
3102
- status: 'streaming' | 'complete' | 'error';
3103
3112
  /** Progressive parse of `raw` via parsePartialJSON — populated while streaming and after complete. */
3104
3113
  partial?: DeepPartial<TData>;
3105
- /** Validated final object — only set when `status === 'complete'`. */
3106
- data?: TData;
3107
3114
  /** Accumulating JSON buffer. Source of truth for wire round-trip. */
3108
3115
  raw: string;
3109
3116
  /** Optional chain-of-thought surfaced by reasoning models alongside the structured output. */
@@ -3154,7 +3161,7 @@ interface UIResourcePart {
3154
3161
  * Currently always `undefined` — nothing populates this field yet. */
3155
3162
  meta?: Record<string, unknown>;
3156
3163
  }
3157
- type MessagePart$1<TData = unknown> = TextPart$1 | ImagePart | AudioPart | VideoPart | DocumentPart | ToolCallPart$2 | ToolResultPart$1 | ThinkingPart$1 | StructuredOutputPart<TData> | UIResourcePart | SubagentPart$1;
3164
+ type MessagePart$1<TData = unknown> = TextPart$1 | ImagePart | AudioPart | VideoPart | DocumentPart | ToolCallPart$2 | ToolResultPart$1 | ThinkingPart$1 | ActivityPart | StructuredOutputPart<TData> | UIResourcePart | SubagentPart$1;
3158
3165
  /**
3159
3166
  * Shape of `metadata.tanstack` on run events.
3160
3167
  */
@@ -3168,6 +3175,8 @@ interface TanStackRunMetadata {
3168
3175
  runId?: string;
3169
3176
  sessionId?: string;
3170
3177
  index?: number;
3178
+ /** On a `RUN_ERROR`. See `RunErrorEvent.retryAfterMs`. */
3179
+ retryAfterMs?: number;
3171
3180
  state?: ToolOutputState;
3172
3181
  /** Parsed `TOOL_CALL_END` input. Spec `TOOL_CALL_END` has no top-level `input`. */
3173
3182
  input?: unknown;
@@ -3181,7 +3190,7 @@ interface TanStackRunMetadata {
3181
3190
  */
3182
3191
  interface UIMessage$1<TData = unknown> {
3183
3192
  id: string;
3184
- role: 'system' | 'user' | 'assistant';
3193
+ role: 'system' | 'user' | 'assistant' | 'activity';
3185
3194
  parts: Array<MessagePart$1<TData>>;
3186
3195
  createdAt?: Date;
3187
3196
  /** Optional AG-UI sender name. Converters preserve it across wire and persist. */
@@ -3241,7 +3250,8 @@ type ToolInputResponse = {
3241
3250
  * emitting custom events during execution.
3242
3251
  */
3243
3252
  type ToolExecutionContext<TContext = unknown> = RuntimeContextField<TContext> & {
3244
- /** The ID of the tool call being executed */toolCallId?: string;
3253
+ /** The ID of the tool call being executed */
3254
+ toolCallId?: string;
3245
3255
  /**
3246
3256
  * Abort signal for the current chat run. Aborts when the run's
3247
3257
  * `abortController` fires (or middleware aborts). Long-running tools —
@@ -3402,7 +3412,8 @@ interface Tool$1<TInput extends SchemaInput | undefined = SchemaInput, TOutput e
3402
3412
  interface RunStartedEvent extends RunStartedEvent$1 {}
3403
3413
  type Interrupt = Interrupt$1;
3404
3414
  type RunAgentResumeItem = ResumeEntry & {
3405
- /** AG-UI resume metadata. First-party generic requests ride here. */metadata?: Record<string, unknown>;
3415
+ /** AG-UI resume metadata. First-party generic requests ride here. */
3416
+ metadata?: Record<string, unknown>;
3406
3417
  };
3407
3418
  /**
3408
3419
  * Emitted when a run completes successfully.
@@ -3443,6 +3454,12 @@ interface RunErrorEvent extends Pick<RunErrorEvent$1, 'message' | 'code' | 'time
3443
3454
  message: string;
3444
3455
  code?: string;
3445
3456
  };
3457
+ /**
3458
+ * How long the provider asks you to wait before a retry, in milliseconds.
3459
+ * Adapters read it from the `retry-after-ms` or `retry-after` header.
3460
+ * `chat()` moves it to `metadata.tanstack.retryAfterMs`.
3461
+ */
3462
+ retryAfterMs?: number;
3446
3463
  metadata?: {
3447
3464
  tanstack?: TanStackRunMetadata;
3448
3465
  } & Record<string, any>;
@@ -3582,10 +3599,24 @@ interface ReasoningEndEvent extends ReasoningEndEvent$1 {}
3582
3599
  * @ag-ui/core provides: `subtype`, `entityId`, `encryptedValue`
3583
3600
  */
3584
3601
  interface ReasoningEncryptedValueEvent extends ReasoningEncryptedValueEvent$1 {}
3585
- /** AG-UI 1.0 ActivitySnapshotEvent shape. */
3586
- interface ActivitySnapshotEvent extends ActivitySnapshotEvent$1 {}
3587
- /** AG-UI 1.0 ActivityDeltaEvent shape. */
3588
- interface ActivityDeltaEvent extends ActivityDeltaEvent$1 {}
3602
+ /**
3603
+ * Full activity state for an `ActivityMessage`.
3604
+ *
3605
+ * @ag-ui/core provides: `messageId`, `activityType`, `content`, `replace?`,
3606
+ * `metadata?`, `subagentRunId?`. When `replace` is omitted it means `true`.
3607
+ */
3608
+ interface ActivitySnapshotEvent extends Omit<ActivitySnapshotEvent$1, 'type'> {
3609
+ type: 'ACTIVITY_SNAPSHOT';
3610
+ }
3611
+ /**
3612
+ * RFC 6902 JSON Patch against an existing activity's `content`.
3613
+ *
3614
+ * @ag-ui/core provides: `messageId`, `activityType`, `patch`, `metadata?`,
3615
+ * `subagentRunId?`
3616
+ */
3617
+ interface ActivityDeltaEvent extends Omit<ActivityDeltaEvent$1, 'type'> {
3618
+ type: 'ACTIVITY_DELTA';
3619
+ }
3589
3620
  /** AG-UI 1.0 RawEvent shape. */
3590
3621
  interface RawEvent extends RawEvent$1 {}
3591
3622
  /** AG-UI 1.0 TextMessageChunkEvent shape. */
@@ -3624,7 +3655,7 @@ interface SubagentErrorEvent extends SubagentErrorEvent$1 {}
3624
3655
  */
3625
3656
  type StreamChunk = AGUIEvent;
3626
3657
  //#endregion
3627
- //#region node_modules/.deno/@tanstack+ai@0.64.0/node_modules/@tanstack/ai/dist/esm/interrupt-definition.d.ts
3658
+ //#region ../node_modules/.bun/@tanstack+ai@0.68.0+367daa2260c029d6/node_modules/@tanstack/ai/dist/esm/interrupt-definition.d.ts
3628
3659
  type PortableSchema = StandardJSONSchemaV1<any, any> | StandardSchemaV1$1<any, any>;
3629
3660
  type InterruptInput<TPayloadSchema extends PortableSchema | undefined, TPayload = unknown> = {
3630
3661
  key: string;
@@ -3645,7 +3676,7 @@ type GenericInterruptRequestFor<TDefinition extends InterruptDefinition<any, any
3645
3676
  readonly payload: TPayload | undefined;
3646
3677
  });
3647
3678
  type InterruptInputKey = 'key' | 'reason' | 'message' | 'expiresAt' | 'payload';
3648
- type RejectUnexpectedInputKeys<TInput> = Exclude<keyof TInput, InterruptInputKey> extends never ? unknown : { [K in Exclude<keyof TInput, InterruptInputKey>]: never };
3679
+ type RejectUnexpectedInputKeys<TInput> = Exclude<keyof TInput, InterruptInputKey> extends never ? unknown : { [K in Exclude<keyof TInput, InterruptInputKey>]: never; };
3649
3680
  type RejectUnexpectedPayload<TInput> = 'payload' extends keyof TInput ? {
3650
3681
  payload: never;
3651
3682
  } : unknown;
@@ -3666,7 +3697,7 @@ interface InterruptDefinition<TId extends string, TPayloadSchema extends Portabl
3666
3697
  interrupt: InterruptRequestMethod<TId, TPayloadSchema, TResponseSchema, TPayload, TPayloadInput>;
3667
3698
  }
3668
3699
  //#endregion
3669
- //#region node_modules/.deno/@tanstack+ai@0.64.0/node_modules/@tanstack/ai/dist/esm/activities/chat/tools/tool-definition.d.ts
3700
+ //#region ../node_modules/.bun/@tanstack+ai@0.68.0+367daa2260c029d6/node_modules/@tanstack/ai/dist/esm/activities/chat/tools/tool-definition.d.ts
3670
3701
  /**
3671
3702
  * Type-level brand key for {@link ToolApprovalCapabilityMarker}. Only ever used
3672
3703
  * in type positions, but it must stay exported: a `unique symbol` referenced by
@@ -3747,52 +3778,52 @@ type InferToolOutput<T> = T extends {
3747
3778
  outputSchema?: infer TOutput;
3748
3779
  } ? TOutput extends StandardJSONSchemaV1<any, any> ? InferSchemaType<TOutput> : TOutput extends StandardSchemaV1$1<any, any> ? InferSchemaType<TOutput> : TOutput extends JSONSchema ? unknown : InferSchemaType<TOutput> : unknown;
3749
3780
  //#endregion
3750
- //#region node_modules/.deno/@tanstack+ai@0.64.0/node_modules/@tanstack/ai/dist/esm/activities/chat/stream/types.d.ts
3781
+ //#region ../node_modules/.bun/@tanstack+ai@0.68.0+367daa2260c029d6/node_modules/@tanstack/ai/dist/esm/byok/define-provider.d.ts
3751
3782
  /**
3752
- * Strategy for determining when to emit text updates
3783
+ * A BYOK provider declared by an adapter. `id` is the `x-byok-<id>` slug and
3784
+ * is required — `{ id?: string }` is not a {@link ByokProvider}.
3753
3785
  */
3754
- interface ChunkStrategy {
3786
+ interface ByokProvider<TId extends string = string> {
3787
+ readonly id: TId;
3788
+ readonly label: string;
3755
3789
  /**
3756
- * Called for each text chunk received
3757
- * @param chunk - The new chunk of text (delta)
3758
- * @param accumulated - All text accumulated so far
3759
- * @returns true if an update should be emitted now
3790
+ * Env var names the relay may read. Names only — never put `process.env`
3791
+ * values here. This object is imported on the client.
3760
3792
  */
3761
- shouldEmit: (chunk: string, accumulated: string) => boolean;
3793
+ readonly env?: ReadonlyArray<string>;
3762
3794
  /**
3763
- * Optional: Reset strategy state (called when streaming starts)
3795
+ * Other descriptors this credential needs. A send for this provider also
3796
+ * carries their headers and prompts for each one that is missing.
3764
3797
  */
3765
- reset?: () => void;
3798
+ readonly with?: ReadonlyArray<ByokProvider>;
3766
3799
  }
3767
3800
  //#endregion
3768
- //#region node_modules/.deno/@tanstack+ai@0.64.0/node_modules/@tanstack/ai/dist/esm/byok/providers.d.ts
3801
+ //#region ../node_modules/.bun/@tanstack+ai@0.68.0+367daa2260c029d6/node_modules/@tanstack/ai/dist/esm/byok/providers.d.ts
3769
3802
  /**
3770
3803
  * Provider ids are open slugs, not a closed catalog. `@tanstack/ai` does not
3771
3804
  * list adapters. Any matching string is a valid id and becomes `x-byok-<id>`.
3772
3805
  */
3773
3806
  type ProviderId = string;
3774
3807
  //#endregion
3775
- //#region node_modules/.deno/@tanstack+ai@0.64.0/node_modules/@tanstack/ai/dist/esm/byok/define-provider.d.ts
3808
+ //#region ../node_modules/.bun/@tanstack+ai@0.68.0+367daa2260c029d6/node_modules/@tanstack/ai/dist/esm/activities/chat/stream/types.d.ts
3776
3809
  /**
3777
- * A BYOK provider declared by an adapter. `id` is the `x-byok-<id>` slug and
3778
- * is required — `{ id?: string }` is not a {@link ByokProvider}.
3810
+ * Strategy for determining when to emit text updates
3779
3811
  */
3780
- interface ByokProvider<TId extends string = string> {
3781
- readonly id: TId;
3782
- readonly label: string;
3812
+ interface ChunkStrategy {
3783
3813
  /**
3784
- * Env var names the relay may read. Names only — never put `process.env`
3785
- * values here. This object is imported on the client.
3814
+ * Called for each text chunk received
3815
+ * @param chunk - The new chunk of text (delta)
3816
+ * @param accumulated - All text accumulated so far
3817
+ * @returns true if an update should be emitted now
3786
3818
  */
3787
- readonly env?: ReadonlyArray<string>;
3819
+ shouldEmit: (chunk: string, accumulated: string) => boolean;
3788
3820
  /**
3789
- * Other descriptors this credential needs. A send for this provider also
3790
- * carries their headers and prompts for each one that is missing.
3821
+ * Optional: Reset strategy state (called when streaming starts)
3791
3822
  */
3792
- readonly with?: ReadonlyArray<ByokProvider>;
3823
+ reset?: () => void;
3793
3824
  }
3794
3825
  //#endregion
3795
- //#region node_modules/.deno/@tanstack+ai-client@0.36.1/node_modules/@tanstack/ai-client/dist/esm/byok/storage.d.ts
3826
+ //#region ../node_modules/.bun/@tanstack+ai-client@0.39.2+367daa2260c029d6/node_modules/@tanstack/ai-client/dist/esm/byok/storage.d.ts
3796
3827
  type Keyring = Partial<Record<ProviderId, string>>;
3797
3828
  type KeyPreview = Partial<Record<ProviderId, string>>;
3798
3829
  interface KeyringStorage {
@@ -3807,7 +3838,7 @@ interface KeyringStorage {
3807
3838
  clear: () => void | Promise<void>;
3808
3839
  }
3809
3840
  //#endregion
3810
- //#region node_modules/.deno/@tanstack+ai-client@0.36.1/node_modules/@tanstack/ai-client/dist/esm/byok/client.d.ts
3841
+ //#region ../node_modules/.bun/@tanstack+ai-client@0.39.2+367daa2260c029d6/node_modules/@tanstack/ai-client/dist/esm/byok/client.d.ts
3811
3842
  type KeyStatus = {
3812
3843
  state: 'empty';
3813
3844
  } | {
@@ -3862,7 +3893,7 @@ declare class ByokClient {
3862
3893
  unlock(): Promise<void>;
3863
3894
  }
3864
3895
  //#endregion
3865
- //#region node_modules/.deno/@tanstack+ai-client@0.36.1/node_modules/@tanstack/ai-client/dist/esm/events.d.ts
3896
+ //#region ../node_modules/.bun/@tanstack+ai-client@0.39.2+367daa2260c029d6/node_modules/@tanstack/ai-client/dist/esm/events.d.ts
3866
3897
  interface ChatClientRunEventContext {
3867
3898
  threadId: string;
3868
3899
  runId: string;
@@ -3882,7 +3913,7 @@ interface ChatClientToolFixtureAppliedEvent {
3882
3913
  execute?: boolean;
3883
3914
  message?: {
3884
3915
  id: string;
3885
- role: 'system' | 'user' | 'assistant';
3916
+ role: UIMessage['role'];
3886
3917
  parts: Array<unknown>;
3887
3918
  createdAt?: number | string;
3888
3919
  };
@@ -3982,7 +4013,7 @@ declare abstract class ChatClientEventEmitter {
3982
4013
  toolFixtureApplied(fixture: ChatClientToolFixtureAppliedEvent): void;
3983
4014
  }
3984
4015
  //#endregion
3985
- //#region node_modules/.deno/@tanstack+ai-client@0.36.1/node_modules/@tanstack/ai-client/dist/esm/devtools.d.ts
4016
+ //#region ../node_modules/.bun/@tanstack+ai-client@0.39.2+367daa2260c029d6/node_modules/@tanstack/ai-client/dist/esm/devtools.d.ts
3986
4017
  interface AIDevtoolsDisplayOptions {
3987
4018
  name?: string;
3988
4019
  }
@@ -4150,10 +4181,10 @@ declare class ChatDevtoolsBridge extends ClientDevtoolsBridge<AIDevtoolsChatSnap
4150
4181
  private findClientTool;
4151
4182
  }
4152
4183
  //#endregion
4153
- //#region node_modules/.deno/@tanstack+ai-client@0.36.1/node_modules/@tanstack/ai-client/dist/esm/devtools-noop.d.ts
4184
+ //#region ../node_modules/.bun/@tanstack+ai-client@0.39.2+367daa2260c029d6/node_modules/@tanstack/ai-client/dist/esm/devtools-noop.d.ts
4154
4185
  type ChatDevtoolsBridgeFactory = (options: ChatDevtoolsBridgeOptions) => ChatDevtoolsBridge;
4155
4186
  //#endregion
4156
- //#region node_modules/.deno/@tanstack+ai-client@0.36.1/node_modules/@tanstack/ai-client/dist/esm/types.d.ts
4187
+ //#region ../node_modules/.bun/@tanstack+ai-client@0.39.2+367daa2260c029d6/node_modules/@tanstack/ai-client/dist/esm/types.d.ts
4157
4188
  interface ChatResumeState {
4158
4189
  threadId: string;
4159
4190
  runId: string;
@@ -4216,7 +4247,7 @@ type RegisteredGenericInterruptFor<TDefinition extends InterruptDefinition<any,
4216
4247
  }>;
4217
4248
  resolveInterrupt: (response: InterruptResponseInput<TDefinition>) => void;
4218
4249
  } : never;
4219
- type RegisteredGenericInterrupt<TInterrupts extends ReadonlyArray<InterruptDefinition<any, any, any, any>>> = TInterrupts[number] extends infer TDefinition ? TDefinition extends InterruptDefinition<any, any, any, any> ? RegisteredGenericInterruptFor<TDefinition> : never : never;
4250
+ type RegisteredGenericInterrupt<TInterrupts extends ReadonlyArray<InterruptDefinition<any, any, any, any>>> = TInterrupts[number] extends (infer TDefinition) ? TDefinition extends InterruptDefinition<any, any, any, any> ? RegisteredGenericInterruptFor<TDefinition> : never : never;
4220
4251
  /**
4221
4252
  * An interrupt that arrived on the stream carrying no resume binding this
4222
4253
  * client understands — no `tanstack:interruptBinding`, or one written at a
@@ -4234,7 +4265,7 @@ interface UnboundInterrupt extends Omit<BoundInterruptBase, 'cancel' | 'clearRes
4234
4265
  readonly binding?: undefined;
4235
4266
  readonly canResolve: false;
4236
4267
  }
4237
- type ApprovalBranchSchema<TTool, TBranch extends 'approve' | 'reject'> = ApprovalSchemaOf<TTool> extends infer TApproval ? TApproval extends {
4268
+ type ApprovalBranchSchema<TTool, TBranch extends 'approve' | 'reject'> = ApprovalSchemaOf<TTool> extends (infer TApproval) ? TApproval extends {
4238
4269
  approve?: SchemaInput;
4239
4270
  reject?: SchemaInput;
4240
4271
  } ? Exclude<TApproval[TBranch], undefined> : TApproval extends SchemaInput ? TApproval : never : never;
@@ -4266,7 +4297,7 @@ type ToolApprovalInterrupt<TTool extends AnyClientTool = AnyClientTool> = TTool
4266
4297
  readonly originalArgs: InferToolInput<TTool>;
4267
4298
  resolveInterrupt: <TApproved extends boolean>(approved: TApproved, ...args: TApproved extends true ? ApproveArguments<TTool> : RejectArguments<TTool>) => void;
4268
4299
  } : never;
4269
- type ApprovalInterrupts<TTools extends ReadonlyArray<AnyClientTool>> = TTools[number] extends infer TTool ? TTool extends AnyClientTool ? ApprovalCapabilityOf<TTool> extends true ? ToolApprovalInterrupt<TTool> : never : never : never;
4300
+ type ApprovalInterrupts<TTools extends ReadonlyArray<AnyClientTool>> = TTools[number] extends (infer TTool) ? TTool extends AnyClientTool ? ApprovalCapabilityOf<TTool> extends true ? ToolApprovalInterrupt<TTool> : never : never : never;
4270
4301
  type ChatInterrupt<TTools extends ReadonlyArray<AnyClientTool> = ReadonlyArray<AnyClientTool>, TInterrupts extends ReadonlyArray<InterruptDefinition<any, any, any, any>> = readonly []> = GenericAGUIInterrupt | RegisteredGenericInterrupt<TInterrupts> | UnboundInterrupt | ApprovalInterrupts<TTools>;
4271
4302
  type ResolvableChatInterrupt<TTools extends ReadonlyArray<AnyClientTool> = ReadonlyArray<AnyClientTool>, TInterrupts extends ReadonlyArray<InterruptDefinition<any, any, any, any>> = readonly []> = GenericAGUIInterrupt | RegisteredGenericInterrupt<TInterrupts> | ApprovalInterrupts<TTools>;
4272
4303
  type BoundInterrupts<TTools extends ReadonlyArray<AnyClientTool> = ReadonlyArray<AnyClientTool>, TInterrupts extends ReadonlyArray<InterruptDefinition<any, any, any, any>> = readonly []> = ReadonlyArray<ChatInterrupt<TTools, TInterrupts>>;
@@ -4507,9 +4538,11 @@ type ToolCallPartForTool<T> = T extends AnyClientTool ? {
4507
4538
  type: 'tool-call';
4508
4539
  id: string;
4509
4540
  name: T['name'];
4510
- arguments: string; /** Parsed tool input (typed from inputSchema) */
4541
+ arguments: string;
4542
+ /** Parsed tool input (typed from inputSchema) */
4511
4543
  input?: InferToolInput<T>;
4512
- state: ToolCallState; /** Tool execution output (for client tools or after approval) */
4544
+ state: ToolCallState;
4545
+ /** Tool execution output (for client tools or after approval) */
4513
4546
  output?: InferToolOutput<T>;
4514
4547
  } & (NonNullable<T['needsApproval']> extends true ? {
4515
4548
  /**
@@ -4625,7 +4658,7 @@ type SubagentPartOf<TAgents extends ReadonlyArray<SubagentClientAgent> | undefin
4625
4658
  };
4626
4659
  type MessagePart<TTools extends ReadonlyArray<{
4627
4660
  name: string;
4628
- }> = any, TData = unknown, TSubagents extends ReadonlyArray<SubagentClientAgent> | undefined = undefined> = TextPart | ImagePart | AudioPart | VideoPart | DocumentPart | ToolCallPart$1<TTools> | ToolResultPart | ThinkingPart | StructuredOutputPart<TData> | UIResourcePart | SubagentPartOf<TSubagents>;
4661
+ }> = any, TData = unknown, TSubagents extends ReadonlyArray<SubagentClientAgent> | undefined = undefined> = TextPart | ImagePart | AudioPart | VideoPart | DocumentPart | ToolCallPart$1<TTools> | ToolResultPart | ThinkingPart | ActivityPart | StructuredOutputPart<TData> | UIResourcePart | SubagentPartOf<TSubagents>;
4629
4662
  /**
4630
4663
  * UIMessage - Domain-specific message format optimized for building chat UIs
4631
4664
  * Contains parts that can be text, tool calls, or tool results.
@@ -4642,7 +4675,7 @@ interface UIMessage<TTools extends ReadonlyArray<{
4642
4675
  name: string;
4643
4676
  }> = any, TData = unknown, TSubagents extends ReadonlyArray<SubagentClientAgent> | undefined = undefined> {
4644
4677
  id: string;
4645
- role: 'system' | 'user' | 'assistant';
4678
+ role: 'system' | 'user' | 'assistant' | 'activity';
4646
4679
  name?: string;
4647
4680
  parts: Array<MessagePart<TTools, TData, TSubagents>>;
4648
4681
  createdAt?: Date;
@@ -4843,6 +4876,12 @@ interface ChatClientBaseOptions<TTools extends ReadonlyArray<AnyClientTool> = an
4843
4876
  * activity visible to all subscribers (e.g. across tabs/devices).
4844
4877
  */
4845
4878
  onSessionGeneratingChange?: (isGenerating: boolean) => void;
4879
+ /**
4880
+ * Callback when the client starts or stops rebuilding the chat from
4881
+ * persistence (the server hydrate, or an async storage adapter). It turns
4882
+ * false once the transcript is applied and any in-flight run is re-joined.
4883
+ */
4884
+ onHydratingChange?: (isHydrating: boolean) => void;
4846
4885
  /**
4847
4886
  * Policy for messages sent while the client is busy (streaming, claiming
4848
4887
  * a send, or draining the queue). Accepts a `WhenBusy` string, a
@@ -4924,7 +4963,7 @@ interface ChatClientBaseOptions<TTools extends ReadonlyArray<AnyClientTool> = an
4924
4963
  */
4925
4964
  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>;
4926
4965
  //#endregion
4927
- //#region node_modules/.deno/@tanstack+ai-client@0.36.1/node_modules/@tanstack/ai-client/dist/esm/connection-adapters.d.ts
4966
+ //#region ../node_modules/.bun/@tanstack+ai-client@0.39.2+367daa2260c029d6/node_modules/@tanstack/ai-client/dist/esm/connection-adapters.d.ts
4928
4967
  /**
4929
4968
  * Per-send context provided by the chat client to the connection adapter.
4930
4969
  * The adapter combines this with serialized messages to build a full
@@ -5087,10 +5126,11 @@ interface SubscribeConnectionAdapter {
5087
5126
  */
5088
5127
  type ConnectionAdapter = ConnectConnectionAdapter | SubscribeConnectionAdapter;
5089
5128
  //#endregion
5090
- //#region node_modules/.deno/@tanstack+ai-client@0.36.1/node_modules/@tanstack/ai-client/dist/esm/chat-client.d.ts
5129
+ //#region ../node_modules/.bun/@tanstack+ai-client@0.39.2+367daa2260c029d6/node_modules/@tanstack/ai-client/dist/esm/chat-client.d.ts
5091
5130
  type ChatClientUpdateOptionsWithoutContext<TTools extends ReadonlyArray<AnyClientTool>, TInterrupts extends ReadonlyArray<InterruptDefinition<any, any, any, any>> = readonly []> = {
5092
5131
  connection?: ConnectionAdapter;
5093
- fetcher?: ChatFetcher; /** @deprecated Use `forwardedProps` instead. */
5132
+ fetcher?: ChatFetcher;
5133
+ /** @deprecated Use `forwardedProps` instead. */
5094
5134
  body?: Record<string, any>;
5095
5135
  forwardedProps?: Record<string, any>;
5096
5136
  byok?: ByokClient;
@@ -5105,6 +5145,7 @@ type ChatClientUpdateOptionsWithoutContext<TTools extends ReadonlyArray<AnyClien
5105
5145
  onSubscriptionChange?: (isSubscribed: boolean) => void;
5106
5146
  onConnectionStatusChange?: (status: ConnectionStatus) => void;
5107
5147
  onSessionGeneratingChange?: (isGenerating: boolean) => void;
5148
+ onHydratingChange?: (isHydrating: boolean) => void;
5108
5149
  onQueueChange?: (queue: Array<QueuedMessage>) => void;
5109
5150
  onResumeStateChange?: (resumeState: ChatResumeState | null, pendingInterrupts: BoundInterrupts<TTools, TInterrupts>) => void;
5110
5151
  /**
@@ -5199,6 +5240,7 @@ declare class ChatClient<TTools extends ReadonlyArray<AnyClientTool> = any, TCon
5199
5240
  private currentMessageId;
5200
5241
  private readonly postStreamActions;
5201
5242
  private readonly pendingToolExecutions;
5243
+ private handingOverPendingToolCalls;
5202
5244
  private activeClientTools;
5203
5245
  private activeContext;
5204
5246
  private continuationPending;
@@ -5224,6 +5266,12 @@ declare class ChatClient<TTools extends ReadonlyArray<AnyClientTool> = any, TCon
5224
5266
  private hydrationError;
5225
5267
  /** Whether a view is currently watching. See `attach` / `detach`. */
5226
5268
  private tailing;
5269
+ /** `historyGeneration` of the mount hydration GET still in flight, if any. */
5270
+ private hydrationInFlight;
5271
+ /** An async storage adapter is still reading the persisted transcript. */
5272
+ private storeHydrating;
5273
+ /** See {@link getIsHydrating}. */
5274
+ private isHydrating;
5227
5275
  /** Constructor inputs `attach()` needs on every re-attach, not just the first. */
5228
5276
  private readonly rejoinRunId;
5229
5277
  private readonly cachesMessages;
@@ -5363,9 +5411,16 @@ declare class ChatClient<TTools extends ReadonlyArray<AnyClientTool> = any, TCon
5363
5411
  private interruptGeneration;
5364
5412
  private generateUniqueId;
5365
5413
  private setIsLoading;
5414
+ /**
5415
+ * A send or a clear now owns the transcript. A load that is still pending can
5416
+ * no longer paint it (the generation guards drop its result), so it no longer
5417
+ * counts as hydrating.
5418
+ */
5419
+ private supersedeHydration;
5366
5420
  private setStatus;
5367
5421
  private setIsSubscribed;
5368
5422
  private setConnectionStatus;
5423
+ private syncIsHydrating;
5369
5424
  private setSessionGenerating;
5370
5425
  private notifyResumeStateChange;
5371
5426
  /**
@@ -5662,6 +5717,13 @@ declare class ChatClient<TTools extends ReadonlyArray<AnyClientTool> = any, TCon
5662
5717
  * activity visible to all subscribers (e.g. across tabs/devices).
5663
5718
  */
5664
5719
  getSessionGenerating(): boolean;
5720
+ /**
5721
+ * Whether the client is rebuilding the chat from persistence: the server
5722
+ * hydrate (`persistence: true`) or an async storage adapter. Turns false once
5723
+ * the transcript is applied and any in-flight run is re-joined (from then on
5724
+ * `isLoading` covers the stream), or when the load fails.
5725
+ */
5726
+ getIsHydrating(): boolean;
5665
5727
  /**
5666
5728
  * Get current error
5667
5729
  */
@@ -5683,7 +5745,8 @@ interface StandardSchemaV1<Input = unknown, Output = Input> {
5683
5745
  readonly "~standard": {
5684
5746
  readonly version: 1;
5685
5747
  readonly vendor: string;
5686
- readonly validate: (value: unknown) => unknown; /** Type-level only; the spec keeps it undefined at runtime. */
5748
+ readonly validate: (value: unknown) => unknown;
5749
+ /** Type-level only; the spec keeps it undefined at runtime. */
5687
5750
  readonly types?: {
5688
5751
  readonly input: Input;
5689
5752
  readonly output: Output;
@@ -5833,6 +5896,8 @@ interface MountAstralBeamChatOptions {
5833
5896
  * `false` hides it and gives the transcript the full height. Default `true`.
5834
5897
  */
5835
5898
  showHeader?: boolean | undefined;
5899
+ /** Adds an X button and fullscreen chat at widths up to 900px. The host hides or unmounts chat in this callback. */
5900
+ onClose?: (() => void) | undefined;
5836
5901
  /**
5837
5902
  * Shows a bar under the header with the open conversation's title, once it has one, and a menu
5838
5903
  * to rename, delete, or copy it as Markdown. Default `false`.
@@ -5944,15 +6009,14 @@ interface SandboxCommandRun {
5944
6009
  truncated: boolean;
5945
6010
  finished: boolean;
5946
6011
  }
5947
- /** One file the agent published for the user, with the ticket its download is authorized by. */
6012
+ /** One file the agent published for the user, with its durable stored reference. */
5948
6013
  interface SandboxArtifact {
5949
6014
  toolCallId: string;
5950
6015
  path: string;
5951
6016
  label: string;
5952
6017
  mimeType: string | undefined;
5953
6018
  size: number | undefined;
5954
- /** Capability the files endpoint accepts in its query; the whole download authorization. */
5955
- ticket: string | undefined;
6019
+ fileId: string | undefined;
5956
6020
  published: boolean;
5957
6021
  }
5958
6022
  /** Everything the sandbox did in this conversation, derived from the transcript. */
@@ -6159,6 +6223,27 @@ type ChatAuthenticationState = {
6159
6223
  error: Error;
6160
6224
  };
6161
6225
  //#endregion
6226
+ //#region src/core/mcp.d.ts
6227
+ type McpConnectionOperation = {
6228
+ action: "connect";
6229
+ mcpServerId: string;
6230
+ } | {
6231
+ action: "headers";
6232
+ mcpServerId: string;
6233
+ headers: Record<string, string>;
6234
+ } | {
6235
+ action: "disconnect" | "test";
6236
+ id: string;
6237
+ };
6238
+ type McpCatalog = Awaited<ReturnType<typeof personalMcpGetCatalog>>;
6239
+ declare function manageMcpConnection(operation: McpConnectionOperation, options: JwtOptions): Promise<void | McpConnectionEncoded | PersonalMcpTestConnection200 | {
6240
+ id: string;
6241
+ }>;
6242
+ declare function authorizeMcpConnection(input: {
6243
+ mcpServerId: string;
6244
+ id?: string;
6245
+ }, requestOptions: () => Promise<JwtOptions>): Promise<string>;
6246
+ //#endregion
6162
6247
  //#region src/core/threads.d.ts
6163
6248
  /** A saved conversation visible to the signed-in tenant user. */
6164
6249
  interface ChatThread {
@@ -6238,8 +6323,15 @@ interface AstralBeamChatState {
6238
6323
  attachments: boolean;
6239
6324
  };
6240
6325
  /** The tool set currently declared to the agent, in declaration order. */
6326
+ serverToolTitles?: Readonly<Record<string, string>>;
6327
+ unavailableMcpConnections?: readonly string[];
6241
6328
  agentTools: readonly AgentToolInfo[];
6242
6329
  sandboxStatus: SandboxStatus | undefined;
6330
+ /** The usage limit that ended the last run, by display name, until another run starts. */
6331
+ usageLimitReached: {
6332
+ name: string;
6333
+ resetsAt: string;
6334
+ } | undefined;
6243
6335
  sandbox: SandboxActivity;
6244
6336
  thread: ChatThread | undefined;
6245
6337
  threadLoading: boolean;
@@ -6287,6 +6379,15 @@ interface AstralBeamChatCore {
6287
6379
  refreshThread: () => Promise<void>;
6288
6380
  loadOlderMessages: () => Promise<void>;
6289
6381
  abandonToolCall: (toolCallId: string) => Promise<void>;
6382
+ uploadAttachment: (file: {
6383
+ data: string | Promise<string>;
6384
+ filename: string;
6385
+ mimeType: string;
6386
+ }) => Promise<UploadedChatFile>;
6387
+ getFile: (fileId: string) => Promise<Blob>;
6388
+ getMcpCatalog: () => Promise<McpCatalog>;
6389
+ manageMcpConnection: (operation: McpConnectionOperation) => ReturnType<typeof manageMcpConnection>;
6390
+ authorizeMcpConnection: (input: Parameters<typeof authorizeMcpConnection>[0]) => Promise<void>;
6290
6391
  getAttachment: (messageId: string, partId: string) => Promise<Blob>;
6291
6392
  /** Tears the session down: the connection, authentication, and widget renders. */
6292
6393
  dispose: () => void;
@@ -6321,7 +6422,7 @@ declare function isSandboxTool(name: string): boolean;
6321
6422
  declare function sandboxRefusal(part: ToolCallPart): string | undefined;
6322
6423
  /** A `sandbox_write_file` call, readable while its content is still streaming in. */
6323
6424
  declare function readSandboxFileWrite(part: ToolCallPart): SandboxFileWrite | undefined;
6324
- /** A `sandbox_publish_artifact` call whose output carries the download ticket. */
6425
+ /** A `sandbox_publish_artifact` call whose output carries a durable file reference. */
6325
6426
  declare function readSandboxArtifact(part: ToolCallPart): SandboxArtifact | undefined;
6326
6427
  /** A `sandbox_run_command` call. `stdout` holds combined output on providers with no stderr. */
6327
6428
  declare function readSandboxCommandRun(part: ToolCallPart): SandboxCommandRun | undefined;
@@ -6354,4 +6455,26 @@ interface TypedToolDefinition<S extends ParametersSchema = JsonSchemaObject> {
6354
6455
  /** Declares a host tool; a Standard Schema `parameters` types (and validates) `execute`'s input. */
6355
6456
  declare function defineTool<const S extends ParametersSchema = JsonSchemaObject>(tool: TypedToolDefinition<S>): ToolDefinition;
6356
6457
  //#endregion
6357
- export { ChatAuthenticationState as A, AstralBeamChatTheme as B, AstralBeamChatState as C, createAstralBeamChat as D, WidgetRenderRequest as E, SandboxArtifact as F, StandardSchemaV1 as G, InferParameters as H, SandboxCommandRun as I, ToolDefinition as K, SandboxFileWrite as L, buildAgentTools as M, RenderWidgetInput as N, ChatPendingInteraction as O, SandboxActivity as P, SandboxStatus as R, AstralBeamChatCoreOptions as S, ChatSubmissionCallbacks as T, JsonSchemaObject as U, AstralBeamTokenSource as V, ParametersSchema as W, hasPendingToolRun as _, SANDBOX_PUBLISH_ARTIFACT_TOOL as a, AgentToolInfo as b, SANDBOX_STATUS_EVENT as c, describeSandboxCommandRun as d, isSandboxTool as f, sandboxRefusal as g, readSandboxFileWrite as h, SANDBOX_LIST_FILES_TOOL as i, WidgetDeclaration as j, ChatThread as k, SANDBOX_WRITE_FILE_TOOL as l, readSandboxCommandRun as m, ASK_QUESTIONNAIRE_TOOL as n, SANDBOX_READ_FILE_TOOL as o, readSandboxArtifact as p, RENDER_WIDGET_TOOL as r, SANDBOX_RUN_COMMAND_TOOL as s, defineTool as t, collectSandboxActivity as u, isSettledToolCall as v, ChatStreamCallbacks as w, AstralBeamChatCore as x, lastPartInProgress as y, AstralBeamChatColorScheme as z };
6458
+ //#region src/core/web.d.ts
6459
+ interface WebSource {
6460
+ url: string;
6461
+ title: string;
6462
+ excerpt?: string;
6463
+ }
6464
+ interface WebCitation extends WebSource {
6465
+ /** UTF-16 offsets into the text part. The link follows endIndex. */
6466
+ startIndex: number;
6467
+ endIndex: number;
6468
+ /** Response-wide citation number. */
6469
+ number: number;
6470
+ }
6471
+ interface WebEvidence {
6472
+ sources: WebSource[];
6473
+ citations: WebCitation[];
6474
+ }
6475
+ interface WebPartMetadata {
6476
+ providerExecuted?: boolean;
6477
+ web?: WebEvidence;
6478
+ }
6479
+ //#endregion
6480
+ export { WidgetRenderRequest as A, SandboxActivity as B, lastPartInProgress as C, AstralBeamChatState as D, AstralBeamChatCoreOptions as E, McpConnectionOperation as F, AstralBeamChatColorScheme as G, SandboxCommandRun as H, ChatAuthenticationState as I, InferParameters as J, AstralBeamChatTheme as K, WidgetDeclaration as L, ChatPendingInteraction as M, ChatThread as N, ChatStreamCallbacks as O, McpCatalog as P, ToolDefinition as Q, buildAgentTools as R, isSettledToolCall as S, AstralBeamChatCore as T, SandboxFileWrite as U, SandboxArtifact as V, SandboxStatus as W, ParametersSchema as X, JsonSchemaObject as Y, StandardSchemaV1 as Z, readSandboxArtifact as _, defineTool as a, sandboxRefusal as b, SANDBOX_LIST_FILES_TOOL as c, SANDBOX_RUN_COMMAND_TOOL as d, SANDBOX_STATUS_EVENT as f, isSandboxTool as g, describeSandboxCommandRun as h, WebSource as i, createAstralBeamChat as j, ChatSubmissionCallbacks as k, SANDBOX_PUBLISH_ARTIFACT_TOOL as l, collectSandboxActivity as m, WebEvidence as n, ASK_QUESTIONNAIRE_TOOL as o, SANDBOX_WRITE_FILE_TOOL as p, AstralBeamTokenSource as q, WebPartMetadata as r, RENDER_WIDGET_TOOL as s, WebCitation as t, SANDBOX_READ_FILE_TOOL as u, readSandboxCommandRun as v, AgentToolInfo as w, hasPendingToolRun as x, readSandboxFileWrite as y, RenderWidgetInput as z };