@chatterfly/widget 0.6.0 → 0.7.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.
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react from 'react';
2
- import { ComponentType, ReactNode } from 'react';
2
+ import react__default, { ComponentType, ReactNode } from 'react';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
 
5
5
  /**
@@ -89,6 +89,16 @@ interface ThemeTokens {
89
89
  * token preset; `auto` follows the host page's `prefers-color-scheme`.
90
90
  */
91
91
  type ColorScheme = "light" | "dark" | "auto";
92
+ /**
93
+ * Connection identity for the run that just completed, passed as the second
94
+ * argument to `onCompleted`. `participantToken` is the current (possibly
95
+ * re-minted) token, safe to use immediately in a follow-up API call from the
96
+ * host — e.g. to submit collected contact details against the same run.
97
+ */
98
+ interface RunCompletionContext {
99
+ runId: string;
100
+ participantToken: string;
101
+ }
92
102
  interface WidgetConfig {
93
103
  /** The run ID to connect to. */
94
104
  runId: string;
@@ -110,6 +120,13 @@ interface WidgetConfig {
110
120
  * `deploymentId` for serverless embeds. Ignored if `deploymentId` or `runId` is set.
111
121
  */
112
122
  workflowId?: string;
123
+ /**
124
+ * Public `@chatterfly` system workflow path (`"<projectSlug>/<workflowSlug>"`,
125
+ * e.g. `"learning/enquiry-intake"`). Resolves via
126
+ * `POST /api/public/system/{projectSlug}/{workflowSlug}/start` without
127
+ * needing environment-variable UUID maps.
128
+ */
129
+ systemSlug?: string;
113
130
  /**
114
131
  * Initial input values forwarded to the serverless start call (`workflowId`
115
132
  * / `deploymentId` auto-start paths only). Lets a host skip intake
@@ -123,8 +140,14 @@ interface WidgetConfig {
123
140
  * lifecycle. See `ConnectionPolicy`. Defaults apply when omitted.
124
141
  */
125
142
  connectionPolicy?: ConnectionPolicy | "always-on";
143
+ /**
144
+ * When explicitly `false`, skips `/assistant` polling for workflows known to
145
+ * contain no `Agent[mode="assistant"]` steps (avoids background 404 polls).
146
+ * Defaults to `true`.
147
+ */
148
+ assistantEnabled?: boolean;
126
149
  }
127
- type RunStatus = "idle" | "connecting" | "replaying" | "running" | "awaiting_authorization" | "awaiting_input" | "awaiting_voice" | "awaiting_form" | "awaiting_chat" | "awaiting_editor" | "completed" | "error" | "offline" | "expired";
150
+ type RunStatus = "idle" | "connecting" | "replaying" | "running" | "awaiting_authorization" | "awaiting_participant" | "awaiting_review" | "awaiting_input" | "awaiting_voice" | "awaiting_form" | "awaiting_chat" | "awaiting_editor" | "completed" | "error" | "offline" | "expired";
128
151
  /**
129
152
  * Connection lifecycle tuning (Phase 119.4/119.5). Controls when an
130
153
  * idle-at-input widget deliberately drops its socket ("dormant"), lazily
@@ -162,6 +185,8 @@ interface FieldSpec {
162
185
  placeholder?: string;
163
186
  max_length?: number;
164
187
  rows?: number;
188
+ initial_content?: string;
189
+ editor_format?: "plain" | "markdown";
165
190
  min?: number | string;
166
191
  max?: number | string;
167
192
  step?: number;
@@ -211,6 +236,15 @@ interface SurfaceConfig {
211
236
  confidence_threshold?: number;
212
237
  max_reprompts?: number;
213
238
  record_audio?: boolean;
239
+ recording?: {
240
+ enabled?: boolean;
241
+ storage?: "chatterfly" | "provider";
242
+ format?: "wav" | "mp3";
243
+ consent?: "announcement" | "affirmative" | "beep" | "external";
244
+ announcement?: string;
245
+ retention_days?: number | null;
246
+ allow_download?: boolean;
247
+ };
214
248
  model?: string;
215
249
  voice?: string;
216
250
  language?: string;
@@ -251,6 +285,17 @@ interface HITLSession {
251
285
  document_content?: string | null;
252
286
  }
253
287
  type RunEvent = {
288
+ type: "assistant.message";
289
+ conversation_id?: string;
290
+ execution_address?: string;
291
+ message: {
292
+ id: string;
293
+ seq: number;
294
+ author_kind: "participant" | "agent" | "operator";
295
+ content: string;
296
+ };
297
+ replay: boolean;
298
+ } | {
254
299
  type: "run.started";
255
300
  run_id: string;
256
301
  } | {
@@ -268,6 +313,9 @@ type RunEvent = {
268
313
  } | {
269
314
  type: "hitl.session_closed";
270
315
  session_id: string;
316
+ } | {
317
+ type: "hitl.waiting_for_participant";
318
+ role?: "reviewer";
271
319
  } | {
272
320
  type: "message.sent";
273
321
  content: string;
@@ -303,6 +351,13 @@ type RunEvent = {
303
351
  type: "provider_operation";
304
352
  node_id?: string;
305
353
  payload: ProviderOperationSummary;
354
+ } | {
355
+ type: "handoff.status";
356
+ node_id?: string;
357
+ handoff_state: "handoff_pending" | "awaiting_external_participant" | "external_session_active" | "handoff_completed" | "handoff_expired" | "handoff_failed";
358
+ child_run_id?: string;
359
+ surface?: string;
360
+ role?: string;
306
361
  };
307
362
  interface ProviderOperationSummary {
308
363
  operation: string;
@@ -317,7 +372,7 @@ interface TimelineEntry {
317
372
  run_id: string;
318
373
  session_id: string | null;
319
374
  seq: number;
320
- event_type: "prompt" | "response" | "message" | "form_opened" | "form_submitted" | "status_change" | "delay_started" | "delay_resumed" | "llm_call" | "tool_call" | "tool_result" | "provider_operation";
375
+ event_type: "prompt" | "response" | "message" | "form_opened" | "form_submitted" | "status_change" | "delay_started" | "delay_resumed" | "llm_call" | "tool_call" | "tool_result" | "provider_operation" | "handoff";
321
376
  sender: "bot" | "user" | "system";
322
377
  payload: Record<string, unknown>;
323
378
  created_at: string;
@@ -335,11 +390,67 @@ interface InputComponentProps {
335
390
  sessionId: string;
336
391
  };
337
392
  }
393
+ interface AssistantDeliverableRevision {
394
+ revision: number;
395
+ format: "plain" | "markdown" | "json";
396
+ content: string;
397
+ source_token: string;
398
+ created_at: string;
399
+ }
400
+ interface AssistantHistoryResults {
401
+ scope: "current_conversation";
402
+ source_epoch: number;
403
+ matches: {
404
+ source_seq: number;
405
+ messages: {
406
+ seq: number;
407
+ kind: string;
408
+ sha256: string;
409
+ snippet: string;
410
+ truncated: boolean;
411
+ }[];
412
+ }[];
413
+ has_more: boolean;
414
+ next_before_seq: number;
415
+ notice: string;
416
+ }
417
+ interface AssistantDeliverables$1 {
418
+ source_token: string;
419
+ revision: number;
420
+ revisions: AssistantDeliverableRevision[];
421
+ limits: {
422
+ max_bytes: number;
423
+ max_revisions: number;
424
+ };
425
+ untrusted: true;
426
+ }
427
+ type AssistantDeliverableWrite = {
428
+ request_id: string;
429
+ expected_revision: number;
430
+ source_token: string;
431
+ confirm: true;
432
+ } & ({
433
+ action: "save";
434
+ format: AssistantDeliverableRevision["format"];
435
+ content: string;
436
+ } | {
437
+ action: "review" | "handoff";
438
+ format?: never;
439
+ content?: never;
440
+ });
441
+ interface AssistantDeliverableReceipt {
442
+ request_id: string;
443
+ action: "save" | "review" | "handoff";
444
+ revision: number;
445
+ created_at: string;
446
+ }
338
447
 
339
448
  interface WidgetStrings {
340
449
  statusInitialising: string;
341
450
  statusConnecting: string;
342
451
  statusRunning: string;
452
+ statusWaitingForParticipant: string;
453
+ statusWaitingForReview: string;
343
454
  statusCompletedTitle: string;
344
455
  statusCompletedBody: string;
345
456
  statusErrorTitle: string;
@@ -367,6 +478,122 @@ interface WidgetStrings {
367
478
  resumeRestart: string;
368
479
  startNewConversation: string;
369
480
  conversationEnded: string;
481
+ assistantLabel: string;
482
+ assistantDeliverableTitle: string;
483
+ assistantDeliverableNotice: string;
484
+ assistantDeliverableSource: string;
485
+ assistantDeliverableSourcePlaceholder: string;
486
+ assistantDeliverableFormat: string;
487
+ assistantDeliverablePlain: string;
488
+ assistantDeliverableContent: string;
489
+ assistantDeliverableBytes: string;
490
+ assistantDeliverableConfirm: string;
491
+ assistantDeliverableSave: string;
492
+ assistantDeliverableReview: string;
493
+ assistantDeliverableHandoff: string;
494
+ assistantDeliverableHandoffNotice: string;
495
+ assistantDeliverableReceipt: string;
496
+ assistantDeliverableRevision: string;
497
+ assistantDeliverableStale: string;
498
+ assistantDeliverableFailed: string;
499
+ assistantHistoryTitle: string;
500
+ assistantHistoryBounded: string;
501
+ assistantHistorySummary: string;
502
+ assistantHistoryOriginals: string;
503
+ assistantHistorySearch: string;
504
+ assistantHistoryQuery: string;
505
+ assistantHistoryLoadMore: string;
506
+ assistantHistoryEmpty: string;
507
+ assistantHistoryScope: string;
508
+ assistantHistoryExcerpt: string;
509
+ assistantHistoryOmitted: string;
510
+ assistantHistoryFailed: string;
511
+ assistantName: string;
512
+ assistantYou: string;
513
+ assistantOperator: string;
514
+ assistantHistoryTruncated: string;
515
+ assistantContextNotice: string;
516
+ assistantContextOmitted: string;
517
+ assistantIdleNotice: string;
518
+ assistantIdleExpired: string;
519
+ assistantWorking: string;
520
+ assistantWaitingChild: string;
521
+ assistantQueueNotice: string;
522
+ assistantOpenChild: string;
523
+ assistantSelectAnswer: string;
524
+ assistantProvideAnswers: string;
525
+ assistantSubmitAnswers: string;
526
+ assistantAnswerFailed: string;
527
+ assistantMinBytes: string;
528
+ assistantMaxBytes: string;
529
+ assistantPreviewNotice: string;
530
+ assistantDocumentNotice: string;
531
+ assistantDocumentReading: string;
532
+ assistantDocumentInvalid: string;
533
+ assistantDocumentRemove: string;
534
+ assistantEditorNotice: string;
535
+ assistantAttachmentNotice: string;
536
+ assistantAttachmentReuse: string;
537
+ assistantAttachmentLabel: string;
538
+ assistantAttachmentDelete: string;
539
+ assistantAttachmentConfirm: string;
540
+ assistantAttachmentDownload: string;
541
+ assistantAttachmentRetry: string;
542
+ assistantAttachmentInvalid: string;
543
+ assistantEditorWrite: string;
544
+ assistantEditorPreview: string;
545
+ assistantEditorBytes: string;
546
+ assistantEditorFailed: string;
547
+ assistantEditorSeed: string;
548
+ assistantEditorRevision: string;
549
+ assistantEditorProposalNotice: string;
550
+ assistantEditorInstruction: string;
551
+ assistantEditorProposed: string;
552
+ assistantEditorRetry: string;
553
+ assistantEditorSuggest: string;
554
+ assistantEditorDiscard: string;
555
+ assistantEditorConfirm: string;
556
+ assistantEditorAccept: string;
557
+ assistantEditorSave: string;
558
+ assistantEditorReload: string;
559
+ assistantEditorHistory: string;
560
+ assistantEditorReviewVersion: string;
561
+ assistantPreviewInterrupted: string;
562
+ assistantSubmitSelection: string;
563
+ assistantMessageLabel: string;
564
+ assistantMemoryTitle: string;
565
+ assistantMemoryNotice: string;
566
+ assistantRecall: string;
567
+ assistantRemember: string;
568
+ assistantForget: string;
569
+ assistantSaved: string;
570
+ assistantNone: string;
571
+ assistantRevision: string;
572
+ assistantOutputNotice: string;
573
+ assistantFinalizing: string;
574
+ assistantRetryFinalization: string;
575
+ assistantRetryContext: string;
576
+ assistantConcise: string;
577
+ assistantBalanced: string;
578
+ assistantDetailed: string;
579
+ personalMemoryTitle: string;
580
+ personalMemoryNotice: string;
581
+ personalMemoryScope: string;
582
+ personalMemoryRecall: string;
583
+ personalMemoryContent: string;
584
+ personalMemoryExpiry: string;
585
+ personalMemoryReview: string;
586
+ personalMemoryConsent: string;
587
+ personalMemoryCommit: string;
588
+ personalMemoryCorrect: string;
589
+ personalMemoryForget: string;
590
+ personalMemoryCancel: string;
591
+ personalMemoryPending: string;
592
+ personalMemoryCommitted: string;
593
+ personalMemoryRejected: string;
594
+ personalMemoryUnavailable: string;
595
+ personalMemoryExpired: string;
596
+ personalMemoryNoExpiry: string;
370
597
  }
371
598
  declare const defaultStrings: WidgetStrings;
372
599
  /** Merge a partial override on top of the defaults. */
@@ -385,6 +612,7 @@ interface ChatTimelineProps {
385
612
  entries: TimelineEntry[];
386
613
  /** Show typing indicator when waiting for bot response */
387
614
  showTyping?: boolean;
615
+ waitingMessage?: string;
388
616
  /** Accumulated LLM tokens for the in-progress message; empty when idle */
389
617
  streamingText?: string;
390
618
  /**
@@ -393,14 +621,19 @@ interface ChatTimelineProps {
393
621
  * summary, document cards) are unaffected. See `docs/embedding.md`.
394
622
  */
395
623
  components?: BubbleComponents;
624
+ apiBase?: string;
625
+ runId?: string | null;
626
+ participantToken?: string | null;
396
627
  }
397
- declare function ChatTimeline({ entries, showTyping, streamingText, components }: ChatTimelineProps): react_jsx_runtime.JSX.Element;
628
+ declare function ChatTimeline({ entries, showTyping, waitingMessage, streamingText, components, apiBase, runId, participantToken, }: ChatTimelineProps): react_jsx_runtime.JSX.Element;
398
629
 
399
630
  interface PersistSessionOptions {
400
631
  storage?: "session" | "local";
401
632
  key?: string;
402
633
  }
403
634
  type PersistSessionConfig = boolean | PersistSessionOptions;
635
+ /** Clear a persisted session (used by restart()). */
636
+ declare function clearPersistedSession(config: PersistSessionConfig | undefined, target: string | undefined): void;
404
637
 
405
638
  interface ChatterflyWidgetProps extends Omit<WidgetConfig, "runId" | "participantToken"> {
406
639
  /** The run ID to connect to. Required unless `deploymentId`/`workflowId` is provided. */
@@ -408,8 +641,13 @@ interface ChatterflyWidgetProps extends Omit<WidgetConfig, "runId" | "participan
408
641
  /** Short-lived JWT issued by POST /runs. Required unless `deploymentId`/`workflowId` is provided. */
409
642
  participantToken?: string;
410
643
  className?: string;
411
- /** Fires once when the run reaches a terminal "completed" state; carries the final run state when available. */
412
- onCompleted?: (output?: Record<string, unknown>) => void;
644
+ /**
645
+ * Fires once when the run reaches a terminal "completed" state; carries the
646
+ * final run state when available, plus the run's connection identity
647
+ * (`{ runId, participantToken }`) so the host can make an authenticated
648
+ * follow-up call against the same run.
649
+ */
650
+ onCompleted?: (output?: Record<string, unknown>, context?: RunCompletionContext) => void;
413
651
  /** Fires once on a terminal "error" state, or on a config/connection failure (missing apiBase, no live deployment, network, etc). */
414
652
  onError?: (err: WidgetError) => void;
415
653
  /** Firehose — every raw run event, in order. Prefer the granular callbacks below unless you need everything. */
@@ -499,10 +737,239 @@ type LauncherPosition = "bottom-right" | "bottom-left";
499
737
  */
500
738
  declare const ChatterflyWidget: react.ForwardRefExoticComponent<ChatterflyWidgetProps & react.RefAttributes<ChatterflyWidgetHandle>>;
501
739
 
740
+ interface AppThemeSpec {
741
+ preset?: "default" | "editorial-light" | "slate-dark" | "minimal";
742
+ color_scheme?: "light" | "dark" | "auto";
743
+ brand_color?: string;
744
+ accent_color?: string;
745
+ logo_url?: string;
746
+ tagline?: string;
747
+ footer_text?: string;
748
+ }
749
+ interface AppAuthSpec {
750
+ mode: "public" | "private_broker" | "chatterfly_managed" | "workspace_members";
751
+ identity_namespace_id?: string;
752
+ session_exchange_url?: string;
753
+ allowed_origins?: string[];
754
+ allowed_email_domains?: string[];
755
+ }
756
+ interface AppNavItem {
757
+ label: string;
758
+ page_id: string;
759
+ }
760
+ interface AppNavigationSpec {
761
+ layout?: "topbar" | "sidebar" | "minimal" | "single_page";
762
+ items?: AppNavItem[];
763
+ }
764
+ interface AppFloatingWidgetSpec {
765
+ id?: string;
766
+ service: string;
767
+ export_slug: string;
768
+ launcher_label?: string;
769
+ persist_session?: boolean;
770
+ }
771
+ interface AppActionItem {
772
+ label: string;
773
+ page_id?: string;
774
+ target_slot_id?: string;
775
+ href?: string;
776
+ style?: "primary" | "secondary";
777
+ }
778
+ interface AppCardItem {
779
+ title: string;
780
+ body?: string;
781
+ icon?: string;
782
+ badge?: string;
783
+ cta_label?: string;
784
+ page_id?: string;
785
+ href?: string;
786
+ }
787
+ interface AppBlockSpec {
788
+ type: "WidgetSlot" | "WikiExplorer" | "DataTableView" | "FileLibrary" | "MarkdownHero" | "StaticSection" | "CardGrid" | "RunHistoryList";
789
+ id: string;
790
+ eyebrow?: string;
791
+ title?: string;
792
+ content?: string;
793
+ align?: "left" | "center";
794
+ variant?: "default" | "callout" | "subtle";
795
+ actions?: AppActionItem[];
796
+ service?: string;
797
+ export_slug?: string;
798
+ kb_slug?: string;
799
+ root_page_slug?: string;
800
+ show_citations?: boolean;
801
+ show_last_updated?: boolean;
802
+ surface_mode?: "card" | "split" | "embedded_full" | "inline_form";
803
+ persist_session?: boolean;
804
+ initial_input?: Record<string, unknown>;
805
+ allowed_columns?: string[];
806
+ fixed_filter?: Record<string, unknown>;
807
+ page_size?: number;
808
+ root_prefix?: string;
809
+ view_mode?: "grid" | "list";
810
+ allow_preview?: boolean;
811
+ allow_upload?: boolean;
812
+ cards?: AppCardItem[];
813
+ }
814
+ interface AppPageSpec {
815
+ id: string;
816
+ path: string;
817
+ title: string;
818
+ floating_widget?: AppFloatingWidgetSpec;
819
+ blocks: AppBlockSpec[];
820
+ }
821
+ interface AppPWASpec {
822
+ enabled?: boolean;
823
+ short_name?: string;
824
+ icon_url?: string;
825
+ }
826
+ interface AppViewerStatus {
827
+ authenticated: boolean;
828
+ mode?: string;
829
+ subject?: string;
830
+ user_id?: string;
831
+ role?: string;
832
+ expires_at?: string;
833
+ }
834
+ interface AppBrandingInfo {
835
+ show_powered_by?: boolean;
836
+ referral_url?: string;
837
+ }
838
+ interface AppDefinition {
839
+ title: string;
840
+ description?: string;
841
+ theme?: AppThemeSpec;
842
+ auth?: AppAuthSpec;
843
+ navigation?: AppNavigationSpec;
844
+ floating_widget?: AppFloatingWidgetSpec;
845
+ pwa?: AppPWASpec;
846
+ pages: AppPageSpec[];
847
+ }
848
+ interface ChatterflyAppProps {
849
+ apiBase: string;
850
+ /** Optional override for `/api/app-runtime/*` REST calls (e.g. `""` for a same-origin proxy while keeping `apiBase` pointed at the WebSocket backend). */
851
+ appRuntimeBase?: string;
852
+ appId?: string;
853
+ manifestUrl?: string;
854
+ definition?: AppDefinition;
855
+ environment?: string;
856
+ initialPageId?: string;
857
+ appSessionToken?: string;
858
+ initialViewer?: AppViewerStatus;
859
+ initialBranding?: AppBrandingInfo;
860
+ previewMode?: boolean;
861
+ practiceMode?: boolean;
862
+ onExitPractice?: () => void;
863
+ }
864
+ declare const ChatterflyApp: react__default.FC<ChatterflyAppProps>;
865
+
866
+ interface WorkflowDocumentRevision {
867
+ revision: number;
868
+ membership_revision: number;
869
+ audience: string[];
870
+ content: string;
871
+ content_sha256: string;
872
+ publisher_participant_id: string;
873
+ execution_run_id: string;
874
+ execution_participant_id: string;
875
+ proposal_id: string | null;
876
+ request_id: string;
877
+ created_at: string;
878
+ }
879
+ interface WorkflowDocumentProposal {
880
+ id: string;
881
+ expected_revision: number;
882
+ membership_revision: number;
883
+ content: string;
884
+ status: "draft" | "published" | "discarded";
885
+ }
886
+ interface WorkflowDocument {
887
+ id: string;
888
+ run_id: string;
889
+ creator_participant_id: string;
890
+ title: string;
891
+ format: "plain" | "markdown";
892
+ revision: number;
893
+ membership_revision: number;
894
+ audience: string[];
895
+ history: WorkflowDocumentRevision[];
896
+ proposals: WorkflowDocumentProposal[];
897
+ }
898
+ interface WorkflowDocumentReceipt {
899
+ document_id: string;
900
+ revision: number;
901
+ content_sha256: string;
902
+ format: "plain" | "markdown";
903
+ }
904
+ interface DocumentAudienceCandidate {
905
+ participant_id: string;
906
+ role: string;
907
+ }
908
+ interface DocumentAudienceCandidates {
909
+ items: DocumentAudienceCandidate[];
910
+ self_participant_id: string;
911
+ next_after?: string;
912
+ }
913
+ declare class WorkflowDocumentError extends Error {
914
+ readonly status: number;
915
+ constructor(message: string, status: number);
916
+ }
917
+ declare function workflowDocumentClient(apiBase: string, runID: string, participantToken: string): {
918
+ audienceCandidates: (after?: string, signal?: AbortSignal) => Promise<DocumentAudienceCandidates>;
919
+ read: (id: string, signal?: AbortSignal) => Promise<WorkflowDocument>;
920
+ create: (body: {
921
+ request_id: string;
922
+ title: string;
923
+ format: "plain" | "markdown";
924
+ content: string;
925
+ participant_ids: string[];
926
+ confirm: true;
927
+ }, signal?: AbortSignal) => Promise<{
928
+ document_id: string;
929
+ revision: number;
930
+ }>;
931
+ propose: (id: string, body: {
932
+ request_id: string;
933
+ expected_revision: number;
934
+ membership_revision: number;
935
+ content: string;
936
+ }, signal?: AbortSignal) => Promise<WorkflowDocumentProposal>;
937
+ publish: (id: string, body: {
938
+ request_id: string;
939
+ proposal_id: string;
940
+ expected_revision: number;
941
+ membership_revision: number;
942
+ confirm: true;
943
+ }, signal?: AbortSignal) => Promise<{
944
+ document_id: string;
945
+ revision: number;
946
+ }>;
947
+ revoke: (id: string, participant_id: string, membership_revision: number, signal?: AbortSignal) => Promise<void>;
948
+ delete: (id: string, expected_revision: number, membership_revision: number, signal?: AbortSignal) => Promise<void>;
949
+ };
950
+
951
+ interface SharedDocumentEditorProps {
952
+ apiBase: string;
953
+ runID: string;
954
+ participantToken: string;
955
+ documentID?: string;
956
+ initialContent?: string;
957
+ format?: "plain" | "markdown";
958
+ prompt?: string;
959
+ disabled?: boolean;
960
+ onDone?: (receipt: WorkflowDocumentReceipt) => Promise<void>;
961
+ }
962
+ declare function SharedDocumentEditor({ apiBase, runID, participantToken, documentID, initialContent, format, prompt, disabled, onDone }: SharedDocumentEditorProps): react_jsx_runtime.JSX.Element;
963
+
502
964
  interface ChatAdapterProps extends WidgetConfig {
503
965
  className?: string;
504
- /** Fires once when the run reaches a terminal "completed" state; carries the final run state when available. */
505
- onCompleted?: (output?: Record<string, unknown>) => void;
966
+ /**
967
+ * Fires once when the run reaches a terminal "completed" state; carries the
968
+ * final run state when available, plus the run's connection identity
969
+ * (current run ID and participant token) so the host can make an
970
+ * authenticated follow-up call against the same run without re-deriving it.
971
+ */
972
+ onCompleted?: (output?: Record<string, unknown>, context?: RunCompletionContext) => void;
506
973
  /** Fires once when the run reaches a terminal "error" state, or on a config/connection failure. */
507
974
  onError?: (err: WidgetError) => void;
508
975
  /** Firehose — every raw run event, in order. Prefer the granular callbacks below unless you need everything. */
@@ -535,6 +1002,7 @@ interface ChatAdapterProps extends WidgetConfig {
535
1002
  components?: BubbleComponents;
536
1003
  /** Overrides for any built-in chrome literal (status labels, chat affordances). See `WidgetStrings`. */
537
1004
  strings?: Partial<WidgetStrings>;
1005
+ onAssistantNewSession?: () => void;
538
1006
  }
539
1007
  /**
540
1008
  * Chat-first participant experience.
@@ -767,6 +1235,15 @@ interface LiveSessionConfig {
767
1235
  inputSampleRate?: number;
768
1236
  /** Playback decode rate. Should match channel.live.output_sample_rate. */
769
1237
  outputSampleRate?: number;
1238
+ /** False keeps microphone, AudioContext, and WebSocket unopened. */
1239
+ enabled?: boolean;
1240
+ /** Persisted by the backend before any Live provider connection is opened. */
1241
+ recordingConsent?: {
1242
+ accepted: boolean;
1243
+ mode: "announcement" | "affirmative" | "external";
1244
+ evidenceRef?: string;
1245
+ locale?: string;
1246
+ };
770
1247
  }
771
1248
  interface LiveSessionResult {
772
1249
  state: LiveVoiceState;
@@ -795,6 +1272,7 @@ interface LiveSessionResult {
795
1272
  completion: {
796
1273
  status: "finalizing" | "completed";
797
1274
  reason: string | null;
1275
+ phase: "analyzing" | "saving" | "ready" | null;
798
1276
  } | null;
799
1277
  /** Smoothed microphone energy in the range 0..1; visual feedback only. */
800
1278
  inputLevel: number;
@@ -893,11 +1371,337 @@ declare function InputDisplay({ onSubmit, disabled }: InputComponentProps): reac
893
1371
  */
894
1372
  declare function getInputComponent(inputType: string): ComponentType<InputComponentProps>;
895
1373
 
1374
+ interface AssistantProgress {
1375
+ type: "assistant.progress";
1376
+ conversation_id: string;
1377
+ source_seq: number;
1378
+ phase: "ready" | "draft" | "reset" | "settled" | "error";
1379
+ generation?: string;
1380
+ source_version?: string;
1381
+ revision?: number;
1382
+ content?: string;
1383
+ }
1384
+
1385
+ interface AssistantMessage {
1386
+ id: string;
1387
+ seq: number;
1388
+ author_kind: "participant" | "agent" | "operator";
1389
+ content: string;
1390
+ }
1391
+ interface AssistantTransport {
1392
+ text: boolean;
1393
+ turn_speech: boolean;
1394
+ live: false;
1395
+ recording: false;
1396
+ speech_style: "push_to_talk";
1397
+ consent: "explicit_each_capture";
1398
+ }
1399
+ interface AssistantTransportDeliveries {
1400
+ conversation_id: string;
1401
+ deliveries: {
1402
+ seq: number;
1403
+ status: "queued" | "sending" | "sent" | "failed" | "cancelled";
1404
+ attempts: number;
1405
+ error: string | null;
1406
+ }[];
1407
+ }
1408
+ interface AssistantContextProvenance {
1409
+ prompt_version?: string;
1410
+ policy_sha256?: string;
1411
+ model?: string;
1412
+ tenant_id?: string;
1413
+ run_id?: string;
1414
+ conversation_id?: string;
1415
+ participant_id?: string;
1416
+ execution_address?: string;
1417
+ registered_agent_id?: string;
1418
+ agent_version?: number;
1419
+ identity_id?: string | null;
1420
+ end_user_id?: string | null;
1421
+ source_epoch?: number;
1422
+ memory_fence?: string;
1423
+ preference_revision?: number;
1424
+ through_exchange?: number;
1425
+ source_from_seq?: number;
1426
+ source_through_seq?: number;
1427
+ omitted_older_exchanges?: number;
1428
+ excluded_stale_exchanges?: number;
1429
+ sources?: {
1430
+ id: string;
1431
+ seq: number;
1432
+ kind: "participant" | "agent";
1433
+ sha256: string;
1434
+ }[];
1435
+ }
1436
+ interface AssistantContextDiagnostics {
1437
+ mode: "originals_only" | "source_summary";
1438
+ cache_status: "generating" | "ready" | "failed" | null;
1439
+ generation: number | null;
1440
+ calls: number | null;
1441
+ provenance: AssistantContextProvenance;
1442
+ invocation_id?: string | null;
1443
+ attempts?: number | null;
1444
+ lease_until?: string | null;
1445
+ retryable?: boolean;
1446
+ error?: string | null;
1447
+ source_seq?: number | null;
1448
+ provider_calls?: number | null;
1449
+ reported_usage_tokens?: number | null;
1450
+ unreported_provider_calls?: number | null;
1451
+ }
1452
+ interface AssistantSessionState {
1453
+ requires_output?: boolean;
1454
+ finalization_coverage?: {
1455
+ complete: boolean;
1456
+ eligible_messages: number;
1457
+ included_messages: number;
1458
+ omitted_messages: number;
1459
+ source_content_bytes: number;
1460
+ } | null;
1461
+ editor_available?: boolean;
1462
+ editor_documents_available?: boolean;
1463
+ preview_available?: boolean;
1464
+ attachments?: {
1465
+ available: boolean;
1466
+ items: AssistantAttachment[];
1467
+ max_bytes: number;
1468
+ max_per_message: number;
1469
+ max_pdf_pages: number;
1470
+ max_image_dimension: number;
1471
+ context: "current_turn_only" | "explicit_same_conversation";
1472
+ };
1473
+ session: {
1474
+ run_id: string;
1475
+ conversation_id: string;
1476
+ execution_address?: string;
1477
+ status: "open" | "finalizing" | "closed";
1478
+ run_status?: string;
1479
+ error?: string;
1480
+ idle?: {
1481
+ timeout_seconds: number | null;
1482
+ last_activity_at: string;
1483
+ expires_at: string | null;
1484
+ expired_at: string | null;
1485
+ reason?: "idle_expired";
1486
+ };
1487
+ finalization_status?: "queued" | "failed" | "completed" | "cancelled" | null;
1488
+ finalization_attempts?: number;
1489
+ finalization_error?: string | null;
1490
+ output?: unknown;
1491
+ };
1492
+ messages: AssistantMessage[];
1493
+ turns: {
1494
+ source_seq: number;
1495
+ status: string;
1496
+ error: string | null;
1497
+ preview_ready?: boolean;
1498
+ preview_source_version?: string;
1499
+ clarification?: {
1500
+ multiple?: boolean;
1501
+ options?: string[];
1502
+ fields?: FieldSpec[];
1503
+ };
1504
+ child_available?: boolean;
1505
+ child_run_id?: string;
1506
+ }[];
1507
+ memory_available: boolean;
1508
+ personal_memory_available?: boolean;
1509
+ registered_agent_id?: string;
1510
+ history_truncated?: boolean;
1511
+ context?: AssistantContextDiagnostics;
1512
+ }
1513
+ interface AssistantEditorRevision {
1514
+ revision: number;
1515
+ content: string;
1516
+ proposal_id: string | null;
1517
+ created_at: string;
1518
+ }
1519
+ interface AssistantEditorDocument {
1520
+ id: string | null;
1521
+ source_seq: number;
1522
+ field_id: string;
1523
+ format: "plain" | "markdown";
1524
+ revision: number;
1525
+ content: string;
1526
+ expires_at: string | null;
1527
+ history: AssistantEditorRevision[];
1528
+ }
1529
+ interface AssistantEditorProposal {
1530
+ id: string;
1531
+ document_id: string;
1532
+ expected_revision: number;
1533
+ base_content: string;
1534
+ instruction: string;
1535
+ content: string;
1536
+ status: "ready";
1537
+ attempts: number;
1538
+ lease_until: string;
1539
+ }
1540
+ interface AssistantAttachment {
1541
+ id: string;
1542
+ filename: string;
1543
+ content_type: "image/png" | "image/jpeg" | "application/pdf";
1544
+ size: number;
1545
+ sha256: string;
1546
+ pages: number;
1547
+ status: "pending" | "ready" | "deleting" | "deleted";
1548
+ expires_at: string;
1549
+ source_seq?: number;
1550
+ }
1551
+ interface AssistantPreference {
1552
+ revision: number;
1553
+ response_style: "concise" | "balanced" | "detailed" | null;
1554
+ forgotten: boolean;
1555
+ }
1556
+ interface PersonalMemory {
1557
+ id: string;
1558
+ content: string | null;
1559
+ revision: number;
1560
+ status: "active" | "expired" | "forgotten";
1561
+ source_run_id: string | null;
1562
+ source_participant_id: string | null;
1563
+ author_identity_id: string | null;
1564
+ created_at: string;
1565
+ updated_at: string;
1566
+ expires_at: string | null;
1567
+ agent_id?: string;
1568
+ shared?: boolean;
1569
+ source_agent_id?: string;
1570
+ source_agent_name?: string;
1571
+ }
1572
+ interface PersonalMemoryList {
1573
+ scope: "registered_agent";
1574
+ agent_id: string;
1575
+ agent_name?: string;
1576
+ memories: PersonalMemory[];
1577
+ max_records?: number;
1578
+ max_content_bytes?: number;
1579
+ context_max_records?: number;
1580
+ context_max_bytes?: number;
1581
+ }
1582
+ interface PersonalMemoryWrite {
1583
+ request_id?: string;
1584
+ id?: string;
1585
+ expected_revision: number;
1586
+ content?: string;
1587
+ forget?: boolean;
1588
+ confirm: true;
1589
+ expires_at?: string;
1590
+ }
1591
+ interface PersonalMemoryShareTargetProject {
1592
+ id: string;
1593
+ name: string;
1594
+ }
1595
+ interface PersonalMemoryShareTargetAgent {
1596
+ id: string;
1597
+ name: string;
1598
+ project_name: string;
1599
+ }
1600
+ interface PersonalMemoryShareTargets {
1601
+ workspace: {
1602
+ allow: boolean;
1603
+ label: string;
1604
+ };
1605
+ projects: PersonalMemoryShareTargetProject[];
1606
+ agents: PersonalMemoryShareTargetAgent[];
1607
+ }
1608
+ interface PersonalMemoryGrant {
1609
+ id: string;
1610
+ memory_id: string;
1611
+ memory_revision: number;
1612
+ scope: "agent" | "project" | "workspace";
1613
+ target_id: string | null;
1614
+ target_name?: string | null;
1615
+ revision: number;
1616
+ revoked_at: string | null;
1617
+ expires_at: string;
1618
+ }
1619
+ interface PersonalMemoryExport {
1620
+ grants: PersonalMemoryGrant[];
1621
+ memories: PersonalMemory[];
1622
+ fence: string;
1623
+ share_targets?: PersonalMemoryShareTargets;
1624
+ agent_id?: string;
1625
+ agent_name?: string;
1626
+ scope: "current_registered_agent";
1627
+ export_version: 1;
1628
+ next_after?: string | null;
1629
+ }
1630
+ type PersonalMemorySharingWrite = {
1631
+ action: "grant";
1632
+ id: string;
1633
+ memory_id: string;
1634
+ expected_revision: number;
1635
+ scope: PersonalMemoryGrant["scope"];
1636
+ target_id?: string;
1637
+ expires_at: string;
1638
+ confirm: true;
1639
+ } | {
1640
+ action: "revoke";
1641
+ id: string;
1642
+ expected_revision: number;
1643
+ confirm: true;
1644
+ } | {
1645
+ action: "forget-all";
1646
+ expected_fence: string;
1647
+ confirm: true;
1648
+ };
1649
+ declare class AssistantRequestError extends Error {
1650
+ readonly status: number;
1651
+ readonly definitelyRejected: boolean;
1652
+ constructor(message: string, status: number, definitelyRejected?: boolean);
1653
+ }
1654
+ /** Separate authorized replay: assistant text never enters generic run events. */
1655
+ declare function useAssistantSession(apiBase: string, runId: string, token: string, runStatus: string, onEvent?: (event: RunEvent) => void, enabled?: boolean): {
1656
+ assistantContextGeneration: number;
1657
+ searchAssistantHistory: (query: string, beforeSeq?: number, signal?: AbortSignal) => Promise<AssistantHistoryResults>;
1658
+ loadAssistantDeliverables: (signal?: AbortSignal) => Promise<AssistantDeliverables$1>;
1659
+ writeAssistantDeliverable: (body: AssistantDeliverableWrite, signal?: AbortSignal) => Promise<AssistantDeliverableReceipt>;
1660
+ loadAssistantTransport: () => Promise<AssistantTransport>;
1661
+ loadAssistantTransportDeliveries: () => Promise<AssistantTransportDeliveries>;
1662
+ transcribeAssistantSpeech: (audio: Blob) => Promise<string>;
1663
+ synthesizeAssistantSpeech: (seq: number) => Promise<Blob>;
1664
+ assistant: AssistantSessionState | null;
1665
+ assistantTransitioning: boolean;
1666
+ assistantError: string | null;
1667
+ assistantPreference: AssistantPreference | null;
1668
+ personalMemories: PersonalMemoryList | null;
1669
+ sendAssistantMessage: (content: string, idempotencyKey?: string, attachmentIDs?: string[]) => Promise<string>;
1670
+ uploadAssistantAttachment: (file: File, requestID: string, signal?: AbortSignal) => Promise<AssistantAttachment>;
1671
+ downloadAssistantAttachment: (attachment: AssistantAttachment, signal?: AbortSignal) => Promise<Blob>;
1672
+ deleteAssistantAttachment: (id: string, confirm: true) => Promise<void>;
1673
+ loadAssistantEditor: (sourceSeq: number, fieldID: string, signal?: AbortSignal) => Promise<AssistantEditorDocument>;
1674
+ proposeAssistantEditor: (sourceSeq: number, fieldID: string, expectedRevision: number, content: string, instruction: string, requestID: string, signal?: AbortSignal) => Promise<AssistantEditorProposal>;
1675
+ saveAssistantEditor: (sourceSeq: number, fieldID: string, expectedRevision: number, content: string, requestID: string, confirm: true, proposalID?: string, signal?: AbortSignal) => Promise<AssistantEditorDocument>;
1676
+ discardAssistantEditorProposal: (sourceSeq: number, fieldID: string, proposalID: string, confirm: true, signal?: AbortSignal) => Promise<void>;
1677
+ submitAssistantClarification: (sourceSeq: number, values: string[] | Record<string, unknown>, idempotencyKey?: string, editorRevisions?: Record<string, number>) => Promise<void>;
1678
+ openAssistantChild: () => Promise<{
1679
+ run_id: string;
1680
+ participant_token: string;
1681
+ }>;
1682
+ closeAssistant: () => Promise<void>;
1683
+ retryAssistantFinalization: (expectedAttempt: number) => Promise<void>;
1684
+ retryAssistantContext: (expectedAttempt: number, expectedGeneration: number) => Promise<void>;
1685
+ recallAssistantPreference: () => Promise<AssistantPreference>;
1686
+ rememberAssistantPreference: (responseStyle: AssistantPreference["response_style"], expectedRevision: number) => Promise<AssistantPreference>;
1687
+ recallAssistantMemories: () => Promise<PersonalMemoryList>;
1688
+ writeAssistantMemory: (input: PersonalMemoryWrite) => Promise<{
1689
+ state: "committed";
1690
+ memory: PersonalMemory;
1691
+ }>;
1692
+ exportAssistantMemories: () => Promise<PersonalMemoryExport>;
1693
+ shareAssistantMemory: (input: PersonalMemorySharingWrite) => Promise<{
1694
+ state: string;
1695
+ }>;
1696
+ assistantProgress: AssistantProgress | null;
1697
+ assistantProgressError: string | null;
1698
+ };
1699
+
896
1700
  interface ValidationError {
897
1701
  field: string;
898
1702
  message: string;
899
1703
  }
900
- interface UseRunStreamResult {
1704
+ interface UseRunStreamResult extends ReturnType<typeof useAssistantSession> {
901
1705
  status: RunStatus;
902
1706
  /** Sanitized terminal classification used for participant-facing presentation. */
903
1707
  failureKind: "timeout" | null;
@@ -920,6 +1724,43 @@ interface UseRunStreamResult {
920
1724
  }
921
1725
  declare function useRunStream(config: WidgetConfig, onEvent?: (event: RunEvent) => void): UseRunStreamResult;
922
1726
 
1727
+ interface WaitingEventNotification {
1728
+ wait_id: string;
1729
+ step_id: string;
1730
+ event: string;
1731
+ created_at: string;
1732
+ }
1733
+ /** Opt-in concrete-participant metadata only; never event delivery or memory. */
1734
+ declare function useWaitingEventNotifications(options: {
1735
+ apiBase: string;
1736
+ runId: string;
1737
+ participantToken: string;
1738
+ enabled?: boolean;
1739
+ }): {
1740
+ notifications: WaitingEventNotification[];
1741
+ error: string | null;
1742
+ loading: boolean;
1743
+ refresh: () => void;
1744
+ };
1745
+
1746
+ interface AssistantDeliverableActions {
1747
+ loadAssistantDeliverables: (signal?: AbortSignal) => Promise<AssistantDeliverables$1>;
1748
+ writeAssistantDeliverable: (body: AssistantDeliverableWrite, signal?: AbortSignal) => Promise<AssistantDeliverableReceipt>;
1749
+ }
1750
+ declare function AssistantDeliverables({ actions, messages, strings: t }: {
1751
+ actions: AssistantDeliverableActions;
1752
+ messages: AssistantMessage[];
1753
+ strings: WidgetStrings;
1754
+ }): react_jsx_runtime.JSX.Element;
1755
+
1756
+ interface AssistantDocument {
1757
+ filename: string;
1758
+ content_type: "text/plain" | "text/markdown" | "text/csv" | "application/json";
1759
+ size: number;
1760
+ content: string;
1761
+ }
1762
+ declare function readAssistantDocument(file: File, strings?: Partial<WidgetStrings>): Promise<AssistantDocument>;
1763
+
923
1764
  interface UseChatterflyRunOptions extends Omit<WidgetConfig, "runId" | "participantToken"> {
924
1765
  /** Direct connection. Required unless `deploymentId`/`workflowId` is provided. */
925
1766
  runId?: string;
@@ -1083,4 +1924,4 @@ declare function extractValue(transcript: string, field: FieldSpec): ExtractionR
1083
1924
  */
1084
1925
  declare function buildSpokenPrompt(field: FieldSpec, voiceHint?: string): string;
1085
1926
 
1086
- export { type BubbleComponents, type BubbleProps, ChatAdapter, type ChatAdapterProps, type ChatMessage, ChatTimeline, type ChatTimelineProps, ChatterflyWidget, type ChatterflyWidgetHandle, type ChatterflyWidgetProps, type ClickToStartConfig, type ColorScheme, ConnectionOnboarding, type ConnectionOnboardingProps, type ConnectionPolicy, type ContinuousVoiceSessionResult, type ContinuousVoiceState, type ExtractionResult, type FieldSpec, type HITLSession, InputBoolean, type InputComponentProps, InputDate, InputDisplay, InputFileUpload, InputLocation, InputMultiSelect, InputNumber, InputRating, InputSingleSelect, InputText, InputTextArea, type InputTypeProps, type LauncherPosition, type LiveSessionConfig, type LiveSessionResult, type LiveTranscript, type LiveVoiceState, type PersistSessionConfig, type PersistSessionOptions, type RecordingState, type RepeaterSpec, type RequiredConnection, type ResumePromptConfig, type RunEvent, type RunStatus, type SessionRendererProps, type SynthState, type ThemeTokens, type TimelineEntry, type UseChatterflyRunOptions, type UseChatterflyRunResult, type UseParticipantConnectionsResult, type UseRunStreamResult, type UseSpeechSynthesisResult, type UseTranscribeResult, type UseVoiceRecorderResult, type ValidationError, type ValidationRule, VoiceContinuousRenderer, type VoiceContinuousRendererProps, VoiceLiveRenderer, type VoiceLiveRendererProps, VoiceOrb, type VoiceOrbProps, type VoiceOrbState, VoicePromptCard, type VoicePromptCardProps, VoiceRenderer, type VoiceRendererProps, type WidgetConfig, WidgetError, type WidgetErrorCode, type WidgetStrings, buildSpokenPrompt, defaultStrings, extractValue, getInputComponent, registerInputType, registerSessionRenderer, resolveInputType, resolveSessionRenderer, resolveStrings, useChatterflyRun, useContinuousVoiceSession, useGeminiLiveSession, useParticipantConnections, useRunStream, useSpeechSynthesis, useTranscribe, useVoiceRecorder };
1927
+ export { type AppActionItem, type AppAuthSpec, type AppBlockSpec, type AppBrandingInfo, type AppCardItem, type AppDefinition, type AppFloatingWidgetSpec, type AppNavItem, type AppNavigationSpec, type AppPWASpec, type AppPageSpec, type AppThemeSpec, type AppViewerStatus, type AssistantAttachment, type AssistantContextDiagnostics, type AssistantContextProvenance, type AssistantDeliverableReceipt, type AssistantDeliverableRevision, type AssistantDeliverableWrite, AssistantDeliverables, type AssistantDeliverables$1 as AssistantDeliverablesState, type AssistantDocument, type AssistantEditorDocument, type AssistantEditorProposal, type AssistantEditorRevision, type AssistantHistoryResults, type AssistantMessage, type AssistantPreference, type AssistantProgress, AssistantRequestError, type AssistantSessionState, type AssistantTransport, type AssistantTransportDeliveries, type BubbleComponents, type BubbleProps, ChatAdapter, type ChatAdapterProps, type ChatMessage, ChatTimeline, type ChatTimelineProps, ChatterflyApp, type ChatterflyAppProps, ChatterflyWidget, type ChatterflyWidgetHandle, type ChatterflyWidgetProps, type ClickToStartConfig, type ColorScheme, ConnectionOnboarding, type ConnectionOnboardingProps, type ConnectionPolicy, type ContinuousVoiceSessionResult, type ContinuousVoiceState, type DocumentAudienceCandidate, type DocumentAudienceCandidates, type ExtractionResult, type FieldSpec, type HITLSession, InputBoolean, type InputComponentProps, InputDate, InputDisplay, InputFileUpload, InputLocation, InputMultiSelect, InputNumber, InputRating, InputSingleSelect, InputText, InputTextArea, type InputTypeProps, type LauncherPosition, type LiveSessionConfig, type LiveSessionResult, type LiveTranscript, type LiveVoiceState, type PersistSessionConfig, type PersistSessionOptions, type PersonalMemory, type PersonalMemoryExport, type PersonalMemoryGrant, type PersonalMemoryList, type PersonalMemoryShareTargetAgent, type PersonalMemoryShareTargetProject, type PersonalMemoryShareTargets, type PersonalMemorySharingWrite, type PersonalMemoryWrite, type RecordingState, type RepeaterSpec, type RequiredConnection, type ResumePromptConfig, type RunCompletionContext, type RunEvent, type RunStatus, type SessionRendererProps, SharedDocumentEditor, type SharedDocumentEditorProps, type SynthState, type ThemeTokens, type TimelineEntry, type UseChatterflyRunOptions, type UseChatterflyRunResult, type UseParticipantConnectionsResult, type UseRunStreamResult, type UseSpeechSynthesisResult, type UseTranscribeResult, type UseVoiceRecorderResult, type ValidationError, type ValidationRule, VoiceContinuousRenderer, type VoiceContinuousRendererProps, VoiceLiveRenderer, type VoiceLiveRendererProps, VoiceOrb, type VoiceOrbProps, type VoiceOrbState, VoicePromptCard, type VoicePromptCardProps, VoiceRenderer, type VoiceRendererProps, type WaitingEventNotification, type WidgetConfig, WidgetError, type WidgetErrorCode, type WidgetStrings, type WorkflowDocument, WorkflowDocumentError, type WorkflowDocumentProposal, type WorkflowDocumentReceipt, type WorkflowDocumentRevision, buildSpokenPrompt, clearPersistedSession, defaultStrings, extractValue, getInputComponent, readAssistantDocument, registerInputType, registerSessionRenderer, resolveInputType, resolveSessionRenderer, resolveStrings, useAssistantSession, useChatterflyRun, useContinuousVoiceSession, useGeminiLiveSession, useParticipantConnections, useRunStream, useSpeechSynthesis, useTranscribe, useVoiceRecorder, useWaitingEventNotifications, workflowDocumentClient };