@wacht/jsx 1.0.0-beta.5 → 1.0.0-beta.50

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
@@ -1,7 +1,9 @@
1
- import { AgentContext } from '@wacht/types';
2
- import { AgentIntegration } from '@wacht/types';
3
- import { AgentMcpServer } from '@wacht/types';
4
- import { AgentWithIntegrations } from '@wacht/types';
1
+ import { Actor } from '@wacht/types';
2
+ import { ActorMcpServerSummary } from '@wacht/types';
3
+ import { ActorProject } from '@wacht/types';
4
+ import { Agent } from '@wacht/types';
5
+ import { AgentThread } from '@wacht/types';
6
+ import { AnswerSubmission } from '@wacht/types';
5
7
  import { ApiAuditAnalyticsResponse } from '@wacht/types';
6
8
  import { ApiAuditLogsResponse } from '@wacht/types';
7
9
  import { ApiAuditTimeseriesResponse } from '@wacht/types';
@@ -13,35 +15,32 @@ import { ButtonHTMLAttributes } from 'react';
13
15
  import { CancelReplayTaskOptions } from '@wacht/types';
14
16
  import { CancelReplayTaskResponse } from '@wacht/types';
15
17
  import { Client } from '@wacht/types';
16
- import { ConsentURLResponse } from '@wacht/types';
18
+ import { ComponentPropsWithoutRef } from 'react';
17
19
  import { ConversationMessage } from '@wacht/types';
20
+ import { CreateActorProjectRequest } from '@wacht/types';
21
+ import { CreateAgentThreadRequest } from '@wacht/types';
18
22
  import { CreateApiAuthKeyInput } from '@wacht/types';
19
- import { CreateContextRequest } from '@wacht/types';
20
23
  import { CreateEndpointOptions } from '@wacht/types';
21
24
  import { CreateEnterpriseConnectionPayload } from '@wacht/types';
25
+ import { CreateProjectTaskBoardItemRequest } from '@wacht/types';
22
26
  import { CSSProperties } from 'react';
23
27
  import { CurrentUser } from '@wacht/types';
24
28
  import { default as default_2 } from 'react';
25
29
  import { DeleteEndpointResponse } from '@wacht/types';
26
30
  import { Deployment } from '@wacht/types';
27
31
  import { DeploymentUISettings } from '@wacht/types';
28
- import { DetailedHTMLProps } from 'react';
29
32
  import { EndpointWithSubscriptions } from '@wacht/types';
30
33
  import { EnterpriseConnection } from '@wacht/types';
31
- import { ErrorInterface } from '@wacht/types';
32
- import { FastOmit } from 'styled-components';
34
+ import { ExternalAgentConnection } from '@wacht/types';
33
35
  import { FC } from 'react';
34
36
  import { FileData } from '@wacht/types';
35
37
  import { FormHTMLAttributes } from 'react';
36
38
  import { ForwardRefExoticComponent } from 'react';
37
39
  import { HTMLAttributes } from 'react';
38
40
  import { InputHTMLAttributes } from 'react';
39
- import { IStyledComponentBase } from 'styled-components/dist/types';
40
41
  import { JSX } from 'react/jsx-runtime';
41
42
  import { KeyedMutator } from 'swr';
42
43
  import { LabelHTMLAttributes } from 'react';
43
- import { ListContextsOptions } from '@wacht/types';
44
- import { McpConnectResponse } from '@wacht/types';
45
44
  import { NewDomain } from '@wacht/types';
46
45
  import { NewOrgnization } from '@wacht/types';
47
46
  import { Notification as Notification_2 } from '@wacht/types';
@@ -54,8 +53,14 @@ import { OrganizationMembership } from '@wacht/types';
54
53
  import { OrganizationMembershipWithOrganization } from '@wacht/types';
55
54
  import { OrganizationRole } from '@wacht/types';
56
55
  import { OrganizationUpdate } from '@wacht/types';
56
+ import { PendingQuestion } from '@wacht/types';
57
57
  import { ProfileCompletionData } from '@wacht/types';
58
58
  import { ProfileCompletionProps } from '@wacht/types';
59
+ import { ProjectTaskBoardItem } from '@wacht/types';
60
+ import { ProjectTaskBoardItemAssignment } from '@wacht/types';
61
+ import { ProjectTaskBoardItemComment } from '@wacht/types';
62
+ import { ProjectTaskWorkspaceFileContent } from '@wacht/types';
63
+ import { ProjectTaskWorkspaceListing } from '@wacht/types';
59
64
  import { ReactNode } from 'react';
60
65
  import { RefAttributes } from 'react';
61
66
  import { ReplayTaskListOptions } from '@wacht/types';
@@ -76,12 +81,17 @@ import { SigninAttempt } from '@wacht/types';
76
81
  import { SignupAttempt } from '@wacht/types';
77
82
  import { SignUpParams } from '@wacht/types';
78
83
  import { SocialConnection } from '@wacht/types';
79
- import { Substitute } from 'styled-components/dist/types';
80
84
  import { TestEndpointOptions } from '@wacht/types';
81
85
  import { TestEndpointResponse } from '@wacht/types';
86
+ import { ThreadPendingApprovalRequestState } from '@wacht/types';
87
+ import { ThreadTaskGraphBundle } from '@wacht/types';
82
88
  import { TimeseriesPoint } from '@wacht/types';
89
+ import { ToolApprovalDecision } from '@wacht/types';
90
+ import { UpdateActorProjectRequest } from '@wacht/types';
91
+ import { UpdateAgentThreadRequest } from '@wacht/types';
83
92
  import { UpdateEndpointOptions } from '@wacht/types';
84
93
  import { UpdateEnterpriseConnectionPayload } from '@wacht/types';
94
+ import { UpdateProjectTaskBoardItemRequest } from '@wacht/types';
85
95
  import { UpdateWebhookSettingsOptions } from '@wacht/types';
86
96
  import { UseApiAuthAuditAnalyticsOptions } from '@wacht/types';
