@smartspace/chat-ui 1.14.2-main.fb46d29 → 1.14.4-dev.161e32f

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/dist/index.d.ts CHANGED
@@ -13,10 +13,14 @@ declare global {
13
13
  }
14
14
  }
15
15
  type MessageComposerProps = {
16
- /** Mirrors `MessageList`'s `expandedLayout`. See its docs. */
16
+ /**
17
+ * @deprecated No-op. The composer sits in the same centred reading column as
18
+ * the messages (`.chat-column`) at every size. Still accepted so existing
19
+ * callers keep compiling.
20
+ */
17
21
  expandedLayout?: boolean;
18
22
  };
19
- declare function MessageComposer({ expandedLayout, }?: MessageComposerProps): react_jsx_runtime.JSX.Element;
23
+ declare function MessageComposer(_props?: MessageComposerProps): react_jsx_runtime.JSX.Element;
20
24
 
21
25
  type MessageListProps = {
22
26
  /**
@@ -27,11 +31,9 @@ type MessageListProps = {
27
31
  */
28
32
  applyHostBackgroundOverride?: boolean;
29
33
  /**
30
- * Use the wider desktop max-width (90% instead of 70%). Set this when the
31
- * chat is rendered in a layout where horizontal room is constrained by
32
- * other panels (e.g. a sidebar is open beside it). Standalone fork passes
33
- * `leftOpen || rightOpen` from `useSidebar()`; the sandbox doesn't have
34
- * sidebars, so it omits the prop and gets the natural 70% width.
34
+ * @deprecated No-op. The message column is centred at a fixed reading width
35
+ * (`.chat-column`) at every size, so there is no sidebar-dependent max-width
36
+ * to toggle. Still accepted so existing callers keep compiling.
35
37
  */
36
38
  expandedLayout?: boolean;
37
39
  /**
@@ -47,7 +49,7 @@ type MessageListProps = {
47
49
  */
48
50
  isChoosingThread?: boolean;
49
51
  };
50
- declare function MessageList({ applyHostBackgroundOverride, expandedLayout, isChoosingThread, }?: MessageListProps): react_jsx_runtime.JSX.Element;
52
+ declare function MessageList({ applyHostBackgroundOverride, isChoosingThread, }?: MessageListProps): react_jsx_runtime.JSX.Element;
51
53
 
