@iota-uz/sdk 0.4.24 → 0.4.26

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.
@@ -38,21 +38,18 @@ interface SessionStore {
38
38
  deletedMessages: number;
39
39
  deletedArtifacts: number;
40
40
  }>;
41
- compactSessionHistory(sessionId: string): Promise<{
42
- success: boolean;
43
- summary: string;
44
- deletedMessages: number;
45
- deletedArtifacts: number;
46
- }>;
41
+ compactSessionHistory(sessionId: string): Promise<AsyncRunAccepted>;
47
42
  }
48
43
  interface MessageTransport {
49
44
  sendMessage(sessionId: string, content: string, attachments?: Attachment$1[], signal?: AbortSignal, options?: SendMessageOptions): AsyncGenerator<StreamChunk>;
50
45
  submitQuestionAnswers(sessionId: string, questionId: string, answers: QuestionAnswers): Promise<{
51
46
  success: boolean;
47
+ data?: AsyncRunAccepted;
52
48
  error?: string;
53
49
  }>;
54
50
  rejectPendingQuestion(sessionId: string): Promise<{
55
51
  success: boolean;
52
+ data?: AsyncRunAccepted;
56
53
  error?: string;
57
54
  }>;
58
55
  }
@@ -393,6 +390,13 @@ interface StreamStatus {
393
390
  snapshot?: StreamSnapshotPayload;
394
391
  startedAt?: number;
395
392
  }
393
+ interface AsyncRunAccepted {
394
+ accepted: true;
395
+ operation: 'question_submit' | 'question_reject' | 'session_compact';
396
+ sessionId: string;
397
+ runId: string;
398
+ startedAt: number;
399
+ }
396
400
  /**
397
401
  * @deprecated Use `StreamEvent` instead. `StreamChunk` is kept for backwards
398
402
  * compatibility but the flat all-optional shape is unsound.
@@ -525,6 +529,7 @@ interface SessionDebugUsage {
525
529
  interface SendMessageOptions {
526
530
  debugMode?: boolean;
527
531
  replaceFromMessageID?: string;
532
+ reasoningEffort?: string;
528
533
  }
529
534
  interface SessionListResult$1 {
530
535
  sessions: Session$1[];
@@ -584,23 +589,15 @@ interface ChatDataSource {
584
589
  deletedMessages: number;
585
590
  deletedArtifacts: number;
586
591
  }>;
587
- compactSessionHistory(sessionId: string): Promise<{
588
- success: boolean;
589
- summary: string;
590
- deletedMessages: number;
591
- deletedArtifacts: number;
592
- }>;
592
+ compactSessionHistory(sessionId: string): Promise<AsyncRunAccepted>;
593
593
  submitQuestionAnswers(sessionId: string, questionId: string, answers: QuestionAnswers): Promise<{
594
594
  success: boolean;
595
+ data?: AsyncRunAccepted;
595
596
  error?: string;
596
- data?: {
597
- session: Session$1;
598
- turns: ConversationTurn$1[];
599
- pendingQuestion?: PendingQuestion$1 | null;
600
- };
601
597
  }>;
602
598
  rejectPendingQuestion(sessionId: string): Promise<{
603
599
  success: boolean;
600
+ data?: AsyncRunAccepted;
604
601
  error?: string;
605
602
  }>;
606
603
  /**
@@ -619,12 +616,6 @@ interface ChatDataSource {
619
616
  * Optional; if absent, resume is not supported.
620
617
  */
621
618
  resumeStream?(sessionId: string, runId: string, onChunk: (chunk: StreamChunk) => void, signal?: AbortSignal): Promise<void>;