87
97
  import { UseApiAuthAuditLogsOptions } from '@wacht/types';
@@ -89,7 +99,6 @@ import { UseApiAuthAuditTimeseriesOptions } from '@wacht/types';
89
99
  import { UseApiAuthKeysFilters } from '@wacht/types';
90
100
  import { UserAuthenticator } from '@wacht/types';
91
101
  import { UserEmailAddress } from '@wacht/types';
92
- import { UserInputRequestContent } from '@wacht/types';
93
102
  import { UserPasskey } from '@wacht/types';
94
103
  import { UserPhoneNumber } from '@wacht/types';
95
104
  import { UseWebhookAnalyticsOptions } from '@wacht/types';
@@ -134,7 +143,32 @@ declare interface AcceptInviteProps {
134
143
  onError?: (error: string) => void;
135
144
  }
136
145
 
137
- export declare function AuthFormImage(): JSX.Element | null;
146
+ declare interface ActorMcpServerConnectResponse {
147
+ auth_url: string;
148
+ }
149
+
150
+ declare type AgentSearchOptions = {
151
+ enabled?: boolean;
152
+ query?: string;
153
+ limit?: number;
154
+ };
155
+
156
+ declare type AgentThreadHookOptions = {
157
+ enabled?: boolean;
158
+ limit?: number;
159
+ /**
160
+ * Order in which thread-assignment rows are returned. `"asc"` (default) =
161
+ * oldest first; `"desc"` = newest first. Combine with `limit: 1` to fetch
162
+ * only the latest assignment.
163
+ */
164
+ order?: AssignmentListOrder;
165
+ };
166
+
167
+ declare type AssignmentListOrder = "asc" | "desc";
168
+
169
+ export declare function AuthFormImage({ placement, }: {
170
+ placement?: "center" | "left" | "right";
171
+ }): JSX.Element | null;
138
172
 