52
54
  /**
53
55
  * Skeleton for the message list loading state.
@@ -78,6 +80,104 @@ declare const ChatVariablesForm: React.ForwardRefExoticComponent<ChatVariablesFo
78
80
  setVariables: (variables: Record<string, unknown>) => void;
79
81
  } & React.RefAttributes<ChatVariablesFormRef>>;
80
82
 
83
+ /**
84
+ * What the backend tells the composer about speech-to-text (dictation).
85
+ * `region` is the Azure region of the Speech resource, e.g. `australiaeast`.
86
+ * The SDK needs the region rather than the account's custom-domain URL: the
87
+ * recognition path only exists on the regional host, and that is what the
88
+ * issued token is scoped to. Absent when speech isn't configured.
89
+ */
90
+ type SpeechConfig = {
91
+ enabled: boolean;
92
+ region?: string | null;
93
+ /** BCP-47 locale to recognise when the client doesn't ask for one. */
94
+ defaultLocale: string;
95
+ };
96
+ /**
97
+ * A short-lived token from the Speech resource's own token service, scoped to
98
+ * recognition in one region and good for about ten minutes. Handed to the SDK
99
+ * as-is; the backend owns how it is minted.
100
+ */
101
+ type SpeechToken = {
102
+ token: string;
103
+ /** ISO-8601 instant. */
104
+ expiresOn: string;
105
+ };
106
+
107
+ type DictationState = 'idle' | 'starting' | 'listening';
108
+ type DictationError = 'permission-denied' | 'no-microphone' | 'network'
109
+ /** Worth another go: the install is fine, this attempt wasn't. */
110
+ | 'unavailable-temporarily'
111
+ /** Don't keep asking: this install can't do dictation. */
112
+ | 'unavailable' | 'unknown';
113
+ type UseDictationOptions = {
114
+ /** Azure region from `SpeechConfig`; dictation is unavailable without it. */
115
+ region?: string | null;
116
+ /** BCP-47 recognition locale (server default unless the user chose one). */
117
+ locale: string;
118
+ /** From the ChatService; dictation is unavailable without it. */
119
+ getToken?: () => Promise<SpeechToken>;
120
+ /** A final recognised phrase — insert it into the editor. */
121
+ onPhrase: (text: string) => void;
122
+ /**
123
+ * Provisional text, revised several times a second. Rendered as greyed ghost
124
+ * text at the caret. Deliberately a callback rather than hook state: holding it
125
+ * in state would re-render the whole composer on every partial result.
126
+ */
127
+ onInterim?: (text: string) => void;
128
+ /**
129
+ * Hard stop, so a forgotten mic can't run for an hour. Keep it under the
130
+ * token's ~10 minute life: the token is never refreshed once the session is
131
+ * running, so a longer cap would end the session on an auth failure.
132
+ */
133
+ maxDurationMs?: number;
134
+ /** Stop after this long without any speech. */
135
+ idleTimeoutMs?: number;
136
+ };
137
+ /**
138
+ * Streams microphone audio to Azure AI Speech and hands back recognised
139
+ * phrases. Owns the whole session: mic permission + stream, SDK loading,
140
+ * recogniser lifecycle, idle/max timers, and teardown on stop or unmount.
141
+ * Interim (not yet final) text goes to `onInterim` for display only; only final
142
+ * phrases reach `onPhrase`.
143
+ */
144
+ declare function useDictation({ region, locale, getToken, onPhrase, onInterim, maxDurationMs, idleTimeoutMs, }: UseDictationOptions): {
145
+ supported: boolean;
146
+ available: boolean;
147
+ state: DictationState;
148
+ error: DictationError | null;
149
+ /** Name of the microphone in use, once a session is live. May be ''. */
150
+ deviceLabel: string;
151
+ /** Listening, but the microphone has produced no sound for a while. */
152
+ silent: boolean;
153
+ start: () => Promise<void>;
154
+ stop: () => void;
155
+ toggle: () => void;
156
+ };
157
+
158
+ type DictationButtonProps = {
159
+ state: DictationState;
160
+ error: DictationError | null;
161
+ disabled?: boolean;
162
+ onToggle: () => void;
163
+ /**
164
+ * Microphone in use. Shown while listening because the browser picks the
165
+ * device, not us, and picking the wrong one is otherwise invisible: the
166
+ * session looks perfectly healthy and simply transcribes nothing.
167
+ */
168
+ deviceLabel?: string;
169
+ /** Icon/button sizing to match the surrounding toolbar. */
170
+ size?: 'sm' | 'md';
171
+ };
172
+ /**
173
+ * The composer's microphone, which carries the dictation state itself rather than
174
+ * relying on text elsewhere: a spinning ring while the session is starting, and a
175
+ * filled stop square while it is listening — the same shape Send takes during a
176
+ * run, because the button's job is the same at that point. The transcript appears
177
+ * in the composer at the caret, so nothing is reported in two places.
178
+ */
179
+ declare function DictationButton({ state, error, disabled, onToggle, deviceLabel, size, }: DictationButtonProps): react_jsx_runtime.JSX.Element;
180
+
81
181
  type MentionUserLike = {
82
182
  id: string;
83
183
  displayName: string;
@@ -95,6 +195,19 @@ type MarkdownEditorHandle = {
95
195
  * Callers that need the freshest text (e.g. sending on Enter) should read from here.
96
196
  */
97
197
  getMarkdown: () => string;
198
+ /**
199
+ * Inserts plain text at the caret (dictation, snippets), replacing any
200
+ * selection. Prepends a space when the caret directly follows a
201
+ * non-whitespace character so successive inserts read as prose. No-op when
202
+ * the editor isn't editable.
203
+ */
204
+ insertText: (text: string) => void;
205
+ /**
206
+ * Shows provisional dictation text greyed at the caret. Display-only — it never
207
+ * enters the document, so it cannot be serialised, undone, or sent. Pass '' to
208
+ * clear; inserting the final text via `insertText` clears it too.
209
+ */
210
+ setDictationGhost: (text: string) => void;
98
211
  /**
99
212
  * Returns mention users currently present in the editor document.
100
213
  * Useful for building API payloads (e.g. comments.mentionedUsers).
@@ -206,6 +319,8 @@ type Message = {
206
319
  message?: string | null;
207
320
  data?: string | null;
208
321
  blockId?: string | null;
322
+ /** Trace id of the request that recorded the error, for a support reference. */
323
+ traceId?: string | null;
209
324
  }[] | null;
210
325
  values?: MessageValue[] | null;
211
326
  optimistic?: boolean;
@@ -336,7 +451,6 @@ interface ChatService {
336
451
  uploadFiles(files: File[], scope: FileScope, onFileUploaded?: (file: File, fileInfo: FileInfo$1) => void, onChunkUploaded?: (chunkIndex: number, totalChunks: number, file: File) => void): Promise<FileInfo$1[]>;
337
452
  downloadFile(id: string, scope?: FileScope): Promise<Blob>;
338
453
  getFileInfo(id: string, scope: FileScope): Promise<FileInfo$1>;
339
- getFileDownloadUrl(sourceUri: string): Promise<string>;
340
454
  fetchThread(workspaceId: string, threadId: string): Promise<MessageThread>;
341
455
  fetchWorkspace(workspaceId: string): Promise<Workspace>;
342
456
  fetchTaggableUsers(workspaceId: string): Promise<MentionUser[]>;
@@ -366,6 +480,27 @@ interface ChatService {
366
480
  data: Model[];
367
481
  total: number;
368
482
  }>;
483
+ /**
484
+ * Request cancellation of the thread's running flow (the thread id IS the
485
+ * flow-run id). Cancellation is cooperative: the engine stops between block
486
+ * executions, typically within seconds, and the terminal SSE frame clears
487
+ * `isFlowRunning`. Optional so existing service implementations keep
488
+ * compiling — the composer only shows a Stop button when it is provided.
489
+ */
490
+ cancelFlowRun?(flowRunId: string): Promise<void>;
491
+ /**
492
+ * Speech-to-text (composer dictation). Both are optional so existing
493
+ * service implementations keep compiling — the composer renders a
494
+ * microphone only when both are provided AND the config says enabled.
495
+ * `getSpeechConfig` is read once per session. `getSpeechToken` is called
496
+ * when a dictation session starts (in parallel with the mic permission
497
+ * prompt — and again if that token aged out while the prompt sat open). The
498
+ * token is handed to the SDK as-is and never refreshed mid-session, so a
499
+ * session is capped to stay inside its life. No caching wanted: a stale
500
+ * token cannot be renewed.
501
+ */
502
+ getSpeechConfig?(): Promise<SpeechConfig>;
503
+ getSpeechToken?(): Promise<SpeechToken>;
369
504
  }
370
505
 
371
506
  type ChatIdentity = {
@@ -410,7 +545,9 @@ declare const messagesResponseSchema: z.ZodObject<{
410
545
  blockId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
411
546
  code: z.ZodNumber;
412
547
  data: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
548
+ errorCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
413
549
  message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
550
+ traceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
414
551
  }, z.core.$strip>>;
415
552
  hasComments: z.ZodBoolean;
416
553
  id: z.ZodString;
@@ -422,13 +559,11 @@ declare const messagesResponseSchema: z.ZodObject<{
422
559
  createdByUserId: z.ZodString;
423
560
  id: z.ZodString;
424
561
  name: z.ZodString;
425
- type: z.ZodEnum<{
426
- Input: "Input";
427
- Output: "Output";
428
- }>;
562
+ type: z.ZodString;
429
563
  value: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
430
564
  }, z.core.$strip>>;
431
565
  }, z.core.$strip>>;
566
+ scoped: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
432
567
  total: z.ZodNumber;
433
568
  }, z.core.$strip>;