622
- /**
623
- * @deprecated Pass `onSessionCreated` to `ChatSessionProvider` instead.
624
- * This method couples navigation to the data source, causing component
625
- * remounts during active streams.
626
- */
627
- navigateToSession?(sessionId: string): void;
628
619
  listSessions(options?: {
629
620
  limit?: number;
630
621
  offset?: number;
@@ -662,8 +653,10 @@ interface ChatSessionStateValue {
662
653
  debugMode: boolean;
663
654
  sessionDebugUsage: SessionDebugUsage;
664
655
  debugLimits: DebugLimits | null;
656
+ reasoningEffort: string | undefined;
665
657
  setError: (error: string | null) => void;
666
658
  retryFetchSession: () => void;
659
+ setReasoningEffort: (effort: string) => void;
667
660
  }
668
661
  interface ChatMessagingStateValue {
669
662
  turns: ConversationTurn$1[];
@@ -758,8 +751,6 @@ interface ChatSessionProps {
758
751
  /**
759
752
  * Called when a new session is created (e.g. on first message in a "new
760
753
  * chat"). Use this to navigate your SPA router to the new session URL.
761
- *
762
- * Replaces the deprecated `dataSource.navigateToSession`.
763
754
  */
764
755
  onSessionCreated?: (sessionId: string) => void;
765
756
  /** Alias for isReadOnly (preferred) */
@@ -1080,10 +1071,8 @@ interface AssistantMessageProps {
1080
1071
  hideTimestamp?: boolean;
1081
1072
  /** Show debug panel */
1082
1073
  showDebug?: boolean;
1083
- /** Context/token limits for debug usage ratio */
1084
- debugLimits?: DebugLimits | null;
1085
1074
  }
1086
- declare function AssistantMessage({ turn, turnId, isLastTurn, isStreaming, pendingQuestion, slots, classNames: classNameOverrides, onCopy, onRegenerate, onSendMessage, sendDisabled, hideAvatar, hideActions, hideTimestamp, showDebug, debugLimits, }: AssistantMessageProps): react_jsx_runtime.JSX.Element;
1075
+ declare function AssistantMessage({ turn, turnId, isLastTurn, isStreaming, pendingQuestion, slots, classNames: classNameOverrides, onCopy, onRegenerate, onSendMessage, sendDisabled, hideAvatar, hideActions, hideTimestamp, showDebug, }: AssistantMessageProps): react_jsx_runtime.JSX.Element;
1087
1076
 
1088
1077
  interface AssistantTurnViewProps {
1089
1078
  /** The conversation turn containing the assistant response */
@@ -1222,6 +1211,9 @@ interface MessageInputProps {
1222
1211
  maxFileSize?: number;
1223
1212
  containerClassName?: string;
1224
1213
  formClassName?: string;
1214
+ reasoningEffortOptions?: string[];
1215
+ reasoningEffort?: string;
1216
+ onReasoningEffortChange?: (effort: string) => void;
1225
1217
  }
1226
1218
  declare const MessageInput: react.ForwardRefExoticComponent<MessageInputProps & react.RefAttributes<MessageInputRef>>;
1227
1219
 
@@ -1927,9 +1919,8 @@ declare function SystemMessage({ content, createdAt, onCopy, hideActions, hideTi
1927
1919
 
1928
1920
  interface DebugPanelProps {
1929
1921
  trace?: DebugTrace$1;
1930
- debugLimits?: DebugLimits | null;
1931
1922
  }
1932
- declare function DebugPanel({ trace, debugLimits }: DebugPanelProps): react_jsx_runtime.JSX.Element;
1923
+ declare function DebugPanel({ trace }: DebugPanelProps): react_jsx_runtime.JSX.Element;
1933
1924
 
1934
1925
  /**
1935
1926
  * Alert Component
@@ -2708,11 +2699,11 @@ type BichatRPC = {
2708
2699
  };
2709
2700
  "bichat.question.reject": {
2710
2701
  params: QuestionCancelParams;
2711
- result: SessionGetResult;
2702
+ result: AsyncRunAcceptedResult;
2712
2703
  };
2713
2704
  "bichat.question.submit": {
2714
2705
  params: QuestionSubmitParams;
2715
- result: SessionGetResult;
2706
+ result: AsyncRunAcceptedResult;
2716
2707
  };
2717
2708
  "bichat.session.archive": {
2718
2709
  params: SessionIDParams;
@@ -2728,7 +2719,7 @@ type BichatRPC = {
2728
2719
  };
2729
2720
  "bichat.session.compact": {
2730
2721
  params: SessionIDParams;
2731
- result: SessionCompactResult;
2722
+ result: AsyncRunAcceptedResult;
2732
2723
  };
2733
2724
  "bichat.session.create": {
2734
2725
  params: SessionCreateParams;
@@ -2791,7 +2782,7 @@ type BichatRPC = {
2791
2782
  result: SessionUploadArtifactsResult;
2792
2783
  };
2793
2784
  "bichat.user.list": {
2794
- params: PingParams;
2785
+ params: UserListParams;
2795
2786
  result: UserListResult;
2796
2787
  };
2797
2788
  };
@@ -2832,6 +2823,13 @@ interface AssistantTurn {
2832
2823
  codeOutputs: CodeOutput[];
2833
2824
  createdAt: string;
2834
2825
  }
2826
+ interface AsyncRunAcceptedResult {
2827
+ accepted: boolean;
2828
+ operation: string;
2829
+ sessionId: string;
2830
+ runId: string;
2831
+ startedAt: number;
2832
+ }
2835
2833
  interface Attachment {
2836
2834
  id: string;
2837
2835
  uploadId?: number | null;
@@ -3011,12 +3009,6 @@ interface SessionClearResult {
3011
3009
  deletedMessages: number;
3012
3010
  deletedArtifacts: number;
3013
3011
  }
3014
- interface SessionCompactResult {
3015
- success: boolean;
3016
- summary: string;
3017
- deletedMessages: number;
3018
- deletedArtifacts: number;
3019
- }
3020
3012
  interface SessionCreateParams {
3021
3013
  title: string;
3022
3014
  }
@@ -3101,6 +3093,7 @@ interface ToolCall {
3101
3093
  error?: string;
3102
3094
  durationMs?: number;
3103
3095
  }
3096
+ type UserListParams = Record<string, never>;
3104
3097
  interface UserListResult {
3105
3098
  users: SessionUser[];
3106
3099
  }
@@ -3145,13 +3138,8 @@ interface HttpDataSourceConfig {
3145
3138
  uploadEndpoint?: string;
3146
3139
  csrfToken?: string | (() => string);
3147
3140
  headers?: Record<string, string>;
3148
- timeout?: number;
3149
- /**
3150
- * @deprecated Pass `onSessionCreated` to `ChatSessionProvider` or
3151
- * `ChatSession` instead. Coupling navigation to the data source causes
3152
- * component remounts during active streams.
3153
- */
3154
- navigateToSession?: (sessionId: string) => void;
3141
+ rpcTimeoutMs?: number;
3142
+ streamConnectTimeoutMs?: number;
3155
3143
  }
3156
3144
  declare class HttpDataSource implements ChatDataSource {
3157
3145
  private config;
@@ -3183,12 +3171,7 @@ declare class HttpDataSource implements ChatDataSource {
3183
3171
  deletedMessages: number;
3184
3172
  deletedArtifacts: number;
3185
3173
  }>;
3186
- compactSessionHistory(sessionId: string): Promise<{
3187
- success: boolean;
3188
- summary: string;
3189
- deletedMessages: number;
3190
- deletedArtifacts: number;
3191
- }>;
3174
+ compactSessionHistory(sessionId: string): Promise<AsyncRunAccepted>;
3192
3175
  listUsers(): Promise<SessionUser$1[]>;
3193
3176
  listAllSessions(options?: {
3194
3177
  limit?: number;
@@ -3211,15 +3194,12 @@ declare class HttpDataSource implements ChatDataSource {
3211
3194
  cancelStream(): void;
3212
3195
  submitQuestionAnswers(sessionId: string, questionId: string, answers: QuestionAnswers): Promise<{
3213
3196
  success: boolean;
3197
+ data?: AsyncRunAccepted;
3214
3198
  error?: string;
3215
- data?: {
3216
- session: Session$1;
3217
- turns: ConversationTurn$1[];
3218
- pendingQuestion?: PendingQuestion$1 | null;
3219
- };
3220
3199
  }>;
3221
3200
  rejectPendingQuestion(sessionId: string): Promise<{
3222
3201
  success: boolean;
3202
+ data?: AsyncRunAccepted;
3223
3203
  error?: string;
3224
3204
  }>;
3225
3205
  fetchSessionArtifacts(sessionId: string, options?: {
@@ -3235,10 +3215,6 @@ declare class HttpDataSource implements ChatDataSource {
3235
3215
  }>;
3236
3216
  renameSessionArtifact(artifactId: string, name: string, description?: string): Promise<SessionArtifact>;
3237
3217
  deleteSessionArtifact(artifactId: string): Promise<void>;
3238
- /**
3239
- * @deprecated Pass `onSessionCreated` to `ChatSessionProvider` instead.
3240
- */
3241
- navigateToSession?(sessionId: string): void;
3242
3218
  }
3243
3219
  /**
3244
3220
  * Factory function to create HttpDataSource
@@ -3261,7 +3237,8 @@ declare function createHttpDataSource(config: HttpDataSourceConfig): ChatDataSou
3261
3237
  * @throws Error if window.__APPLET_CONTEXT__ is not available
3262
3238
  */
3263
3239
  declare function useHttpDataSourceConfigFromApplet(options?: {
3264
- timeout?: number;
3240
+ rpcTimeoutMs?: number;
3241
+ streamConnectTimeoutMs?: number;
3265
3242
  }): HttpDataSourceConfig;
3266
3243
 
3267
3244
  /**
@@ -3639,8 +3616,6 @@ interface ChatSessionProviderProps {
3639
3616
  /**
3640
3617
  * Called when the machine creates a new session (e.g. on first message in a
3641
3618
  * "new chat"). Use this to navigate your SPA router to the new session URL.
3642
- *
3643
- * Replaces the deprecated `dataSource.navigateToSession`.
3644
3619
  */
3645
3620
  onSessionCreated?: (sessionId: string) => void;
3646
3621
  children: ReactNode;
@@ -3702,6 +3677,7 @@ interface Extensions {
3702
3677
  llm?: {
3703
3678
  provider?: string;
3704
3679
  apiKeyConfigured?: boolean;
3680
+ reasoningEffortOptions?: string[];
3705
3681
  };
3706
3682
  debug?: {
3707
3683
  limits?: {
@@ -3894,8 +3870,10 @@ interface SessionSnapshot {
3894
3870
  debugMode: boolean;
3895
3871
  sessionDebugUsage: SessionDebugUsage;
3896
3872
  debugLimits: DebugLimits | null;
3873
+ reasoningEffort: string | undefined;
3897
3874
  setError: (error: string | null) => void;
3898
3875
  retryFetchSession: () => void;
3876
+ setReasoningEffort: (effort: string) => void;
3899
3877
  }
3900
3878
  /** Superset of ChatMessagingStateValue used internally by the state machine; includes internal-only fields such as generationInProgress. */
3901
3879
  interface MessagingSnapshot {
@@ -3973,6 +3951,7 @@ declare class ChatMachine {
3973
3951
  private sendingSessionId;
3974
3952
  private fetchCancelled;
3975
3953
  private disposed;
3954
+ private reasoningEffortOptions;
3976
3955
  /** Memoized sessionDebugUsage — avoids unnecessary session re-renders during streaming. */
3977
3956
  private lastSessionDebugUsage;
3978
3957
  /** Interval handle for passive polling when another tab has an active stream. */
@@ -4013,7 +3992,10 @@ declare class ChatMachine {
4013
3992
  readonly enqueueMessage: (content: string, attachments: Attachment$1[]) => boolean;
4014
3993
  readonly removeQueueItem: (index: number) => void;
4015
3994
  readonly updateQueueItem: (index: number, content: string) => void;
3995
+ readonly setReasoningEffort: (effort: string) => void;
4016
3996
  constructor(config: ChatMachineConfig);
3997
+ private buildReasoningEffortOptions;
3998
+ private sanitizeReasoningEffort;
4017
3999
  /**
4018
4000
  * Set the active session ID. Triggers fetch when transitioning to a real
4019
4001
  * session, or resets state for 'new'/undefined.
@@ -4040,6 +4022,7 @@ declare class ChatMachine {
4040
4022
  private _persistQueue;
4041
4023
  private _setDebugModeForSession;
4042
4024
  private _hydrateDebugModeForSession;
4025
+ private _setReasoningEffort;
4043
4026
  private _fetchSessionIfNeeded;
4044
4027
  /**
4045
4028
  * Sets turns from fetch, preserving pending user-only turns if server hasn't caught up.
@@ -4054,6 +4037,7 @@ declare class ChatMachine {
4054
4037
  private _stopPassivePolling;
4055
4038
  private _startPassivePolling;
4056
4039
  private _runResumeStream;
4040
+ private _resumeAcceptedRunOrPoll;
4057
4041
  private _setError;
4058
4042
  private _retryFetchSession;
4059
4043
  private _clearStreamError;
@@ -38,21 +38,18 @@ interface SessionStore {
38
38
  deletedMessages: number;
39
39
  deletedArtifacts: number;
40
40
  }>;
41
- compactSessionHistory(sessionId: string): Promise<{
42
- success: boolean;
43
- summary: string;
44
- deletedMessages: number;
45
- deletedArtifacts: number;
46
- }>;
41
+ compactSessionHistory(sessionId: string): Promise<AsyncRunAccepted>;
47
42
  }
48
43
  interface MessageTransport {
49
44
  sendMessage(sessionId: string, content: string, attachments?: Attachment$1[], signal?: AbortSignal, options?: SendMessageOptions): AsyncGenerator<StreamChunk>;
50
45
  submitQuestionAnswers(sessionId: string, questionId: string, answers: QuestionAnswers): Promise<{
51
46
  success: boolean;
47
+ data?: AsyncRunAccepted;
52
48
  error?: string;
53
49
  }>;
54
50
  rejectPendingQuestion(sessionId: string): Promise<{
55
51
  success: boolean;
52
+ data?: AsyncRunAccepted;
56
53
  error?: string;
57
54
  }>;
58
55
  }
@@ -393,6 +390,13 @@ interface StreamStatus {
393
390
  snapshot?: StreamSnapshotPayload;
394
391
  startedAt?: number;
395
392
  }
393
+ interface AsyncRunAccepted {
394
+ accepted: true;
395
+ operation: 'question_submit' | 'question_reject' | 'session_compact';
396
+ sessionId: string;
397
+ runId: string;
398
+ startedAt: number;
399
+ }
396
400
  /**
397
401
  * @deprecated Use `StreamEvent` instead. `StreamChunk` is kept for backwards
398
402
  * compatibility but the flat all-optional shape is unsound.
@@ -525,6 +529,7 @@ interface SessionDebugUsage {
525
529
  interface SendMessageOptions {
526
530
  debugMode?: boolean;
527
531
  replaceFromMessageID?: string;
532
+ reasoningEffort?: string;
528
533
  }
529
534
  interface SessionListResult$1 {
530
535
  sessions: Session$1[];
@@ -584,23 +589,15 @@ interface ChatDataSource {
584
589
  deletedMessages: number;
585
590
  deletedArtifacts: number;
586
591
  }>;
587
- compactSessionHistory(sessionId: string): Promise<{
588
- success: boolean;
589
- summary: string;
590
- deletedMessages: number;
591
- deletedArtifacts: number;
592
- }>;
592
+ compactSessionHistory(sessionId: string): Promise<AsyncRunAccepted>;
593
593
  submitQuestionAnswers(sessionId: string, questionId: string, answers: QuestionAnswers): Promise<{
594
594
  success: boolean;
595
+ data?: AsyncRunAccepted;
595
596
  error?: string;
596
- data?: {
597
- session: Session$1;
598
- turns: ConversationTurn$1[];
599
- pendingQuestion?: PendingQuestion$1 | null;
600
- };
601
597
  }>;
602
598
  rejectPendingQuestion(sessionId: string): Promise<{
603
599
  success: boolean;
600
+ data?: AsyncRunAccepted;
604
601
  error?: string;
605
602
  }>;
606
603
  /**
@@ -619,12 +616,6 @@ interface ChatDataSource {
619
616
  * Optional; if absent, resume is not supported.
620
617
  */
621
618
  resumeStream?(sessionId: string, runId: string, onChunk: (chunk: StreamChunk) => void, signal?: AbortSignal): Promise<void>;
622
- /**
623
- * @deprecated Pass `onSessionCreated` to `ChatSessionProvider` instead.
624
- * This method couples navigation to the data source, causing component
625
- * remounts during active streams.
626
- */
627
- navigateToSession?(sessionId: string): void;
628
619
  listSessions(options?: {
629
620
  limit?: number;
630
621
  offset?: number;
@@ -662,8 +653,10 @@ interface ChatSessionStateValue {
662
653
  debugMode: boolean;
663
654
  sessionDebugUsage: SessionDebugUsage;
664
655
  debugLimits: DebugLimits | null;
656
+ reasoningEffort: string | undefined;
665
657
  setError: (error: string | null) => void;
666
658
  retryFetchSession: () => void;
659
+ setReasoningEffort: (effort: string) => void;
667
660
  }
668
661
  interface ChatMessagingStateValue {
669
662
  turns: ConversationTurn$1[];
@@ -758,8 +751,6 @@ interface ChatSessionProps {
758
751
  /**
759
752
  * Called when a new session is created (e.g. on first message in a "new
760
753
  * chat"). Use this to navigate your SPA router to the new session URL.
761
- *
762
- * Replaces the deprecated `dataSource.navigateToSession`.
763
754
  */
764
755
  onSessionCreated?: (sessionId: string) => void;
765
756
  /** Alias for isReadOnly (preferred) */
@@ -1080,10 +1071,8 @@ interface AssistantMessageProps {
1080
1071
  hideTimestamp?: boolean;
1081
1072
  /** Show debug panel */
1082
1073
  showDebug?: boolean;
1083
- /** Context/token limits for debug usage ratio */
1084
- debugLimits?: DebugLimits | null;
1085
1074
  }
1086
- declare function AssistantMessage({ turn, turnId, isLastTurn, isStreaming, pendingQuestion, slots, classNames: classNameOverrides, onCopy, onRegenerate, onSendMessage, sendDisabled, hideAvatar, hideActions, hideTimestamp, showDebug, debugLimits, }: AssistantMessageProps): react_jsx_runtime.JSX.Element;
1075
+ declare function AssistantMessage({ turn, turnId, isLastTurn, isStreaming, pendingQuestion, slots, classNames: classNameOverrides, onCopy, onRegenerate, onSendMessage, sendDisabled, hideAvatar, hideActions, hideTimestamp, showDebug, }: AssistantMessageProps): react_jsx_runtime.JSX.Element;
1087
1076
 
1088
1077
  interface AssistantTurnViewProps {
1089
1078
  /** The conversation turn containing the assistant response */
@@ -1222,6 +1211,9 @@ interface MessageInputProps {
1222
1211
  maxFileSize?: number;
1223
1212
  containerClassName?: string;
1224
1213
  formClassName?: string;
1214
+ reasoningEffortOptions?: string[];
1215
+ reasoningEffort?: string;
1216
+ onReasoningEffortChange?: (effort: string) => void;
1225
1217
  }
1226
1218
  declare const MessageInput: react.ForwardRefExoticComponent<MessageInputProps & react.RefAttributes<MessageInputRef>>;
1227
1219
 
@@ -1927,9 +1919,8 @@ declare function SystemMessage({ content, createdAt, onCopy, hideActions, hideTi
1927
1919
 
1928
1920
  interface DebugPanelProps {
1929
1921
  trace?: DebugTrace$1;
1930
- debugLimits?: DebugLimits | null;
1931
1922
  }
1932
- declare function DebugPanel({ trace, debugLimits }: DebugPanelProps): react_jsx_runtime.JSX.Element;
1923
+ declare function DebugPanel({ trace }: DebugPanelProps): react_jsx_runtime.JSX.Element;
1933
1924
 
1934
1925
  /**
1935
1926
  * Alert Component
@@ -2708,11 +2699,11 @@ type BichatRPC = {
2708
2699
  };
2709
2700
  "bichat.question.reject": {
2710
2701
  params: QuestionCancelParams;
2711
- result: SessionGetResult;
2702
+ result: AsyncRunAcceptedResult;
2712
2703
  };
2713
2704
  "bichat.question.submit": {
2714
2705
  params: QuestionSubmitParams;
2715
- result: SessionGetResult;
2706
+ result: AsyncRunAcceptedResult;
2716
2707
  };
2717
2708
  "bichat.session.archive": {
2718
2709
  params: SessionIDParams;
@@ -2728,7 +2719,7 @@ type BichatRPC = {
2728
2719
  };
2729
2720
  "bichat.session.compact": {
2730
2721
  params: SessionIDParams;
2731
- result: SessionCompactResult;
2722
+ result: AsyncRunAcceptedResult;
2732
2723
  };
2733
2724
  "bichat.session.create": {
2734
2725
  params: SessionCreateParams;
@@ -2791,7 +2782,7 @@ type BichatRPC = {
2791
2782
  result: SessionUploadArtifactsResult;
2792
2783
  };
2793
2784
  "bichat.user.list": {
2794
- params: PingParams;
2785
+ params: UserListParams;
2795
2786
  result: UserListResult;
2796
2787
  };
2797
2788
  };
@@ -2832,6 +2823,13 @@ interface AssistantTurn {
2832
2823
  codeOutputs: CodeOutput[];
2833
2824
  createdAt: string;
2834
2825
  }
2826
+ interface AsyncRunAcceptedResult {
2827
+ accepted: boolean;
2828
+ operation: string;
2829
+ sessionId: string;
2830
+ runId: string;
2831
+ startedAt: number;
2832
+ }
2835
2833
  interface Attachment {
2836
2834
  id: string;
2837
2835
  uploadId?: number | null;
@@ -3011,12 +3009,6 @@ interface SessionClearResult {
3011
3009
  deletedMessages: number;
3012
3010
  deletedArtifacts: number;
3013
3011
  }
3014
- interface SessionCompactResult {
3015
- success: boolean;
3016
- summary: string;
3017
- deletedMessages: number;
3018
- deletedArtifacts: number;
3019
- }
3020
3012
  interface SessionCreateParams {
3021
3013
  title: string;
3022
3014
  }
@@ -3101,6 +3093,7 @@ interface ToolCall {
3101
3093
  error?: string;
3102
3094
  durationMs?: number;
3103
3095
  }
3096
+ type UserListParams = Record<string, never>;
3104
3097
  interface UserListResult {
3105
3098
  users: SessionUser[];
3106
3099
  }
@@ -3145,13 +3138,8 @@ interface HttpDataSourceConfig {
3145
3138
  uploadEndpoint?: string;
3146
3139
  csrfToken?: string | (() => string);
3147
3140
  headers?: Record<string, string>;
3148
- timeout?: number;
3149
- /**
3150
- * @deprecated Pass `onSessionCreated` to `ChatSessionProvider` or
3151
- * `ChatSession` instead. Coupling navigation to the data source causes
3152
- * component remounts during active streams.
3153
- */
3154
- navigateToSession?: (sessionId: string) => void;
3141
+ rpcTimeoutMs?: number;
3142
+ streamConnectTimeoutMs?: number;
3155
3143
  }
3156
3144
  declare class HttpDataSource implements ChatDataSource {
3157
3145
  private config;
@@ -3183,12 +3171,7 @@ declare class HttpDataSource implements ChatDataSource {
3183
3171
  deletedMessages: number;
3184
3172
  deletedArtifacts: number;
3185
3173
  }>;
3186
- compactSessionHistory(sessionId: string): Promise<{
3187
- success: boolean;
3188
- summary: string;
3189
- deletedMessages: number;
3190
- deletedArtifacts: number;
3191
- }>;
3174
+ compactSessionHistory(sessionId: string): Promise<AsyncRunAccepted>;
3192
3175
  listUsers(): Promise<SessionUser$1[]>;
3193
3176
  listAllSessions(options?: {
3194
3177
  limit?: number;
@@ -3211,15 +3194,12 @@ declare class HttpDataSource implements ChatDataSource {
3211
3194
  cancelStream(): void;
3212
3195
  submitQuestionAnswers(sessionId: string, questionId: string, answers: QuestionAnswers): Promise<{
3213
3196
  success: boolean;
3197
+ data?: AsyncRunAccepted;
3214
3198
  error?: string;
3215
- data?: {
3216
- session: Session$1;
3217
- turns: ConversationTurn$1[];
3218
- pendingQuestion?: PendingQuestion$1 | null;
3219
- };
3220
3199
  }>;
3221
3200
  rejectPendingQuestion(sessionId: string): Promise<{
3222
3201
  success: boolean;
3202
+ data?: AsyncRunAccepted;
3223
3203
  error?: string;
3224
3204
  }>;
3225
3205
  fetchSessionArtifacts(sessionId: string, options?: {
@@ -3235,10 +3215,6 @@ declare class HttpDataSource implements ChatDataSource {
3235
3215
  }>;
3236
3216
  renameSessionArtifact(artifactId: string, name: string, description?: string): Promise<SessionArtifact>;
3237
3217
  deleteSessionArtifact(artifactId: string): Promise<void>;
3238
- /**
3239
- * @deprecated Pass `onSessionCreated` to `ChatSessionProvider` instead.
3240
- */
3241
- navigateToSession?(sessionId: string): void;
3242
3218
  }
3243
3219
  /**
3244
3220
  * Factory function to create HttpDataSource
@@ -3261,7 +3237,8 @@ declare function createHttpDataSource(config: HttpDataSourceConfig): ChatDataSou
3261
3237
  * @throws Error if window.__APPLET_CONTEXT__ is not available
3262
3238
  */
3263
3239
  declare function useHttpDataSourceConfigFromApplet(options?: {
3264
- timeout?: number;
3240
+ rpcTimeoutMs?: number;
3241
+ streamConnectTimeoutMs?: number;
3265
3242
  }): HttpDataSourceConfig;
3266
3243
 
3267
3244
  /**
@@ -3639,8 +3616,6 @@ interface ChatSessionProviderProps {
3639
3616
  /**
3640
3617
  * Called when the machine creates a new session (e.g. on first message in a
3641
3618
  * "new chat"). Use this to navigate your SPA router to the new session URL.
3642
- *
3643
- * Replaces the deprecated `dataSource.navigateToSession`.
3644
3619
  */
3645
3620
  onSessionCreated?: (sessionId: string) => void;
3646
3621
  children: ReactNode;
@@ -3702,6 +3677,7 @@ interface Extensions {
3702
3677
  llm?: {
3703
3678
  provider?: string;
3704
3679
  apiKeyConfigured?: boolean;
3680
+ reasoningEffortOptions?: string[];
3705
3681
  };
3706
3682
  debug?: {
3707
3683
  limits?: {
@@ -3894,8 +3870,10 @@ interface SessionSnapshot {
3894
3870
  debugMode: boolean;
3895
3871
  sessionDebugUsage: SessionDebugUsage;
3896
3872
  debugLimits: DebugLimits | null;
3873
+ reasoningEffort: string | undefined;
3897
3874
  setError: (error: string | null) => void;
3898
3875
  retryFetchSession: () => void;
3876
+ setReasoningEffort: (effort: string) => void;
3899
3877
  }
3900
3878
  /** Superset of ChatMessagingStateValue used internally by the state machine; includes internal-only fields such as generationInProgress. */
3901
3879
  interface MessagingSnapshot {
@@ -3973,6 +3951,7 @@ declare class ChatMachine {
3973
3951
  private sendingSessionId;
3974
3952
  private fetchCancelled;
3975
3953
  private disposed;
3954
+ private reasoningEffortOptions;
3976
3955
  /** Memoized sessionDebugUsage — avoids unnecessary session re-renders during streaming. */
3977
3956
  private lastSessionDebugUsage;
3978
3957
  /** Interval handle for passive polling when another tab has an active stream. */
@@ -4013,7 +3992,10 @@ declare class ChatMachine {
4013
3992
  readonly enqueueMessage: (content: string, attachments: Attachment$1[]) => boolean;
4014
3993
  readonly removeQueueItem: (index: number) => void;
4015
3994
  readonly updateQueueItem: (index: number, content: string) => void;
3995
+ readonly setReasoningEffort: (effort: string) => void;
4016
3996
  constructor(config: ChatMachineConfig);
3997
+ private buildReasoningEffortOptions;
3998
+ private sanitizeReasoningEffort;
4017
3999
  /**
4018
4000
  * Set the active session ID. Triggers fetch when transitioning to a real
4019
4001
  * session, or resets state for 'new'/undefined.
@@ -4040,6 +4022,7 @@ declare class ChatMachine {
4040
4022
  private _persistQueue;
4041
4023
  private _setDebugModeForSession;
4042
4024
  private _hydrateDebugModeForSession;
4025
+ private _setReasoningEffort;
4043
4026
  private _fetchSessionIfNeeded;
4044
4027
  /**
4045
4028
  * Sets turns from fetch, preserving pending user-only turns if server hasn't caught up.
@@ -4054,6 +4037,7 @@ declare class ChatMachine {
4054
4037
  private _stopPassivePolling;
4055
4038
  private _startPassivePolling;
4056
4039
  private _runResumeStream;
4040
+ private _resumeAcceptedRunOrPoll;
4057
4041
  private _setError;
4058
4042
  private _retryFetchSession;
4059
4043
  private _clearStreamError;