139
173
  /**
140
174
  * Check if user can manage the organization (admin or manage permissions)
@@ -155,6 +189,10 @@ declare const CONNECTION_STATES: {
155
189
  readonly ERROR: "error";
156
190
  };
157
191
 
192
+ declare interface ConnectResponse {
193
+ redirect_url: string;
194
+ }
195
+
158
196
  export declare const CreateOrganizationForm: React.FC<CreateOrganizationFormProps>;
159
197
 
160
198
  declare interface CreateOrganizationFormProps {
@@ -182,7 +220,7 @@ declare interface CreateWorkspaceDialogProps {
182
220
  organizationId?: string;
183
221
  }
184
222
 
185
- export declare const CreateWorkspaceForm: default_2.FC<CreateWorkspaceFormProps>;
223
+ export declare const CreateWorkspaceForm: React.FC<CreateWorkspaceFormProps>;
186
224
 
187
225
  declare interface CreateWorkspaceFormProps {
188
226
  organizationId?: string;
@@ -191,6 +229,16 @@ declare interface CreateWorkspaceFormProps {
191
229
  onCreateOrganization?: () => void;
192
230
  }
193
231
 
232
+ /**
233
+ * Scopes the Wacht SDK token contract (`--wa-*`, defined in tokens.css under
234
+ * `.wacht-root`) to its subtree, and makes the `.w-*` component layer available.
235
+ * Renders a `display: contents` wrapper so it adds no box of its own. Dark mode
236
+ * is driven by a `.dark` class on any ancestor (or on this element).
237
+ */
238
+ export declare function DefaultStylesProvider({ children, className, style, ...props }: DefaultStylesProviderProps): JSX.Element | null;
239
+
240
+ declare type DefaultStylesProviderProps = ComponentPropsWithoutRef<"div">;
241
+
194
242
  export declare interface DeploymentContextType {
195
243
  loading: boolean;
196
244
  deployment: Deployment | null;
@@ -214,13 +262,13 @@ export declare interface DeploymentInvitationData {
214
262
  error_code?: string;
215
263
  }
216
264
 
217
- export declare function DeploymentProvider({ children, publicKey, adapter, uiOverwrites, }: DeploymentProviderProps): JSX.Element;
265
+ export declare function DeploymentProvider({ children, publicKey, adapter, uiOverrides, }: DeploymentProviderProps): JSX.Element;
218
266
 
219
267
  declare interface DeploymentProviderProps {
220
268
  children: ReactNode;
221
269
  publicKey: string;
222
270
  adapter: PlatformAdapter;
223
- uiOverwrites?: Partial<DeploymentUISettings>;
271
+ uiOverrides?: Partial<DeploymentUISettings>;
224
272
  }
225
273
 
226
274
  export declare const Dialog: FC<DialogProps> & {
@@ -274,15 +322,18 @@ declare interface DialogTriggerProps {
274
322
 
275
323
  export declare const Dropdown: ({ children, open, openChange, style, }: DropdownProps) => JSX.Element;
276
324
 
277
- export declare const DropdownDivider: IStyledComponentBase<"web", FastOmit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
325
+ export declare const DropdownDivider: () => JSX.Element;
326
+
327
+ export declare const DropdownItem: ForwardRefExoticComponent<DropdownItemProps & RefAttributes<HTMLButtonElement>>;
278
328
 
279
- export declare const DropdownItem: IStyledComponentBase<"web", Substitute<DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
280
- $destructive?: boolean;
281
- }>> & string;
329
+ declare interface DropdownItemProps extends ButtonHTMLAttributes<HTMLButtonElement> {
330
+ $destructive?: boolean;
331
+ }
282
332
 
283
- export declare const DropdownItems: ({ children, style, }: {
333
+ export declare const DropdownItems: ({ children, style, className, }: {
284
334
  children: ReactNode;
285
335
  style?: React.CSSProperties;
336
+ className?: string;
286
337
  }) => JSX.Element | null;
287
338
 
288
339
  declare interface DropdownProps {
@@ -310,9 +361,9 @@ declare type EmailSignInParams = {
310
361
  password: string;
311
362
  };
312
363
 
313
- export declare const Form: IStyledComponentBase<"web", FastOmit<DetailedHTMLProps<FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, never>> & string;
364
+ export declare const Form: ForwardRefExoticComponent<FormHTMLAttributes<HTMLFormElement> & RefAttributes<HTMLFormElement>>;
314
365
 
315
- export declare const FormGroup: IStyledComponentBase<"web", FastOmit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
366
+ export declare const FormGroup: ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement>>;
316
367
 
317
368
  /**
318
369
  * Unified execution status mapping between frontend and backend
@@ -326,7 +377,7 @@ declare const FRONTEND_STATUS: {
326
377
  readonly FAILED: "failed";
327
378
  };
328
379
 
329
- declare type FrontendStatus = typeof FRONTEND_STATUS[keyof typeof FRONTEND_STATUS];
380
+ declare type FrontendStatus = (typeof FRONTEND_STATUS)[keyof typeof FRONTEND_STATUS];
330
381
 
331
382
  declare type GenericSignInParams = {
332
383
  email?: string;
@@ -348,7 +399,7 @@ export declare function hasOrgPermission(membership: WithOrgRoles, requiredPermi
348
399
  */
349
400
  export declare function hasWorkspacePermission(membership: WithWsRoles, requiredPermissions: string[]): boolean;
350
401
 
351
- export declare interface IdentifyResult {
402
+ declare interface IdentifyResult {
352
403
  strategy: "sso" | "social" | "password";
353
404
  connection_id?: string;
354
405
  idp_url?: string;
@@ -360,7 +411,9 @@ declare type InitSSOResponseType = {
360
411
  session: Session;
361
412
  };
362
413
 
363
- export declare const Input: IStyledComponentBase<"web", FastOmit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>> & string;
414
+ export declare const Input: ForwardRefExoticComponent<InputHTMLAttributes<HTMLInputElement> & {
415
+ as?: "input" | "textarea";
416
+ } & RefAttributes<HTMLInputElement>>;
364
417
 
365
418
  export declare const isExternalUrl: (url: string) => boolean;
366
419
 
@@ -376,9 +429,9 @@ export declare const isSafeUrl: (url: string) => boolean;
376
429
  */
377
430
  export declare function isWorkspaceAdmin(membership: WithWsRoles): boolean;
378
431
 
379
- export declare const Label: IStyledComponentBase<"web", FastOmit<DetailedHTMLProps<LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never>> & string;
432
+ export declare const Label: ForwardRefExoticComponent<LabelHTMLAttributes<HTMLLabelElement> & RefAttributes<HTMLLabelElement>>;
380
433
 
381
- export declare interface MagicLinkParams {
434
+ declare interface MagicLinkParams {
382
435
  token?: string;
383
436
  attempt?: string;
384
437
  redirectUri?: string;
@@ -486,9 +539,9 @@ declare interface NotificationItemProps {
486
539
  }
487
540
 
488
541
  export declare interface NotificationMessage {
489
- id: number;
490
- user_id: number;
491
- deployment_id: number;
542
+ id: string;
543
+ user_id: string;
544
+ deployment_id: string;
492
545
  title: string;
493
546
  body: string;
494
547
  severity: string;
@@ -538,7 +591,7 @@ export declare const ORG_ADMIN_PERMISSIONS: string[];
538
591
 
539
592
  export declare const ORG_MANAGEMENT_PERMISSIONS: string[];
540
593
 
541
- export declare const OrganizationSwitcher: ({ showPersonal, }: OrganizationSwitcherProps) => JSX.Element | null;
594
+ export declare const OrganizationSwitcher: ({ showPersonal }: OrganizationSwitcherProps) => JSX.Element | null;
542
595
 
543
596
  declare interface OrganizationSwitcherProps {
544
597
  showPersonal?: boolean;
@@ -626,6 +679,27 @@ declare interface ProfileUpdateData {
626
679
  remove_profile_picture?: boolean;
627
680
  }
628
681
 
682
+ declare type ProjectTaskDetailOptions = {
683
+ includeArchived?: boolean;
684
+ /**
685
+ * Order in which assignments are returned. `"asc"` (default) lists oldest
686
+ * first; `"desc"` lists newest first which is convenient when you only need
687
+ * the most recent assignment (combine with `assignmentsLimit: 1`).
688
+ */
689
+ assignmentsOrder?: AssignmentListOrder;
690
+ /**
691
+ * Page size for the assignments list. Default 40, max 200 (server-side cap).
692
+ */
693
+ assignmentsLimit?: number;
694
+ };
695
+
696
+ declare type ProjectTaskListOptions = {
697
+ statuses?: string[];
698
+ includeArchived?: boolean;
699
+ archivedOnly?: boolean;
700
+ limit?: number;
701
+ };
702
+
629
703
  export declare function redirectToProfileCompletion(returnUrl?: string): void;
630
704
 
631
705
  export declare const RequireActiveTenancy: ({ children, }: RequireActiveTenancyProps) => JSX.Element | null;
@@ -638,7 +712,7 @@ declare type SecondFactorPolicy_2 = "none" | "optional" | "enforced";
638
712
 
639
713
  export declare const SignedIn: ({ children }: SignedInProps) => JSX.Element | null;
640
714
 
641
- export declare const SignedInAccounts: React.FC<SignedInAccountsProps>;
715
+ export declare const SignedInAccounts: default_2.FC<SignedInAccountsProps>;
642
716
 
643
717
  declare interface SignedInAccountsProps {
644
718
  onAccountSelect?: (signInId: string) => void;
@@ -671,17 +745,6 @@ declare type SignInEmailOTP = ({ email, }: EmailOTPSignInParams) => Promise<ApiR
671
745
 
672
746
  export declare function SignInForm(): JSX.Element;
673
747
 
674
- declare type SignInFunction<T extends SignInStrategy> = {
675
- ["username"]: SignInPlainUsername;
676
- ["email"]: SignInPlainEmail;
677
- ["phone"]: SignInPhone;
678
- ["email_otp"]: SignInEmailOTP;
679
- ["magic_link"]: SignInMagicLink;
680
- ["oauth"]: SignInOauth;
681
- ["passkey"]: SignInPasskey;
682
- ["generic"]: SignInGeneric;
683
- }[T];
684
-
685
748
  declare type SignInGeneric = ({ email, username, password, phone, strategy, }: GenericSignInParams) => Promise<ApiResult<Session>>;
686
749
 
687
750
  declare type SignInMagicLink = ({ email, }: MagicLinkSignInParams) => Promise<ApiResult<Session>>;
@@ -699,8 +762,6 @@ declare type SignInPlainEmail = ({ email, password, }: EmailSignInParams) => Pro
699
762
 
700
763
  declare type SignInPlainUsername = ({ username, password, }: UsernameSignInParams) => Promise<ApiResult<Session>>;
701
764
 
702
- declare type SignInStrategy = "username" | "email" | "phone" | "email_otp" | "magic_link" | "oauth" | "passkey" | "generic";
703
-
704
765
  declare type SignupEmailOTPVerificationParams = {
705
766
  strategy: "email_otp";
706
767
  redirectUri?: string;
@@ -709,7 +770,7 @@ declare type SignupEmailOTPVerificationParams = {
709
770
  export declare function SignUpForm(): JSX.Element;
710
771
 
711
772
  export declare type SignUpFunction = {
712
- create: (params: SignUpParams) => Promise<ApiResult<unknown, ErrorInterface>>;
773
+ create: (params: SignUpParams) => Promise<ApiResult<unknown>>;
713
774
  prepareVerification: (params: SignupVerificationParams) => Promise<ApiResult<PrepareVerificationResponse_2>>;
714
775
  completeVerification: (verificationCode: string) => Promise<ApiResult<Session>>;
715
776
  validateDeploymentInvitation: (token: string) => Promise<DeploymentInvitationData>;
@@ -875,8 +936,8 @@ export declare const useActiveOrganization: () => {
875
936
 
876
937
  export declare function useActiveTenancy(): {
877
938
  loading: boolean;
878
- orgMembership: OrganizationMembershipWithOrganization | null | undefined;
879
- workspaceMembership: WorkspaceMembership | null | undefined;
939
+ orgMembership: OrganizationMembershipWithOrganization | null;
940
+ workspaceMembership: WorkspaceMembership | null;
880
941
  };
881
942
 
882
943
  export declare const useActiveWorkspace: () => {
@@ -915,22 +976,110 @@ export declare const useActiveWorkspace: () => {
915
976
  resendInvitation: (invitationId: string) => Promise<unknown>;
916
977
  };
917
978
 
918
- export declare function useAgentContext({ contextId, agentName, platformAdapter, }: UseAgentContextProps): {
979
+ export declare function useActorMcpServers(enabled?: boolean): {
980
+ servers: ActorMcpServerSummary[];
981
+ loading: boolean;
982
+ error: any;
983
+ connect: (mcpServerId: string) => Promise<ApiResult<ActorMcpServerConnectResponse>>;
984
+ disconnect: (mcpServerId: string) => Promise<ApiResult< {
985
+ success: boolean;
986
+ }>>;
987
+ refetch: () => Promise<void>;
988
+ };
989
+
990
+ export declare function useActorProjects(options?: {
991
+ includeArchived?: boolean;
992
+ enabled?: boolean;
993
+ }): {
994
+ projects: ActorProject[];
995
+ loading: boolean;
996
+ error: any;
997
+ createProject: (request: CreateActorProjectRequest) => Promise<ApiResult<ActorProject>>;
998
+ updateProject: (projectId: string, request: UpdateActorProjectRequest) => Promise<ApiResult<ActorProject>>;
999
+ archiveProject: (projectId: string) => Promise<ApiResult<ActorProject>>;
1000
+ unarchiveProject: (projectId: string) => Promise<ApiResult<ActorProject>>;
1001
+ refetch: () => Promise<void>;
1002
+ };
1003
+
1004
+ export declare function useActorProjectSearch(options?: AgentSearchOptions): {
1005
+ projects: ActorProject[];
1006
+ loading: boolean;
1007
+ error: any;
1008
+ hasMore: boolean;
1009
+ nextCursor: string | undefined;
1010
+ refetch: () => Promise<void>;
1011
+ };
1012
+
1013
+ export declare function useActorThreadSearch(options?: AgentSearchOptions): {
1014
+ threads: AgentThread[];
1015
+ loading: boolean;
1016
+ error: any;
1017
+ hasMore: boolean;
1018
+ nextCursor: string | undefined;
1019
+ refetch: () => Promise<void>;
1020
+ };
1021
+
1022
+ export declare function useAgentSession(ticket?: string | null): UseAgentSessionResult;
1023
+
1024
+ declare interface UseAgentSessionResult {
1025
+ hasSession: boolean;
1026
+ sessionLoading: boolean;
1027
+ sessionError: Error | null;
1028
+ sessionId: string | null;
1029
+ actor: Actor | null;
1030
+ agents: Agent[];
1031
+ ticketExchanged: boolean;
1032
+ ticketLoading: boolean;
1033
+ refetch: () => Promise<void>;
1034
+ }
1035
+
1036
+ export declare function useAgentThread(threadId?: string, enabled?: boolean): {
1037
+ thread: AgentThread | null;
1038
+ loading: boolean;
1039
+ error: any;
1040
+ updateThread: (request: UpdateAgentThreadRequest) => Promise<ApiResult<AgentThread>>;
1041
+ archiveThread: () => Promise<ApiResult<AgentThread>>;
1042
+ unarchiveThread: () => Promise<ApiResult<AgentThread>>;
1043
+ submitAnswer: (submission: AnswerSubmission) => Promise<void>;
1044
+ refetch: () => Promise<void>;
1045
+ };
1046
+
1047
+ export declare function useAgentThreadAssignments(threadId?: string, options?: AgentThreadHookOptions): {
1048
+ assignments: ProjectTaskBoardItemAssignment[];
1049
+ loading: boolean;
1050
+ error: any;
1051
+ hasMore: boolean;
1052
+ loadingMore: boolean;
1053
+ loadMore: () => Promise<void>;
1054
+ refetch: () => Promise<void>;
1055
+ };
1056
+
1057
+ export declare function useAgentThreadConversation({ threadId, initialThread, platformAdapter, }: UseAgentThreadConversationProps): {
1058
+ thread: AgentThread | null;
1059
+ threadState: AgentThread | null;
1060
+ threadStatus: string | undefined;
919
1061
  messages: ConversationMessage[];
920
- quickQuestions: string[];
921
1062
  pendingMessage: string | null;
922
1063
  pendingFiles: File[] | null;
923
1064
  connectionState: {
924
1065
  status: (typeof CONNECTION_STATES)[keyof typeof CONNECTION_STATES];
925
1066
  };
926
1067
  isConnected: boolean;
927
- isExecuting: boolean;
1068
+ hasActiveRun: boolean;
1069
+ isRunning: boolean;
928
1070
  executionStatus: FrontendStatus;
929
1071
  isWaitingForInput: boolean;
1072
+ pendingApprovalRequest: ThreadPendingApprovalRequestState | null;
1073
+ pendingClarificationRequest: PendingQuestion | null;
930
1074
  hasMoreMessages: boolean;
931
1075
  isLoadingMore: boolean;
1076
+ messagesLoading: boolean;
1077
+ messagesError: Error | null;
1078
+ refreshThread: () => Promise<void>;
1079
+ refreshMessages: () => Promise<void>;
932
1080
  sendMessage: (message: string, files?: File[]) => Promise<void>;
933
- submitUserInput: (input: string) => Promise<void>;
1081
+ submitApprovalResponse: (requestMessageId: string, approvals: ToolApprovalDecision[]) => Promise<boolean>;
1082
+ submitAnswer: (submission: AnswerSubmission) => Promise<boolean>;
934
1083
  clearMessages: () => void;
935
1084
  loadMoreMessages: () => Promise<void>;
936
1085
  cancelExecution: () => Promise<void>;
@@ -938,73 +1087,36 @@ export declare function useAgentContext({ contextId, agentName, platformAdapter,
938
1087
  downloadMessageFile: (file: FileData | null | undefined) => void;
939
1088
  };
940
1089
 
941
- declare interface UseAgentContextProps {
942
- contextId: string;
943
- agentName: string;
1090
+ declare interface UseAgentThreadConversationProps {
1091
+ threadId: string;
1092
+ initialThread?: AgentThread | null;
944
1093
  platformAdapter?: {
945
1094
  onPlatformEvent?: (eventName: string, eventData: unknown) => void;
946
- onPlatformFunction?: (functionName: string, parameters: unknown, executionId: string) => Promise<unknown>;
947
1095
  };
948
- onUserInputRequest?: (request: UserInputRequestContent) => Promise<string>;
949
- }
950
-
951
- export declare function useAgentContexts(options?: UseAgentContextsOptions): UseAgentContextsReturnType;
952
-
953
- declare interface UseAgentContextsOptions extends ListContextsOptions {
954
- enabled?: boolean;
955
1096
  }
956
1097
 
957
- declare type UseAgentContextsReturnType = {
958
- contexts: AgentContext[];
959
- loading: boolean;
960
- error: Error | null;
961
- hasMore: boolean;
962
- createContext: (request: CreateContextRequest) => Promise<AgentContext>;
963
- deleteContext: (id: string) => Promise<void>;
964
- updateContext: (id: string, updates: {
965
- title?: string;
966
- }) => Promise<void>;
967
- refetch: () => Promise<void>;
968
- };
969
-
970
- export declare function useAgentIntegrations(agentName: string | null): UseAgentIntegrationsReturnType;
971
-
972
- declare type UseAgentIntegrationsReturnType = {
973
- integrations: AgentIntegration[];
974
- loading: boolean;
975
- error: Error | null;
976
- generateConsentURL: (integrationId: string, redirectUrl?: string) => Promise<ConsentURLResponse>;
977
- removeIntegration: (integrationId: string) => Promise<void>;
1098
+ export declare function useAgentThreadFilesystem(threadId?: string, enabled?: boolean): {
1099
+ filesystem: ProjectTaskWorkspaceListing;
1100
+ filesystemLoading: boolean;
1101
+ filesystemError: any;
1102
+ getFile: (path: string) => Promise<ProjectTaskWorkspaceFileContent & {
1103
+ blob: Blob;
1104
+ }>;
1105
+ listDirectory: (path?: string) => Promise<ProjectTaskWorkspaceListing>;
978
1106
  refetch: () => Promise<void>;
979
1107
  };
980
1108
 
981
- export declare function useAgentMcpServers(agentName: string | null): UseAgentMcpServersReturnType;
982
-
983
- declare type UseAgentMcpServersReturnType = {
984
- mcpServers: AgentMcpServer[];
1109
+ export declare function useAgentThreadTaskGraphs(threadId?: string, enabled?: boolean): {
1110
+ graphs: ThreadTaskGraphBundle[];
1111
+ latestGraph: ThreadTaskGraphBundle;
1112
+ has_more: boolean;
1113
+ loadingMore: boolean;
985
1114
  loading: boolean;
986
- error: Error | null;
987
- connect: (mcpServerId: string) => Promise<McpConnectResponse>;
988
- disconnect: (mcpServerId: string) => Promise<void>;
1115
+ error: any;
1116
+ loadMore: () => Promise<void>;
989
1117
  refetch: () => Promise<void>;
990
1118
  };
991
1119
 
992
- export declare function useAgentSession(ticket?: string | null): UseAgentSessionResult;
993
-
994
- declare interface UseAgentSessionResult {
995
- hasSession: boolean;
996
- sessionLoading: boolean;
997
- sessionError: Error | null;
998
- sessionId: string | null;
999
- contextGroup: string | null;
1000
- agents: AgentWithIntegrations[];
1001
- activeAgent: AgentWithIntegrations | null;
1002
- setActiveAgent: (agent: AgentWithIntegrations) => void;
1003
- ticketExchanged: boolean;
1004
- ticketLoading: boolean;
1005
- refetch: () => Promise<void>;
1006
- }
1007
-
1008
1120
  export declare function useApiAuthAppSession(ticket?: string | null): UseApiAuthAppSessionResult;
1009
1121
 
1010
1122
  declare interface UseApiAuthAppSessionResult {
@@ -1053,9 +1165,9 @@ export declare function useApiAuthKeys(filters?: UseApiAuthKeysFilters): UseApiA
1053
1165
 
1054
1166
  declare interface UseApiAuthKeysReturn {
1055
1167
  keys: ApiKey[];
1056
- createKey: (input: CreateApiAuthKeyInput) => Promise<ApiKeyWithSecret>;
1057
- rotateKey: (input: RotateApiAuthKeyInput) => Promise<ApiKeyWithSecret>;
1058
- revokeKey: (input: RevokeApiAuthKeyInput) => Promise<void>;
1168
+ createKey: (input: CreateApiAuthKeyInput) => Promise<ApiResult<ApiKeyWithSecret>>;
1169
+ rotateKey: (input: RotateApiAuthKeyInput) => Promise<ApiResult<ApiKeyWithSecret>>;
1170
+ revokeKey: (input: RevokeApiAuthKeyInput) => Promise<ApiResult<void>>;
1059
1171
  loading: boolean;
1060
1172
  error: unknown;
1061
1173
  refetch: () => void;
@@ -1071,20 +1183,33 @@ declare type UseClientReturnType = {
1071
1183
  export declare function useCreateWebhookEndpoint(): UseCreateWebhookEndpointReturn;
1072
1184
 
1073
1185
  declare interface UseCreateWebhookEndpointReturn {
1074
- createEndpoint: (options: CreateEndpointOptions) => Promise<EndpointWithSubscriptions>;
1186
+ createEndpoint: (options: CreateEndpointOptions) => Promise<ApiResult<EndpointWithSubscriptions>>;
1075
1187
  loading: boolean;
1076
1188
  error: unknown;
1077
1189
  }
1078
1190
 
1079
1191
  export declare function useDeployment(): DeploymentContextType;
1080
1192
 
1193
+ export declare function useExternalAgentConnections(enabled?: boolean): {
1194
+ connections: ExternalAgentConnection[];
1195
+ loading: boolean;
1196
+ error: any;
1197
+ connect: (provider: string, slug: string, options?: {
1198
+ returnUrl?: string;
1199
+ }) => Promise<ConnectResponse>;
1200
+ disconnect: (provider: string, slug: string) => Promise<{
1201
+ success: boolean;
1202
+ }>;
1203
+ refetch: () => Promise<void>;
1204
+ };
1205
+
1081
1206
  export declare function useForgotPassword(): {
1082
1207
  loading: boolean;
1083
- forgotPassword: (email: string) => Promise<ApiResult<{}, ErrorInterface>>;
1208
+ forgotPassword: (email: string) => Promise<ApiResult<{}>>;
1084
1209
  verifyOtp: (email: string, otp: string) => Promise<ApiResult<{
1085
1210
  token: string;
1086
- }, ErrorInterface>>;
1087
- resetPassword: (token: string, password: string) => Promise<ApiResult<Session, ErrorInterface>>;
1211
+ }>>;
1212
+ resetPassword: (token: string, password: string) => Promise<ApiResult<Session>>;
1088
1213
  };
1089
1214
 
1090
1215
  export declare const useInvitation: () => {
@@ -1095,13 +1220,11 @@ export declare const useInvitation: () => {
1095
1220
  reset: () => void;
1096
1221
  };
1097
1222
 
1098
- export declare function useMagicLinkParams(): MagicLinkParams;
1099
-
1100
1223
  export declare function useMagicLinkVerification(): UseMagicLinkVerificationReturnType;
1101
1224
 
1102
- export declare interface UseMagicLinkVerificationReturnType {
1225
+ declare interface UseMagicLinkVerificationReturnType {
1103
1226
  loading: boolean;
1104
- verifyMagicLink: (params: MagicLinkParams) => Promise<ApiResult<{}, ErrorInterface>>;
1227
+ verifyMagicLink: (params: MagicLinkParams) => Promise<ApiResult<{}>>;
1105
1228
  success: boolean | null;
1106
1229
  }
1107
1230
 
@@ -1156,14 +1279,16 @@ export declare function useNotificationStream({ enabled, channels, organizationI
1156
1279
  export declare interface UseNotificationStreamOptions {
1157
1280
  enabled?: boolean;
1158
1281
  channels?: string[];
1159
- organizationIds?: number[];
1160
- workspaceIds?: number[];
1282
+ organizationIds?: string[];
1283
+ workspaceIds?: string[];
1161
1284
  onNotification?: (notification: NotificationMessage) => void;
1162
1285
  onError?: (error: string) => void;
1163
1286
  reconnectDelay?: number;
1164
1287
  maxReconnectAttempts?: number;
1165
1288
  }
1166
1289
 
1290
+ export declare function useNotificationUnreadCount(params?: NotificationListParams): UseScopeUnreadReturnType;
1291
+
1167
1292
  export declare const useOrganizationList: () => {
1168
1293
  organizations: Organization[] | undefined;
1169
1294
  loading: boolean;
@@ -1231,10 +1356,94 @@ export declare const useOrganizationMemberships: () => {
1231
1356
  refetch: () => Promise<void>;
1232
1357
  };
1233
1358
 
1359
+ export declare function useProjectTaskBoardItem(projectId?: string, itemId?: string, enabled?: boolean, options?: ProjectTaskDetailOptions): {
1360
+ item: ProjectTaskBoardItem | null;
1361
+ assignments: ProjectTaskBoardItemAssignment[];
1362
+ assignmentsHasMore: boolean;
1363
+ assignmentsLoadingMore: boolean;
1364
+ loadMoreAssignments: () => Promise<void>;
1365
+ taskWorkspace: ProjectTaskWorkspaceListing;
1366
+ taskWorkspaceLoading: boolean;
1367
+ taskWorkspaceError: any;
1368
+ loading: boolean;
1369
+ error: any;
1370
+ updateItem: (request: UpdateProjectTaskBoardItemRequest, files?: File[]) => Promise<ApiResult<ProjectTaskBoardItem>>;
1371
+ archiveItem: () => Promise<ApiResult<ProjectTaskBoardItem>>;
1372
+ unarchiveItem: () => Promise<ApiResult<ProjectTaskBoardItem>>;
1373
+ cancelItem: () => Promise<ApiResult<ProjectTaskBoardItem>>;
1374
+ submitAnswer: (submission: AnswerSubmission) => Promise<ApiResult<ProjectTaskBoardItem>>;
1375
+ submitApproval: (approvals: ToolApprovalDecision[]) => Promise<boolean>;
1376
+ getTaskWorkspaceFile: (path: string) => Promise<ApiResult<ProjectTaskWorkspaceFileContent>>;
1377
+ downloadTaskWorkspaceFile: (path: string) => Promise<void>;
1378
+ listTaskWorkspaceDirectory: (path?: string) => Promise<ApiResult<ProjectTaskWorkspaceListing>>;
1379
+ refetch: () => Promise<void>;
1380
+ refetchAssignments: () => Promise<void>;
1381
+ refetchTaskWorkspace: () => Promise<void>;
1382
+ };
1383
+
1384
+ export declare function useProjectTaskBoardItemComments(projectId?: string, itemId?: string, enabled?: boolean): {
1385
+ comments: ProjectTaskBoardItemComment[];
1386
+ loading: boolean;
1387
+ error: any;
1388
+ createComment: (body: string, files?: File[]) => Promise<ApiResult<ProjectTaskBoardItemComment>>;
1389
+ refetch: () => Promise<void>;
1390
+ };
1391
+
1392
+ export declare function useProjectTasks(projectId?: string, enabled?: boolean, options?: ProjectTaskListOptions): {
1393
+ tasks: ProjectTaskBoardItem[];
1394
+ loading: boolean;
1395
+ error: any;
1396
+ hasMore: boolean;
1397
+ loadingMore: boolean;
1398
+ loadMore: () => Promise<void>;
1399
+ createTask: (request: CreateProjectTaskBoardItemRequest, files?: File[]) => Promise<ApiResult<ProjectTaskBoardItem>>;
1400
+ archiveTask: (itemId: string) => Promise<ApiResult<ProjectTaskBoardItem>>;
1401
+ unarchiveTask: (itemId: string) => Promise<ApiResult<ProjectTaskBoardItem>>;
1402
+ refetch: () => Promise<void>;
1403
+ };
1404
+
1405
+ export declare function useProjectThreadFeed(projectId?: string, options?: {
1406
+ includeArchived?: boolean;
1407
+ archivedOnly?: boolean;
1408
+ enabled?: boolean;
1409
+ query?: string;
1410
+ limit?: number;
1411
+ }): {
1412
+ threads: AgentThread[];
1413
+ loading: boolean;
1414
+ error: any;
1415
+ hasMore: boolean;
1416
+ loadingMore: boolean;
1417
+ loadMore: () => Promise<void>;
1418
+ refetch: () => Promise<void>;
1419
+ };
1420
+
1421
+ export declare function useProjectThreads(projectId?: string, options?: {
1422
+ includeArchived?: boolean;
1423
+ enabled?: boolean;
1424
+ }): {
1425
+ threads: AgentThread[];
1426
+ loading: boolean;
1427
+ error: any;
1428
+ hasMore: boolean;
1429
+ nextCursor: string;
1430
+ createThread: (request: CreateAgentThreadRequest) => Promise<ApiResult<AgentThread>>;
1431
+ createThreadForProject: (targetProjectId: string, request: CreateAgentThreadRequest) => Promise<ApiResult<AgentThread>>;
1432
+ updateThread: (threadId: string, request: UpdateAgentThreadRequest) => Promise<ApiResult<AgentThread>>;
1433
+ archiveThread: (threadId: string) => Promise<ApiResult<AgentThread>>;
1434
+ unarchiveThread: (threadId: string) => Promise<ApiResult<AgentThread>>;
1435
+ refetch: () => Promise<void>;
1436
+ };
1437
+
1234
1438
  export declare const UserButton: default_2.FC<UserButtonProps>;
1235
1439
 
1236
1440
  declare interface UserButtonProps {
1237
1441
  showName?: boolean;
1442
+ onCreateOrg?: () => void;
1443
+ /** Show the org/workspace chip row and side panel. Defaults to true. */
1444
+ showOrgSwitcher?: boolean;
1445
+ /** Viewport width threshold (px) below which the side panel replaces the main dropdown. Defaults to 640. */
1446
+ narrowBreakpoint?: number;
1238
1447
  }
1239
1448
 
1240
1449
  export declare const UserControls: default_2.FC<UserControlsProps>;
@@ -1249,8 +1458,6 @@ declare type UsernameSignInParams = {
1249
1458
  password: string;
1250
1459
  };
1251
1460
 
1252
- export declare function useScopeUnread(params?: NotificationListParams): UseScopeUnreadReturnType;
1253
-
1254
1461
  declare type UseScopeUnreadReturnType = {
1255
1462
  loading: true;
1256
1463
  count: number;
@@ -1305,32 +1512,6 @@ declare type UseSignInReturnType = {
1305
1512
  setSignInAttempt: (attempt: SigninAttempt | null) => void;
1306
1513
  };
1307
1514
 
1308
- export declare function useSignInWithStrategy<T extends SignInStrategy>(strategy: T): UseSignInWithStrategyReturnType<T>;
1309
-
1310
- export declare type UseSignInWithStrategyReturnType<T extends SignInStrategy> = {
1311
- loading: true;
1312
- signIn: never;
1313
- signinAttempt: null;
1314
- discardSignInAttempt: () => void;
1315
- setSignInAttempt: (attempt: SigninAttempt | null) => void;
1316
- } | {
1317
- loading: false;
1318
- signIn: {
1319
- create: SignInFunction<T>;
1320
- completeVerification: (verificationCode: string) => Promise<Session>;
1321
- prepareVerification: (params: VerificationParams) => Promise<ApiResult<PrepareVerificationResponse>>;
1322
- completeProfile: (data: ProfileCompletionData) => Promise<Session>;
1323
- identify: (identifier: string) => Promise<IdentifyResult>;
1324
- initEnterpriseSso: (connectionId: string, redirectUri?: string) => Promise<{
1325
- sso_url: string;
1326
- session: Session;
1327
- }>;
1328
- };
1329
- signinAttempt: SigninAttempt | null;
1330
- discardSignInAttempt: () => void;
1331
- setSignInAttempt: (attempt: SigninAttempt | null) => void;
1332
- };
1333
-
1334
1515
  export declare function useSignUp(): UseSignUpReturnType;
1335
1516
 
1336
1517
  export declare type UseSignUpReturnType = {
@@ -1427,7 +1608,7 @@ export declare function useUserSignins(): {
1427
1608
 
1428
1609
  export declare function useWaitlist(): {
1429
1610
  loading: boolean;
1430
- joinWaitlist: (params: WaitlistParams) => Promise<ApiResult<WaitlistResponse, ErrorInterface>>;
1611
+ joinWaitlist: (params: WaitlistParams) => Promise<ApiResult<WaitlistResponse>>;
1431
1612
  };
1432
1613
 
1433
1614
  export declare function useWebhookAnalytics(options?: UseWebhookAnalyticsOptions): UseWebhookAnalyticsReturn;
@@ -1450,17 +1631,17 @@ declare interface UseWebhookAppSessionResult {
1450
1631
  ticketExchanged: boolean;
1451
1632
  ticketLoading: boolean;
1452
1633
  refetch: () => Promise<void>;
1453
- createEndpoint: (options: CreateEndpointOptions) => Promise<EndpointWithSubscriptions>;
1454
- updateEndpoint: (endpointId: string, options: UpdateEndpointOptions) => Promise<EndpointWithSubscriptions>;
1455
- deleteEndpoint: (endpointId: string) => Promise<DeleteEndpointResponse>;
1456
- testEndpoint: (endpointId: string, options: TestEndpointOptions) => Promise<TestEndpointResponse>;
1457
- rotateSecret: () => Promise<WebhookAppInfo>;
1458
- updateSettings: (options: UpdateWebhookSettingsOptions) => Promise<WebhookSettingsResponse>;
1459
- replayDelivery: (options: ReplayWebhookDeliveryOptions) => Promise<ReplayWebhookDeliveryResponse>;
1460
- fetchReplayTaskStatus: (options: ReplayTaskStatusOptions) => Promise<ReplayTaskStatusResponse>;
1461
- fetchReplayTasks: (options?: ReplayTaskListOptions) => Promise<ReplayTaskListResponse>;
1462
- cancelReplayTask: (options: CancelReplayTaskOptions) => Promise<CancelReplayTaskResponse>;
1463
- fetchDeliveryDetail: (deliveryId: string) => Promise<WebhookDeliveryDetail[]>;
1634
+ createEndpoint: (options: CreateEndpointOptions) => Promise<ApiResult<EndpointWithSubscriptions>>;
1635
+ updateEndpoint: (endpointId: string, options: UpdateEndpointOptions) => Promise<ApiResult<EndpointWithSubscriptions>>;
1636
+ deleteEndpoint: (endpointId: string) => Promise<ApiResult<DeleteEndpointResponse>>;
1637
+ testEndpoint: (endpointId: string, options: TestEndpointOptions) => Promise<ApiResult<TestEndpointResponse>>;
1638
+ rotateSecret: () => Promise<ApiResult<WebhookAppInfo>>;
1639
+ updateSettings: (options: UpdateWebhookSettingsOptions) => Promise<ApiResult<WebhookSettingsResponse>>;
1640
+ replayDelivery: (options: ReplayWebhookDeliveryOptions) => Promise<ApiResult<ReplayWebhookDeliveryResponse>>;
1641
+ fetchReplayTaskStatus: (options: ReplayTaskStatusOptions) => Promise<ApiResult<ReplayTaskStatusResponse>>;
1642
+ fetchReplayTasks: (options?: ReplayTaskListOptions) => Promise<ApiResult<ReplayTaskListResponse>>;
1643
+ cancelReplayTask: (options: CancelReplayTaskOptions) => Promise<ApiResult<CancelReplayTaskResponse>>;
1644
+ fetchDeliveryDetail: (deliveryId: string) => Promise<ApiResult<WebhookDeliveryDetail[]>>;
1464
1645
  }
1465
1646
 
1466
1647
  export declare function useWebhookDeliveries(options?: UseWebhookDeliveriesOptions): {
@@ -1506,7 +1687,7 @@ export declare const useWorkspaceList: () => {
1506
1687
  loading: boolean;
1507
1688
  error: any;
1508
1689
  refetch: () => Promise<void>;
1509
- leaveWorkspace: (id: string, userId: string) => Promise<void>;
1690
+ leaveWorkspace: (id: string) => Promise<void>;
1510
1691
  createWorkspace: (organizationId: string, name: string, image?: File, description?: string) => Promise<{
1511
1692
  workspace: Workspace;
1512
1693
  membership: WorkspaceMembership;
@@ -1548,7 +1729,7 @@ declare type VerificationParams = EmailOTPVerificationParams | PhoneOTPVerificat
1548
1729
 
1549
1730
  export declare interface WaitlistEntry {
1550
1731
  id: string;
1551
- deployment_id: number;
1732
+ deployment_id: string;
1552
1733
  email_address: string;
1553
1734
  first_name: string;
1554
1735
  last_name: string;