434
569
  type MessagesResponseDto = z.infer<typeof messagesResponseSchema>;
@@ -440,15 +575,20 @@ type MessageErrorDto = NonNullable<MessageDto['errors']>[number] & {
440
575
  };
441
576
  type MessageError = NonNullable<Message['errors']>[number];
442
577
  declare function mapMessageValueDtoToModel(dto: MessageValueDto): MessageValue;
578
+ /** `type` is an extensible enum; a value this UI cannot place is dropped. */
579
+ declare const mapMessageValuesDtoToModels: (dtos: MessageValueDto[]) => MessageValue[];
443
580
  declare function mapMessageErrorDtoToModel(dto: MessageErrorDto): MessageError;
444
581
  declare function mapMessageDtoToModel(dto: MessageDto): Message;
445
582
  declare function mapMessagesDtoToModels(dto: MessageDto[]): Message[];
446
583
  /**
447
584
  * Merge a streaming delta into a message. `outputs` is a cumulative snapshot
448
- * keyed by `(name, type)` per the SSE protocol — when an output streams from
449
- * "He" → "Hel" → "Hello" we receive three deltas each carrying the full
450
- * text-so-far, so we replace by key rather than appending. Errors aren't
451
- * documented as cumulative, so we append them.
585
+ * keyed by value `id` — when an output streams from "He" → "Hel" → "Hello" we
586
+ * receive three deltas each carrying the full text-so-far under one id, so we
587
+ * replace by id rather than appending. Several blocks can be wired into a
588
+ * single flow output (five render blocks feeding one "Files" output, say);
589
+ * those arrive under the same NAME but different ids and must all survive,
590
+ * which is why the key is not `(name, type)`. Errors aren't documented as
591
+ * cumulative, so we append them.
452
592
  */
453
593
  declare function applyDeltaToMessage(target: Message, delta: {
454
594
  outputs: MessageValue[];
@@ -458,7 +598,7 @@ declare function applyDeltaToMessage(target: Message, delta: {
458
598
  /**
459
599
  * User-facing text for message errors.
460
600
  *
461
- * The backend attaches a stable machine-readable category to LLM failures
601
+ * The backend attaches a stable machine-readable category to failures
462
602
  * (`errorCode`, e.g. "llm.rate_limit") alongside the numeric HTTP `code`.
463
603
  * Prefer the category — it distinguishes causes the HTTP code can't (a 400
464
604
  * can be a content filter, a context-window blowout, or a malformed
@@ -468,8 +608,16 @@ declare function applyDeltaToMessage(target: Message, delta: {
468
608
  type MessageErrorLike = number | {
469
609
  code: number;
470
610
  errorCode?: string | null;
611
+ message?: string | null;
471
612
  };
472
613
  declare const getMessageErrorText: (error: MessageErrorLike) => string;
614
+ /**
615
+ * The provider detail behind an error, shown in an optional "Show details"
616
+ * disclosure under the friendly bubble from {@link getMessageErrorText}.
617
+ * Returns null when there's nothing to add (a bare HTTP code, or no message
618
+ * on the error at all).
619
+ */
620
+ declare const getMessageErrorDetail: (error: MessageErrorLike) => string | null;
473
621
 
474
622
  /**
475
623
  * Structured transient statuses carried on a message's `status` value.
@@ -538,6 +686,7 @@ declare const threadsListResponseSchema: z.ZodObject<{
538
686
  totalMessages: z.ZodNumber;
539
687
  workSpaceId: z.ZodString;
540
688
  }, z.core.$strip>>;
689
+ scoped: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
541
690
  total: z.ZodNumber;
542
691
  }, z.core.$strip>;
543
692
  declare const threadResponseSchema: z.ZodObject<{
@@ -565,6 +714,11 @@ declare function mapThreadsResponseDtoToModel(dto: ThreadsResponseDto): ThreadsR
565
714
  declare function mapSignalRThreadSummaryToModel(summary: SignalR.MessageThreadSummary): MessageThread;
566
715
 
567
716
  declare const workspaceResponseSchema: z.ZodObject<{
717
+ connectors: z.ZodArray<z.ZodObject<{
718
+ id: z.ZodString;
719
+ kind: z.ZodString;
720
+ name: z.ZodString;
721
+ }, z.core.$strip>>;
568
722
  createdAt: z.ZodISODateTime;
569
723
  createdByUserId: z.ZodString;
570
724
  dataSpaces: z.ZodArray<z.ZodObject<{
@@ -611,6 +765,7 @@ declare const workspaceResponseSchema: z.ZodObject<{
611
765
  }, z.core.$strip>;
612
766
  }, z.core.$strip>>>>;
613
767
  constants: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
768
+ secret: z.ZodBoolean;
614
769
  value: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
615
770
  }, z.core.$strip>>>>;
616
771
  inputs: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
@@ -622,11 +777,7 @@ declare const workspaceResponseSchema: z.ZodObject<{
622
777
  schema: z.ZodRecord<z.ZodString, z.ZodAny>;
623
778
  }, z.core.$strip>>>>;
624
779
  variables: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
625
- access: z.ZodEnum<{
626
- None: "None";
627
- Read: "Read";
628
- Write: "Write";
629
- }>;
780
+ access: z.ZodString;
630
781
  schema: z.ZodRecord<z.ZodString, z.ZodAny>;
631
782
  }, z.core.$strip>>>>;
632
783
  }, z.core.$strip>>;
@@ -635,6 +786,7 @@ declare const workspaceResponseSchema: z.ZodObject<{
635
786
  triggers: z.ZodArray<z.ZodObject<{
636
787
  dataSourceContainer: z.ZodObject<{
637
788
  dataSourceId: z.ZodString;
789
+ fields: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
638
790
  filters: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
639
791
  operator: z.ZodString;
640
792
  propertyName: z.ZodString;
@@ -645,12 +797,10 @@ declare const workspaceResponseSchema: z.ZodObject<{
645
797
  path: z.ZodString;
646
798
  }, z.core.$strip>;
647
799
  flowId: z.ZodString;
800
+ honourSourceDeletes: z.ZodBoolean;
648
801
  id: z.ZodString;
649
802
  inputName: z.ZodString;
650
- type: z.ZodEnum<{
651
- Periodic: "Periodic";
652
- Container: "Container";
653
- }>;
803
+ type: z.ZodString;
654
804
  }, z.core.$strip>>;
655
805
  }, z.core.$strip>>;
656
806
  id: z.ZodString;
@@ -695,13 +845,7 @@ declare const workspaceResponseSchema: z.ZodObject<{
695
845
  providerDeploymentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
696
846
  providerId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
697
847
  region: z.ZodOptional<z.ZodNullable<z.ZodString>>;
698
- status: z.ZodEnum<{
699
- Deploying: "Deploying";
700
- Ready: "Ready";
701
- Failed: "Failed";
702
- Deleting: "Deleting";
703
- Deleted: "Deleted";
704
- }>;
848
+ status: z.ZodString;
705
849
  statusMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
706
850
  statusUpdatedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
707
851
  steps: z.ZodArray<z.ZodObject<{
@@ -709,68 +853,52 @@ declare const workspaceResponseSchema: z.ZodObject<{
709
853
  id: z.ZodString;
710
854
  index: z.ZodNumber;
711
855
  message: z.ZodString;
712
- name: z.ZodEnum<{
713
- DeployVNet: "DeployVNet";
714
- DeployVM: "DeployVM";
715
- InstallDependencies: "InstallDependencies";
716
- DownloadModel: "DownloadModel";
717
- TestModel: "TestModel";
718
- }>;
856
+ name: z.ZodString;
719
857
  progress: z.ZodNumber;
720
858
  startedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
721
859
  }, z.core.$strip>>;
722
860
  url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
723
- virtualMachineServerType: z.ZodOptional<z.ZodEnum<{
724
- TextGenerationInference: "TextGenerationInference";
725
- VLlm: "VLlm";
726
- }>>;
861
+ virtualMachineServerType: z.ZodOptional<z.ZodString>;
727
862
  virtualMachineUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
728
863
  vmSize: z.ZodOptional<z.ZodNullable<z.ZodString>>;
729
864
  }, z.core.$strip>>;
730
865
  displayName: z.ZodString;
731
866
  id: z.ZodString;
732
- modelDeploymentProviderType: z.ZodOptional<z.ZodEnum<{
733
- OpenAi: "OpenAi";
734
- AzureOpenAi: "AzureOpenAi";
735
- HuggingFace: "HuggingFace";
736
- Cohere: "Cohere";
737
- Anthropic: "Anthropic";
738
- Gemini: "Gemini";
739
- VertexAi: "VertexAi";
740
- AzureFoundry: "AzureFoundry";
741
- }>>;
742
- modelPublisher: z.ZodOptional<z.ZodEnum<{
743
- OpenAi: "OpenAi";
744
- HuggingFace: "HuggingFace";
745
- Cohere: "Cohere";
746
- Anthropic: "Anthropic";
747
- Google: "Google";
748
- Meta: "Meta";
749
- Mistral: "Mistral";
750
- Microsoft: "Microsoft";
751
- DeepSeek: "DeepSeek";
752
- XAi: "XAi";
753
- Amazon: "Amazon";
754
- Qwen: "Qwen";
755
- Other: "Other";
756
- }>>;
867
+ modelDeploymentProviderType: z.ZodOptional<z.ZodString>;
868
+ modelPublisher: z.ZodOptional<z.ZodString>;
757
869
  name: z.ZodString;
758
- properties: z.ZodArray<z.ZodObject<{
870
+ properties: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
871
+ defaultValue: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
872
+ maxValue: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
873
+ minValue: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
759
874
  name: z.ZodString;
875
+ step: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
760
876
  type: z.ZodEnum<{
761
877
  Boolean: "Boolean";
878
+ }>;
879
+ }, z.core.$strip>, z.ZodObject<{
880
+ defaultValue: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
881
+ maxValue: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
882
+ minValue: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
883
+ name: z.ZodString;
884
+ step: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
885
+ type: z.ZodEnum<{
762
886
  Number: "Number";
887
+ }>;
888
+ }, z.core.$strip>, z.ZodObject<{
889
+ defaultValue: z.ZodOptional<z.ZodNullable<z.ZodString>>;
890
+ maxValue: z.ZodOptional<z.ZodNullable<z.ZodString>>;
891
+ minValue: z.ZodOptional<z.ZodNullable<z.ZodString>>;
892
+ name: z.ZodString;
893
+ step: z.ZodOptional<z.ZodNullable<z.ZodString>>;
894
+ type: z.ZodEnum<{
763
895
  String: "String";
764
896
  }>;
765
- }, z.core.$strip>>;
897
+ }, z.core.$strip>]>>;
766
898
  }, z.core.$strip>;
767
899
  prePrompt: z.ZodString;
768
900
  presencePenalty: z.ZodNumber;
769
- role: z.ZodEnum<{
770
- Document: "Document";
771
- Agent: "Agent";
772
- Analyzer: "Analyzer";
773
- }>;
901
+ role: z.ZodString;
774
902
  temperature: z.ZodNumber;
775
903
  topP: z.ZodNumber;
776
904
  }, z.core.$strip>>;
@@ -784,11 +912,7 @@ declare const workspaceResponseSchema: z.ZodObject<{
784
912
  supportsFiles: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
785
913
  tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
786
914
  variables: z.ZodRecord<z.ZodString, z.ZodObject<{
787
- access: z.ZodEnum<{
788
- None: "None";
789
- Read: "Read";
790
- Write: "Write";
791
- }>;
915
+ access: z.ZodString;
792
916
  schema: z.ZodRecord<z.ZodString, z.ZodAny>;
793
917
  }, z.core.$strip>>;
794
918
  }, z.core.$strip>;
@@ -800,6 +924,11 @@ declare const workspaceUsersResponseSchema: z.ZodArray<z.ZodObject<{
800
924
  }, z.core.$strip>>;
801
925
  declare const workspacesListResponseSchema: z.ZodObject<{
802
926
  data: z.ZodArray<z.ZodObject<{
927
+ connectors: z.ZodArray<z.ZodObject<{
928
+ id: z.ZodString;
929
+ kind: z.ZodString;
930
+ name: z.ZodString;
931
+ }, z.core.$strip>>;
803
932
  createdAt: z.ZodISODateTime;
804
933
  createdByUserId: z.ZodString;
805
934
  dataSpaces: z.ZodArray<z.ZodObject<{
@@ -846,6 +975,7 @@ declare const workspacesListResponseSchema: z.ZodObject<{
846
975
  }, z.core.$strip>;
847
976
  }, z.core.$strip>>>>;
848
977
  constants: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
978
+ secret: z.ZodBoolean;
849
979
  value: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
850
980
  }, z.core.$strip>>>>;
851
981
  inputs: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
@@ -857,11 +987,7 @@ declare const workspacesListResponseSchema: z.ZodObject<{
857
987
  schema: z.ZodRecord<z.ZodString, z.ZodAny>;
858
988
  }, z.core.$strip>>>>;
859
989
  variables: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
860
- access: z.ZodEnum<{
861
- None: "None";
862
- Read: "Read";
863
- Write: "Write";
864
- }>;
990
+ access: z.ZodString;
865
991
  schema: z.ZodRecord<z.ZodString, z.ZodAny>;
866
992
  }, z.core.$strip>>>>;
867
993
  }, z.core.$strip>>;
@@ -870,6 +996,7 @@ declare const workspacesListResponseSchema: z.ZodObject<{
870
996
  triggers: z.ZodArray<z.ZodObject<{
871
997
  dataSourceContainer: z.ZodObject<{
872
998
  dataSourceId: z.ZodString;
999
+ fields: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
873
1000
  filters: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
874
1001
  operator: z.ZodString;
875
1002
  propertyName: z.ZodString;
@@ -880,12 +1007,10 @@ declare const workspacesListResponseSchema: z.ZodObject<{
880
1007
  path: z.ZodString;
881
1008
  }, z.core.$strip>;
882
1009
  flowId: z.ZodString;
1010
+ honourSourceDeletes: z.ZodBoolean;
883
1011
  id: z.ZodString;
884
1012
  inputName: z.ZodString;
885
- type: z.ZodEnum<{
886
- Periodic: "Periodic";
887
- Container: "Container";
888
- }>;
1013
+ type: z.ZodString;
889
1014
  }, z.core.$strip>>;
890
1015
  }, z.core.$strip>>;
891
1016
  id: z.ZodString;
@@ -930,13 +1055,7 @@ declare const workspacesListResponseSchema: z.ZodObject<{
930
1055
  providerDeploymentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
931
1056
  providerId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
932
1057
  region: z.ZodOptional<z.ZodNullable<z.ZodString>>;
933
- status: z.ZodEnum<{
934
- Deploying: "Deploying";
935
- Ready: "Ready";
936
- Failed: "Failed";
937
- Deleting: "Deleting";
938
- Deleted: "Deleted";
939
- }>;
1058
+ status: z.ZodString;
940
1059
  statusMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
941
1060
  statusUpdatedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
942
1061
  steps: z.ZodArray<z.ZodObject<{
@@ -944,68 +1063,52 @@ declare const workspacesListResponseSchema: z.ZodObject<{
944
1063
  id: z.ZodString;
945
1064
  index: z.ZodNumber;
946
1065
  message: z.ZodString;
947
- name: z.ZodEnum<{
948
- DeployVNet: "DeployVNet";
949
- DeployVM: "DeployVM";
950
- InstallDependencies: "InstallDependencies";
951
- DownloadModel: "DownloadModel";
952
- TestModel: "TestModel";
953
- }>;
1066
+ name: z.ZodString;
954
1067
  progress: z.ZodNumber;
955
1068
  startedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
956
1069
  }, z.core.$strip>>;
957
1070
  url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
958
- virtualMachineServerType: z.ZodOptional<z.ZodEnum<{
959
- TextGenerationInference: "TextGenerationInference";
960
- VLlm: "VLlm";
961
- }>>;
1071
+ virtualMachineServerType: z.ZodOptional<z.ZodString>;
962
1072
  virtualMachineUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
963
1073
  vmSize: z.ZodOptional<z.ZodNullable<z.ZodString>>;
964
1074
  }, z.core.$strip>>;
965
1075
  displayName: z.ZodString;
966
1076
  id: z.ZodString;
967
- modelDeploymentProviderType: z.ZodOptional<z.ZodEnum<{
968
- OpenAi: "OpenAi";
969
- AzureOpenAi: "AzureOpenAi";
970
- HuggingFace: "HuggingFace";
971
- Cohere: "Cohere";
972
- Anthropic: "Anthropic";
973
- Gemini: "Gemini";
974
- VertexAi: "VertexAi";
975
- AzureFoundry: "AzureFoundry";
976
- }>>;
977
- modelPublisher: z.ZodOptional<z.ZodEnum<{
978
- OpenAi: "OpenAi";
979
- HuggingFace: "HuggingFace";
980
- Cohere: "Cohere";
981
- Anthropic: "Anthropic";
982
- Google: "Google";
983
- Meta: "Meta";
984
- Mistral: "Mistral";
985
- Microsoft: "Microsoft";
986
- DeepSeek: "DeepSeek";
987
- XAi: "XAi";
988
- Amazon: "Amazon";
989
- Qwen: "Qwen";
990
- Other: "Other";
991
- }>>;
1077
+ modelDeploymentProviderType: z.ZodOptional<z.ZodString>;
1078
+ modelPublisher: z.ZodOptional<z.ZodString>;
992
1079
  name: z.ZodString;
993
- properties: z.ZodArray<z.ZodObject<{
1080
+ properties: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1081
+ defaultValue: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
1082
+ maxValue: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
1083
+ minValue: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
994
1084
  name: z.ZodString;
1085
+ step: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
995
1086
  type: z.ZodEnum<{
996
1087
  Boolean: "Boolean";
1088
+ }>;
1089
+ }, z.core.$strip>, z.ZodObject<{
1090
+ defaultValue: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1091
+ maxValue: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1092
+ minValue: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1093
+ name: z.ZodString;
1094
+ step: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1095
+ type: z.ZodEnum<{
997
1096
  Number: "Number";
1097
+ }>;
1098
+ }, z.core.$strip>, z.ZodObject<{
1099
+ defaultValue: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1100
+ maxValue: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1101
+ minValue: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1102
+ name: z.ZodString;
1103
+ step: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1104
+ type: z.ZodEnum<{
998
1105
  String: "String";
999
1106
  }>;
1000
- }, z.core.$strip>>;
1107
+ }, z.core.$strip>]>>;
1001
1108
  }, z.core.$strip>;
1002
1109
  prePrompt: z.ZodString;
1003
1110
  presencePenalty: z.ZodNumber;
1004
- role: z.ZodEnum<{
1005
- Document: "Document";
1006
- Agent: "Agent";
1007
- Analyzer: "Analyzer";
1008
- }>;
1111
+ role: z.ZodString;
1009
1112
  temperature: z.ZodNumber;
1010
1113
  topP: z.ZodNumber;
1011
1114
  }, z.core.$strip>>;
@@ -1019,14 +1122,11 @@ declare const workspacesListResponseSchema: z.ZodObject<{
1019
1122
  supportsFiles: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
1020
1123
  tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
1021
1124
  variables: z.ZodRecord<z.ZodString, z.ZodObject<{
1022
- access: z.ZodEnum<{
1023
- None: "None";
1024
- Read: "Read";
1025
- Write: "Write";
1026
- }>;
1125
+ access: z.ZodString;
1027
1126
  schema: z.ZodRecord<z.ZodString, z.ZodAny>;
1028
1127
  }, z.core.$strip>>;
1029
1128
  }, z.core.$strip>>;
1129
+ scoped: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
1030
1130
  total: z.ZodNumber;
1031
1131
  }, z.core.$strip>;
1032
1132
  type WorkspaceDto = z.infer<typeof workspaceResponseSchema>;
@@ -1071,6 +1171,15 @@ declare const DRAFT_THREAD_PREFIX = "draft-";
1071
1171
  declare function markDraftThreadId(threadId: string): void;
1072
1172
  declare function unmarkDraftThreadId(threadId: string): void;
1073
1173
  declare function isDraftThreadId(threadId?: string | null): boolean;
1174
+ /**
1175
+ * Reactive equivalent of isDraftThreadId() -- re-renders the caller when
1176
+ * markDraftThreadId/unmarkDraftThreadId changes this threadId's status, even
1177
+ * if that happens from an unrelated component (e.g. the thread list noticing
1178
+ * a draft is now server-backed). Use this in any component whose render
1179
+ * output depends on draft status; the plain function is fine for one-off
1180
+ * checks inside event handlers or non-React code.
1181
+ */
1182
+ declare function useIsDraftThreadId(threadId?: string | null): boolean;
1074
1183
  declare function createDraftThreadId(): string;
1075
1184
 
1076
1185
  /**
@@ -1146,9 +1255,6 @@ declare const filesKeys: {
1146
1255
  downloadBlob: (fileId: string) => readonly ["files", "mutation", "downloadBlob", {
1147
1256
  readonly fileId: string;
1148
1257
  }];
1149
- downloadByUri: (uri: string) => readonly ["files", "mutation", "downloadByUri", {
1150
- readonly uri: string;
1151
- }];
1152
1258
  };
1153
1259
  };
1154
1260
 
@@ -1160,9 +1266,11 @@ declare const threadsKeys: {
1160
1266
  list: (workspaceId: string, opts?: {
1161
1267
  take?: number;
1162
1268
  skip?: number;
1269
+ search?: string;
1163
1270
  }) => readonly ["threads", "list", {
1164
1271
  readonly take?: number;
1165
1272
  readonly skip?: number;
1273
+ readonly search?: string;
1166
1274
  readonly workspaceId: string;
1167
1275
  }];
1168
1276
  details: () => readonly ["threads", "detail"];
@@ -1200,6 +1308,7 @@ declare const flowRunsKeys: {
1200
1308
  readonly flowRunId: string;
1201
1309
  readonly variableName: string;
1202
1310
  }];
1311
+ cancel: () => readonly ["flowruns", "mutations", "cancel"];
1203
1312
  };
1204
1313
 
1205
1314
  declare const modelsKeys: {
@@ -1220,6 +1329,11 @@ declare const modelsKeys: {
1220
1329
  }];
1221
1330
  };
1222
1331
 
1332
+ declare const speechKeys: {
1333
+ all: readonly ["speech"];
1334
+ config: () => readonly ["speech", "config"];
1335
+ };
1336
+
1223
1337
  declare const messagesListOptions: (service: ChatService, threadId: string, opts?: {
1224
1338
  take?: number;
1225
1339
  skip?: number;
@@ -1236,10 +1350,6 @@ declare function useMessages(threadId: string): _tanstack_react_query.UseQueryRe
1236
1350
  declare const useFileMutations: (scope: FileScope) => {
1237
1351
  uploadFilesMutation: _tanstack_react_query.UseMutationResult<FileInfo$1[], Error, File[], unknown>;
1238
1352
  downloadFileMutation: _tanstack_react_query.UseMutationResult<void, Error, FileInfo$1, unknown>;
1239
- downloadFileByUriMutation: _tanstack_react_query.UseMutationResult<Blob, Error, {
1240
- name: string;
1241
- sourceUri: string;
1242
- }, unknown>;
1243
1353
  getFileBlobUrl: (id: string) => Promise<string>;
1244
1354
  fileProgress: Record<string, number>;
1245
1355
  uploadedFiles: FileInfo$1[];
@@ -1363,11 +1473,6 @@ declare function useTaggableWorkspaceUsers(workspaceId: string): _tanstack_react
1363
1473
  */
1364
1474
  declare function useFlowRunVariables(flowRunId?: string): _tanstack_react_query.UseQueryResult<FlowRunVariables, Error>;
1365
1475
 
1366
- /**
1367
- * Patch a single flow-run variable. Called per-change by the chat
1368
- * variables form. Skips writes for draft threads (no flow-run yet)
1369
- * and invalidates the matching variables cache on success.
1370
- */
1371
1476
  declare function useUpdateFlowRunVariable(): _tanstack_react_query.UseMutationResult<void, Error, {
1372
1477
  flowRunId: string;
1373
1478
  variableName: string;
@@ -1387,4 +1492,16 @@ declare function useModels({ search, take, skip, }?: {
1387
1492
  total: number;
1388
1493
  }, Error>;
1389
1494
 
1390
- export { type ChatContextIds, type ChatIdentity, ChatProvider, type ChatProviderProps, type ChatService, ChatVariablesForm, DRAFT_THREAD_PREFIX, DateFromApi, type FileInfo$1 as FileInfo, type FileScope, type FlowRunVariables, MarkdownEditor, type MarkdownEditorHandle, type MentionUser, type Message, MessageComposer, type MessageComposerProps, type MessageContentItem, type MessageError, type MessageErrorLike, MessageList, type MessageListProps, MessageListSkeleton, MessageMarkdown, type MessageThread, type MessageValue, MessageValueType, type Model, type ModelProperty, NEW_THREAD_ID, type RetryStatus, THREAD_LIST_PAGE_SIZE, type ThreadsResponse, type Variables, type Workspace, applyDeltaToMessage, applyThreadToCache, createDraftThreadId, createThreadId, downloadFileBlobOptions, filesKeys, flowRunsKeys, getMessageErrorText, getModelIcon, getRetryStatusText, getThreadPlaceholderFromListCache, getUserPhotoUrl, invalidateWorkspaceThreadLists, isDraftThreadId, mapFileInfoDtoToModel, mapMentionUserDtoToModel, mapMessageDtoToModel, mapMessageErrorDtoToModel, mapMessageValueDtoToModel, mapMessagesDtoToModels, mapSignalRThreadSummaryToModel, mapThreadDtoToModel, mapThreadsResponseDtoToModel, mapWorkspaceDtoToModel, mapWorkspacesDtoToModels, markDraftThreadId, messagesKeys, messagesListOptions, messagesMutationsKeys, modelsKeys, parseDateTime, parseDateTimeHuman, parseRetryStatus, randomUUID, setThreadOptimisticRunning, setThreadRunningInLists, taggableUsersOptions, threadDetailOptions, threadsKeys, unmarkDraftThreadId, useAddInputToMessage, useChatContext, useChatIdentity, useChatService, useDownloadFileBlobQuery, useFileMutations, useFlowRunVariables, useMessages, useModels, useSendMessage, useTaggableWorkspaceUsers, useThread, useThreadIsRunning, useUpdateFlowRunVariable, useWorkspace, utcDate, workspaceDetailOptions, workspaceKeys };
1495
+ /**
1496
+ * Whether dictation is available on this install and how to connect. Read once
1497
+ * per app session — it only changes with a deploy — and disabled entirely for
1498
+ * services that don't implement speech, in which case the composer renders no
1499
+ * microphone.
1500
+ *
1501
+ * A definitive answer (including a 404 from an older backend) is cached for the
1502
+ * session; a transient failure is retried, because otherwise one blip on load
1503
+ * would silently disable the mic until the page is reloaded.
1504
+ */
1505
+ declare function useSpeechConfig(): _tanstack_react_query.UseQueryResult<SpeechConfig, Error>;
1506
+
1507
+ export { type ChatContextIds, type ChatIdentity, ChatProvider, type ChatProviderProps, type ChatService, ChatVariablesForm, DRAFT_THREAD_PREFIX, DateFromApi, DictationButton, type DictationButtonProps, type DictationError, type DictationState, type FileInfo$1 as FileInfo, type FileScope, type FlowRunVariables, MarkdownEditor, type MarkdownEditorHandle, type MentionUser, type Message, MessageComposer, type MessageComposerProps, type MessageContentItem, type MessageError, type MessageErrorLike, MessageList, type MessageListProps, MessageListSkeleton, MessageMarkdown, type MessageThread, type MessageValue, MessageValueType, type Model, type ModelProperty, NEW_THREAD_ID, type RetryStatus, type SpeechConfig, type SpeechToken, THREAD_LIST_PAGE_SIZE, type ThreadsResponse, type UseDictationOptions, type Variables, type Workspace, applyDeltaToMessage, applyThreadToCache, createDraftThreadId, createThreadId, downloadFileBlobOptions, filesKeys, flowRunsKeys, getMessageErrorDetail, getMessageErrorText, getModelIcon, getRetryStatusText, getThreadPlaceholderFromListCache, getUserPhotoUrl, invalidateWorkspaceThreadLists, isDraftThreadId, mapFileInfoDtoToModel, mapMentionUserDtoToModel, mapMessageDtoToModel, mapMessageErrorDtoToModel, mapMessageValueDtoToModel, mapMessageValuesDtoToModels, mapMessagesDtoToModels, mapSignalRThreadSummaryToModel, mapThreadDtoToModel, mapThreadsResponseDtoToModel, mapWorkspaceDtoToModel, mapWorkspacesDtoToModels, markDraftThreadId, messagesKeys, messagesListOptions, messagesMutationsKeys, modelsKeys, parseDateTime, parseDateTimeHuman, parseRetryStatus, randomUUID, setThreadOptimisticRunning, setThreadRunningInLists, speechKeys, taggableUsersOptions, threadDetailOptions, threadsKeys, unmarkDraftThreadId, useAddInputToMessage, useChatContext, useChatIdentity, useChatService, useDictation, useDownloadFileBlobQuery, useFileMutations, useFlowRunVariables, useIsDraftThreadId, useMessages, useModels, useSendMessage, useSpeechConfig, useTaggableWorkspaceUsers, useThread, useThreadIsRunning, useUpdateFlowRunVariable, useWorkspace, utcDate, workspaceDetailOptions, workspaceKeys };