@wacht/jsx 1.0.0-beta.3 → 1.0.0-beta.30

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,8 @@
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';
5
6
  import { ApiAuditAnalyticsResponse } from '@wacht/types';
6
7
  import { ApiAuditLogsResponse } from '@wacht/types';
7
8
  import { ApiAuditTimeseriesResponse } from '@wacht/types';
@@ -9,16 +10,19 @@ import { ApiAuthAppInfo } from '@wacht/types';
9
10
  import { ApiKey } from '@wacht/types';
10
11
  import { ApiKeyWithSecret } from '@wacht/types';
11
12
  import { ApiResult } from '@wacht/types';
13
+ import { AppendProjectTaskBoardItemJournalRequest } from '@wacht/types';
12
14
  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';
@@ -28,7 +32,7 @@ import { DeploymentUISettings } from '@wacht/types';
28
32
  import { DetailedHTMLProps } from 'react';
29
33
  import { EndpointWithSubscriptions } from '@wacht/types';
30
34
  import { EnterpriseConnection } from '@wacht/types';
31
- import { ErrorInterface } from '@wacht/types';
35
+ import { ExternalAgentConnection } from '@wacht/types';
32
36
  import { FastOmit } from 'styled-components';
33
37
  import { FC } from 'react';
34
38
  import { FileData } from '@wacht/types';
@@ -40,8 +44,6 @@ import { IStyledComponentBase } from 'styled-components/dist/types';
40
44
  import { JSX } from 'react/jsx-runtime';
41
45
  import { KeyedMutator } from 'swr';
42
46
  import { LabelHTMLAttributes } from 'react';
43
- import { ListContextsOptions } from '@wacht/types';
44
- import { McpConnectResponse } from '@wacht/types';
45
47
  import { NewDomain } from '@wacht/types';
46
48
  import { NewOrgnization } from '@wacht/types';
47
49
  import { Notification as Notification_2 } from '@wacht/types';
@@ -56,6 +58,11 @@ import { OrganizationRole } from '@wacht/types';
56
58
  import { OrganizationUpdate } from '@wacht/types';
57
59
  import { ProfileCompletionData } from '@wacht/types';
58
60
  import { ProfileCompletionProps } from '@wacht/types';
61
+ import { ProjectTaskBoardItem } from '@wacht/types';
62
+ import { ProjectTaskBoardItemAssignment } from '@wacht/types';
63
+ import { ProjectTaskBoardItemEvent } from '@wacht/types';
64
+ import { ProjectTaskWorkspaceFileContent } from '@wacht/types';
65
+ import { ProjectTaskWorkspaceListing } from '@wacht/types';
59
66
  import { ReactNode } from 'react';
60
67
  import { RefAttributes } from 'react';
61
68
  import { ReplayTaskListOptions } from '@wacht/types';
@@ -76,12 +83,18 @@ import { SigninAttempt } from '@wacht/types';
76
83
  import { SignupAttempt } from '@wacht/types';
77
84
  import { SignUpParams } from '@wacht/types';
78
85
  import { SocialConnection } from '@wacht/types';
79
- import { Substitute } from 'styled-components/dist/types';
80
86
  import { TestEndpointOptions } from '@wacht/types';
81
87
  import { TestEndpointResponse } from '@wacht/types';
88
+ import { ThreadEvent } from '@wacht/types';
89
+ import { ThreadPendingApprovalRequestState } from '@wacht/types';
90
+ import { ThreadTaskGraphBundle } from '@wacht/types';
82
91
  import { TimeseriesPoint } from '@wacht/types';
92
+ import { ToolApprovalDecision } from '@wacht/types';
93
+ import { UpdateActorProjectRequest } from '@wacht/types';
94
+ import { UpdateAgentThreadRequest } from '@wacht/types';
83
95
  import { UpdateEndpointOptions } from '@wacht/types';
84
96
  import { UpdateEnterpriseConnectionPayload } from '@wacht/types';
97
+ import { UpdateProjectTaskBoardItemRequest } from '@wacht/types';
85
98
  import { UpdateWebhookSettingsOptions } from '@wacht/types';
86
99
  import { UseApiAuthAuditAnalyticsOptions } from '@wacht/types';
87
100
  import { UseApiAuthAuditLogsOptions } from '@wacht/types';
@@ -89,7 +102,6 @@ import { UseApiAuthAuditTimeseriesOptions } from '@wacht/types';
89
102
  import { UseApiAuthKeysFilters } from '@wacht/types';
90
103
  import { UserAuthenticator } from '@wacht/types';
91
104
  import { UserEmailAddress } from '@wacht/types';
92
- import { UserInputRequestContent } from '@wacht/types';
93
105
  import { UserPasskey } from '@wacht/types';
94
106
  import { UserPhoneNumber } from '@wacht/types';
95
107
  import { UseWebhookAnalyticsOptions } from '@wacht/types';
@@ -134,7 +146,24 @@ declare interface AcceptInviteProps {
134
146
  onError?: (error: string) => void;
135
147
  }
136
148
 
137
- export declare function AuthFormImage(): JSX.Element | null;
149
+ declare interface ActorMcpServerConnectResponse {
150
+ auth_url: string;
151
+ }
152
+
153
+ declare type AgentSearchOptions = {
154
+ enabled?: boolean;
155
+ query?: string;
156
+ limit?: number;
157
+ };
158
+
159
+ declare type AgentThreadHookOptions = {
160
+ enabled?: boolean;
161
+ limit?: number;
162
+ };
163
+
164
+ export declare function AuthFormImage({ placement, }: {
165
+ placement?: "center" | "left" | "right";
166
+ }): JSX.Element | null;
138
167
 
139
168
  /**
140
169
  * Check if user can manage the organization (admin or manage permissions)
@@ -155,6 +184,10 @@ declare const CONNECTION_STATES: {
155
184
  readonly ERROR: "error";
156
185
  };
157
186
 
187
+ declare interface ConnectResponse {
188
+ redirect_url: string;
189
+ }
190
+
158
191
  export declare const CreateOrganizationForm: React.FC<CreateOrganizationFormProps>;
159
192
 
160
193
  declare interface CreateOrganizationFormProps {
@@ -191,6 +224,10 @@ declare interface CreateWorkspaceFormProps {
191
224
  onCreateOrganization?: () => void;
192
225
  }
193
226
 
227
+ export declare function DefaultStylesProvider({ children, style, ...props }: DefaultStylesProviderProps): JSX.Element;
228
+
229
+ declare type DefaultStylesProviderProps = ComponentPropsWithoutRef<"div">;
230
+
194
231
  export declare interface DeploymentContextType {
195
232
  loading: boolean;
196
233
  deployment: Deployment | null;
@@ -214,13 +251,13 @@ export declare interface DeploymentInvitationData {
214
251
  error_code?: string;
215
252
  }
216
253
 
217
- export declare function DeploymentProvider({ children, publicKey, adapter, uiOverwrites, }: DeploymentProviderProps): JSX.Element;
254
+ export declare function DeploymentProvider({ children, publicKey, adapter, uiOverrides, }: DeploymentProviderProps): JSX.Element;
218
255
 
219
256
  declare interface DeploymentProviderProps {
220
257
  children: ReactNode;
221
258
  publicKey: string;
222
259
  adapter: PlatformAdapter;
223
- uiOverwrites?: Partial<DeploymentUISettings>;
260
+ uiOverrides?: Partial<DeploymentUISettings>;
224
261
  }
225
262
 
226
263
  export declare const Dialog: FC<DialogProps> & {
@@ -274,11 +311,13 @@ declare interface DialogTriggerProps {
274
311
 
275
312
  export declare const Dropdown: ({ children, open, openChange, style, }: DropdownProps) => JSX.Element;
276
313
 
277
- export declare const DropdownDivider: IStyledComponentBase<"web", FastOmit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
314
+ export declare const DropdownDivider: IStyledComponentBase<"web", FastOmit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
278
315
 
279
- export declare const DropdownItem: IStyledComponentBase<"web", Substitute<DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
316
+ export declare const DropdownItem: IStyledComponentBase<"web", FastOmit<FastOmit<DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "$destructive"> & {
317
+ $destructive?: boolean;
318
+ }, never> & Partial<Pick<FastOmit<DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "$destructive"> & {
280
319
  $destructive?: boolean;
281
- }>> & string;
320
+ }, never>>> & string;
282
321
 
283
322
  export declare const DropdownItems: ({ children, style, }: {
284
323
  children: ReactNode;
@@ -310,9 +349,9 @@ declare type EmailSignInParams = {
310
349
  password: string;
311
350
  };
312
351
 
313
- export declare const Form: IStyledComponentBase<"web", FastOmit<DetailedHTMLProps<FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, never>> & string;
352
+ export declare const Form: IStyledComponentBase<"web", FastOmit<DetailedHTMLProps<FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, never> & Partial<Pick<DetailedHTMLProps<FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, never>>> & string;
314
353
 
315
- export declare const FormGroup: IStyledComponentBase<"web", FastOmit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
354
+ export declare const FormGroup: IStyledComponentBase<"web", FastOmit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
316
355
 
317
356
  /**
318
357
  * Unified execution status mapping between frontend and backend
@@ -326,7 +365,7 @@ declare const FRONTEND_STATUS: {
326
365
  readonly FAILED: "failed";
327
366
  };
328
367
 
329
- declare type FrontendStatus = typeof FRONTEND_STATUS[keyof typeof FRONTEND_STATUS];
368
+ declare type FrontendStatus = (typeof FRONTEND_STATUS)[keyof typeof FRONTEND_STATUS];
330
369
 
331
370
  declare type GenericSignInParams = {
332
371
  email?: string;
@@ -348,7 +387,7 @@ export declare function hasOrgPermission(membership: WithOrgRoles, requiredPermi
348
387
  */
349
388
  export declare function hasWorkspacePermission(membership: WithWsRoles, requiredPermissions: string[]): boolean;
350
389
 
351
- export declare interface IdentifyResult {
390
+ declare interface IdentifyResult {
352
391
  strategy: "sso" | "social" | "password";
353
392
  connection_id?: string;
354
393
  idp_url?: string;
@@ -360,7 +399,7 @@ declare type InitSSOResponseType = {
360
399
  session: Session;
361
400
  };
362
401
 
363
- export declare const Input: IStyledComponentBase<"web", FastOmit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>> & string;
402
+ export declare const Input: IStyledComponentBase<"web", FastOmit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never> & Partial<Pick<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>>> & string;
364
403
 
365
404
  export declare const isExternalUrl: (url: string) => boolean;
366
405
 
@@ -376,9 +415,9 @@ export declare const isSafeUrl: (url: string) => boolean;
376
415
  */
377
416
  export declare function isWorkspaceAdmin(membership: WithWsRoles): boolean;
378
417
 
379
- export declare const Label: IStyledComponentBase<"web", FastOmit<DetailedHTMLProps<LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never>> & string;
418
+ export declare const Label: IStyledComponentBase<"web", FastOmit<DetailedHTMLProps<LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never> & Partial<Pick<DetailedHTMLProps<LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never>>> & string;
380
419
 
381
- export declare interface MagicLinkParams {
420
+ declare interface MagicLinkParams {
382
421
  token?: string;
383
422
  attempt?: string;
384
423
  redirectUri?: string;
@@ -538,7 +577,7 @@ export declare const ORG_ADMIN_PERMISSIONS: string[];
538
577
 
539
578
  export declare const ORG_MANAGEMENT_PERMISSIONS: string[];
540
579
 
541
- export declare const OrganizationSwitcher: ({ showPersonal, }: OrganizationSwitcherProps) => JSX.Element | null;
580
+ export declare const OrganizationSwitcher: ({ showPersonal }: OrganizationSwitcherProps) => JSX.Element | null;
542
581
 
543
582
  declare interface OrganizationSwitcherProps {
544
583
  showPersonal?: boolean;
@@ -626,6 +665,17 @@ declare interface ProfileUpdateData {
626
665
  remove_profile_picture?: boolean;
627
666
  }
628
667
 
668
+ declare type ProjectTaskDetailOptions = {
669
+ includeArchived?: boolean;
670
+ };
671
+
672
+ declare type ProjectTaskListOptions = {
673
+ statuses?: string[];
674
+ includeArchived?: boolean;
675
+ archivedOnly?: boolean;
676
+ limit?: number;
677
+ };
678
+
629
679
  export declare function redirectToProfileCompletion(returnUrl?: string): void;
630
680
 
631
681
  export declare const RequireActiveTenancy: ({ children, }: RequireActiveTenancyProps) => JSX.Element | null;
@@ -638,7 +688,7 @@ declare type SecondFactorPolicy_2 = "none" | "optional" | "enforced";
638
688
 
639
689
  export declare const SignedIn: ({ children }: SignedInProps) => JSX.Element | null;
640
690
 
641
- export declare const SignedInAccounts: React.FC<SignedInAccountsProps>;
691
+ export declare const SignedInAccounts: default_2.FC<SignedInAccountsProps>;
642
692
 
643
693
  declare interface SignedInAccountsProps {
644
694
  onAccountSelect?: (signInId: string) => void;
@@ -671,17 +721,6 @@ declare type SignInEmailOTP = ({ email, }: EmailOTPSignInParams) => Promise<ApiR
671
721
 
672
722
  export declare function SignInForm(): JSX.Element;
673
723
 
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
724
  declare type SignInGeneric = ({ email, username, password, phone, strategy, }: GenericSignInParams) => Promise<ApiResult<Session>>;
686
725
 
687
726
  declare type SignInMagicLink = ({ email, }: MagicLinkSignInParams) => Promise<ApiResult<Session>>;
@@ -699,8 +738,6 @@ declare type SignInPlainEmail = ({ email, password, }: EmailSignInParams) => Pro
699
738
 
700
739
  declare type SignInPlainUsername = ({ username, password, }: UsernameSignInParams) => Promise<ApiResult<Session>>;
701
740
 
702
- declare type SignInStrategy = "username" | "email" | "phone" | "email_otp" | "magic_link" | "oauth" | "passkey" | "generic";
703
-
704
741
  declare type SignupEmailOTPVerificationParams = {
705
742
  strategy: "email_otp";
706
743
  redirectUri?: string;
@@ -709,7 +746,7 @@ declare type SignupEmailOTPVerificationParams = {
709
746
  export declare function SignUpForm(): JSX.Element;
710
747
 
711
748
  export declare type SignUpFunction = {
712
- create: (params: SignUpParams) => Promise<ApiResult<unknown, ErrorInterface>>;
749
+ create: (params: SignUpParams) => Promise<ApiResult<unknown>>;
713
750
  prepareVerification: (params: SignupVerificationParams) => Promise<ApiResult<PrepareVerificationResponse_2>>;
714
751
  completeVerification: (verificationCode: string) => Promise<ApiResult<Session>>;
715
752
  validateDeploymentInvitation: (token: string) => Promise<DeploymentInvitationData>;
@@ -875,8 +912,8 @@ export declare const useActiveOrganization: () => {
875
912
 
876
913
  export declare function useActiveTenancy(): {
877
914
  loading: boolean;
878
- orgMembership: OrganizationMembershipWithOrganization | null | undefined;
879
- workspaceMembership: WorkspaceMembership | null | undefined;
915
+ orgMembership: OrganizationMembershipWithOrganization | null;
916
+ workspaceMembership: WorkspaceMembership | null;
880
917
  };
881
918
 
882
919
  export declare const useActiveWorkspace: () => {
@@ -915,22 +952,108 @@ export declare const useActiveWorkspace: () => {
915
952
  resendInvitation: (invitationId: string) => Promise<unknown>;
916
953
  };
917
954
 
918
- export declare function useAgentContext({ contextId, agentName, platformAdapter, }: UseAgentContextProps): {
955
+ export declare function useActorMcpServers(enabled?: boolean): {
956
+ servers: ActorMcpServerSummary[];
957
+ loading: boolean;
958
+ error: any;
959
+ connect: (mcpServerId: string) => Promise<ApiResult<ActorMcpServerConnectResponse>>;
960
+ disconnect: (mcpServerId: string) => Promise<ApiResult< {
961
+ success: boolean;
962
+ }>>;
963
+ refetch: () => Promise<void>;
964
+ };
965
+
966
+ export declare function useActorProjects(options?: {
967
+ includeArchived?: boolean;
968
+ enabled?: boolean;
969
+ }): {
970
+ projects: ActorProject[];
971
+ loading: boolean;
972
+ error: any;
973
+ createProject: (request: CreateActorProjectRequest) => Promise<ApiResult<ActorProject>>;
974
+ updateProject: (projectId: string, request: UpdateActorProjectRequest) => Promise<ApiResult<ActorProject>>;
975
+ archiveProject: (projectId: string) => Promise<ApiResult<ActorProject>>;
976
+ unarchiveProject: (projectId: string) => Promise<ApiResult<ActorProject>>;
977
+ refetch: () => Promise<void>;
978
+ };
979
+
980
+ export declare function useActorProjectSearch(options?: AgentSearchOptions): {
981
+ projects: ActorProject[];
982
+ loading: boolean;
983
+ error: any;
984
+ hasMore: boolean;
985
+ nextCursor: string | undefined;
986
+ refetch: () => Promise<void>;
987
+ };
988
+
989
+ export declare function useActorThreadSearch(options?: AgentSearchOptions): {
990
+ threads: AgentThread[];
991
+ loading: boolean;
992
+ error: any;
993
+ hasMore: boolean;
994
+ nextCursor: string | undefined;
995
+ refetch: () => Promise<void>;
996
+ };
997
+
998
+ export declare function useAgentSession(ticket?: string | null): UseAgentSessionResult;
999
+
1000
+ declare interface UseAgentSessionResult {
1001
+ hasSession: boolean;
1002
+ sessionLoading: boolean;
1003
+ sessionError: Error | null;
1004
+ sessionId: string | null;
1005
+ actor: Actor | null;
1006
+ agents: Agent[];
1007
+ ticketExchanged: boolean;
1008
+ ticketLoading: boolean;
1009
+ refetch: () => Promise<void>;
1010
+ }
1011
+
1012
+ export declare function useAgentThread(threadId?: string, enabled?: boolean): {
1013
+ thread: AgentThread | null;
1014
+ loading: boolean;
1015
+ error: any;
1016
+ updateThread: (request: UpdateAgentThreadRequest) => Promise<ApiResult<AgentThread>>;
1017
+ archiveThread: () => Promise<ApiResult<AgentThread>>;
1018
+ unarchiveThread: () => Promise<ApiResult<AgentThread>>;
1019
+ refetch: () => Promise<void>;
1020
+ };
1021
+
1022
+ export declare function useAgentThreadAssignments(threadId?: string, options?: AgentThreadHookOptions): {
1023
+ assignments: ProjectTaskBoardItemAssignment[];
1024
+ loading: boolean;
1025
+ error: any;
1026
+ hasMore: boolean;
1027
+ loadingMore: boolean;
1028
+ loadMore: () => Promise<void>;
1029
+ refetch: () => Promise<void>;
1030
+ };
1031
+
1032
+ export declare function useAgentThreadConversation({ threadId, initialThread, platformAdapter, }: UseAgentThreadConversationProps): {
1033
+ thread: AgentThread | null;
1034
+ threadState: AgentThread | null;
1035
+ threadStatus: string | undefined;
919
1036
  messages: ConversationMessage[];
920
- quickQuestions: string[];
921
1037
  pendingMessage: string | null;
922
1038
  pendingFiles: File[] | null;
923
1039
  connectionState: {
924
1040
  status: (typeof CONNECTION_STATES)[keyof typeof CONNECTION_STATES];
925
1041
  };
926
1042
  isConnected: boolean;
927
- isExecuting: boolean;
1043
+ hasActiveRun: boolean;
1044
+ isRunning: boolean;
928
1045
  executionStatus: FrontendStatus;
929
1046
  isWaitingForInput: boolean;
1047
+ pendingApprovalRequest: ThreadPendingApprovalRequestState | null;
1048
+ activeApprovalRequestId: string | null;
930
1049
  hasMoreMessages: boolean;
931
1050
  isLoadingMore: boolean;
1051
+ messagesLoading: boolean;
1052
+ messagesError: Error | null;
1053
+ refreshThread: () => Promise<void>;
1054
+ refreshMessages: () => Promise<void>;
932
1055
  sendMessage: (message: string, files?: File[]) => Promise<void>;
933
- submitUserInput: (input: string) => Promise<void>;
1056
+ submitApprovalResponse: (requestMessageId: string, approvals: ToolApprovalDecision[]) => Promise<boolean>;
934
1057
  clearMessages: () => void;
935
1058
  loadMoreMessages: () => Promise<void>;
936
1059
  cancelExecution: () => Promise<void>;
@@ -938,73 +1061,46 @@ export declare function useAgentContext({ contextId, agentName, platformAdapter,
938
1061
  downloadMessageFile: (file: FileData | null | undefined) => void;
939
1062
  };
940
1063
 
941
- declare interface UseAgentContextProps {
942
- contextId: string;
943
- agentName: string;
1064
+ declare interface UseAgentThreadConversationProps {
1065
+ threadId: string;
1066
+ initialThread?: AgentThread | null;
944
1067
  platformAdapter?: {
945
1068
  onPlatformEvent?: (eventName: string, eventData: unknown) => void;
946
- onPlatformFunction?: (functionName: string, parameters: unknown, executionId: string) => Promise<unknown>;
947
1069
  };
948
- onUserInputRequest?: (request: UserInputRequestContent) => Promise<string>;
949
1070
  }
950
1071
 
951
- export declare function useAgentContexts(options?: UseAgentContextsOptions): UseAgentContextsReturnType;
952
-
953
- declare interface UseAgentContextsOptions extends ListContextsOptions {
954
- enabled?: boolean;
955
- }
956
-
957
- declare type UseAgentContextsReturnType = {
958
- contexts: AgentContext[];
1072
+ export declare function useAgentThreadEvents(threadId?: string, options?: AgentThreadHookOptions): {
1073
+ events: ThreadEvent[];
959
1074
  loading: boolean;
960
- error: Error | null;
1075
+ error: any;
961
1076
  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>;
1077
+ loadingMore: boolean;
1078
+ loadMore: () => Promise<void>;
967
1079
  refetch: () => Promise<void>;
968
1080
  };
969
1081
 
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>;
1082
+ export declare function useAgentThreadFilesystem(threadId?: string, enabled?: boolean): {
1083
+ filesystem: ProjectTaskWorkspaceListing;
1084
+ filesystemLoading: boolean;
1085
+ filesystemError: any;
1086
+ getFile: (path: string) => Promise<ProjectTaskWorkspaceFileContent & {
1087
+ blob: Blob;
1088
+ }>;
1089
+ listDirectory: (path?: string) => Promise<ProjectTaskWorkspaceListing>;
978
1090
  refetch: () => Promise<void>;
979
1091
  };
980
1092
 
981
- export declare function useAgentMcpServers(agentName: string | null): UseAgentMcpServersReturnType;
982
-
983
- declare type UseAgentMcpServersReturnType = {
984
- mcpServers: AgentMcpServer[];
1093
+ export declare function useAgentThreadTaskGraphs(threadId?: string, enabled?: boolean): {
1094
+ graphs: ThreadTaskGraphBundle[];
1095
+ latestGraph: ThreadTaskGraphBundle;
1096
+ has_more: boolean;
1097
+ loadingMore: boolean;
985
1098
  loading: boolean;
986
- error: Error | null;
987
- connect: (mcpServerId: string) => Promise<McpConnectResponse>;
988
- disconnect: (mcpServerId: string) => Promise<void>;
1099
+ error: any;
1100
+ loadMore: () => Promise<void>;
989
1101
  refetch: () => Promise<void>;
990
1102
  };
991
1103
 
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
1104
  export declare function useApiAuthAppSession(ticket?: string | null): UseApiAuthAppSessionResult;
1009
1105
 
1010
1106
  declare interface UseApiAuthAppSessionResult {
@@ -1053,9 +1149,9 @@ export declare function useApiAuthKeys(filters?: UseApiAuthKeysFilters): UseApiA
1053
1149
 
1054
1150
  declare interface UseApiAuthKeysReturn {
1055
1151
  keys: ApiKey[];
1056
- createKey: (input: CreateApiAuthKeyInput) => Promise<ApiKeyWithSecret>;
1057
- rotateKey: (input: RotateApiAuthKeyInput) => Promise<ApiKeyWithSecret>;
1058
- revokeKey: (input: RevokeApiAuthKeyInput) => Promise<void>;
1152
+ createKey: (input: CreateApiAuthKeyInput) => Promise<ApiResult<ApiKeyWithSecret>>;
1153
+ rotateKey: (input: RotateApiAuthKeyInput) => Promise<ApiResult<ApiKeyWithSecret>>;
1154
+ revokeKey: (input: RevokeApiAuthKeyInput) => Promise<ApiResult<void>>;
1059
1155
  loading: boolean;
1060
1156
  error: unknown;
1061
1157
  refetch: () => void;
@@ -1071,20 +1167,33 @@ declare type UseClientReturnType = {
1071
1167
  export declare function useCreateWebhookEndpoint(): UseCreateWebhookEndpointReturn;
1072
1168
 
1073
1169
  declare interface UseCreateWebhookEndpointReturn {
1074
- createEndpoint: (options: CreateEndpointOptions) => Promise<EndpointWithSubscriptions>;
1170
+ createEndpoint: (options: CreateEndpointOptions) => Promise<ApiResult<EndpointWithSubscriptions>>;
1075
1171
  loading: boolean;
1076
1172
  error: unknown;
1077
1173
  }
1078
1174
 
1079
1175
  export declare function useDeployment(): DeploymentContextType;
1080
1176
 
1177
+ export declare function useExternalAgentConnections(enabled?: boolean): {
1178
+ connections: ExternalAgentConnection[];
1179
+ loading: boolean;
1180
+ error: any;
1181
+ connect: (provider: string, slug: string, options?: {
1182
+ returnUrl?: string;
1183
+ }) => Promise<ConnectResponse>;
1184
+ disconnect: (provider: string, slug: string) => Promise<{
1185
+ success: boolean;
1186
+ }>;
1187
+ refetch: () => Promise<void>;
1188
+ };
1189
+
1081
1190
  export declare function useForgotPassword(): {
1082
1191
  loading: boolean;
1083
- forgotPassword: (email: string) => Promise<ApiResult<{}, ErrorInterface>>;
1192
+ forgotPassword: (email: string) => Promise<ApiResult<{}>>;
1084
1193
  verifyOtp: (email: string, otp: string) => Promise<ApiResult<{
1085
1194
  token: string;
1086
- }, ErrorInterface>>;
1087
- resetPassword: (token: string, password: string) => Promise<ApiResult<Session, ErrorInterface>>;
1195
+ }>>;
1196
+ resetPassword: (token: string, password: string) => Promise<ApiResult<Session>>;
1088
1197
  };
1089
1198
 
1090
1199
  export declare const useInvitation: () => {
@@ -1095,13 +1204,11 @@ export declare const useInvitation: () => {
1095
1204
  reset: () => void;
1096
1205
  };
1097
1206
 
1098
- export declare function useMagicLinkParams(): MagicLinkParams;
1099
-
1100
1207
  export declare function useMagicLinkVerification(): UseMagicLinkVerificationReturnType;
1101
1208
 
1102
- export declare interface UseMagicLinkVerificationReturnType {
1209
+ declare interface UseMagicLinkVerificationReturnType {
1103
1210
  loading: boolean;
1104
- verifyMagicLink: (params: MagicLinkParams) => Promise<ApiResult<{}, ErrorInterface>>;
1211
+ verifyMagicLink: (params: MagicLinkParams) => Promise<ApiResult<{}>>;
1105
1212
  success: boolean | null;
1106
1213
  }
1107
1214
 
@@ -1164,6 +1271,8 @@ export declare interface UseNotificationStreamOptions {
1164
1271
  maxReconnectAttempts?: number;
1165
1272
  }
1166
1273
 
1274
+ export declare function useNotificationUnreadCount(params?: NotificationListParams): UseScopeUnreadReturnType;
1275
+
1167
1276
  export declare const useOrganizationList: () => {
1168
1277
  organizations: Organization[] | undefined;
1169
1278
  loading: boolean;
@@ -1231,10 +1340,88 @@ export declare const useOrganizationMemberships: () => {
1231
1340
  refetch: () => Promise<void>;
1232
1341
  };
1233
1342
 
1343
+ export declare function useProjectTaskBoardItem(projectId?: string, itemId?: string, enabled?: boolean, options?: ProjectTaskDetailOptions): {
1344
+ item: ProjectTaskBoardItem | null;
1345
+ events: ProjectTaskBoardItemEvent[];
1346
+ assignments: ProjectTaskBoardItemAssignment[];
1347
+ eventsHasMore: boolean;
1348
+ eventsLoadingMore: boolean;
1349
+ loadMoreEvents: () => Promise<void>;
1350
+ assignmentsHasMore: boolean;
1351
+ assignmentsLoadingMore: boolean;
1352
+ loadMoreAssignments: () => Promise<void>;
1353
+ taskWorkspace: ProjectTaskWorkspaceListing;
1354
+ taskWorkspaceLoading: boolean;
1355
+ taskWorkspaceError: any;
1356
+ loading: boolean;
1357
+ error: any;
1358
+ updateItem: (request: UpdateProjectTaskBoardItemRequest, files?: File[]) => Promise<ApiResult<ProjectTaskBoardItem>>;
1359
+ archiveItem: () => Promise<ApiResult<ProjectTaskBoardItem>>;
1360
+ unarchiveItem: () => Promise<ApiResult<ProjectTaskBoardItem>>;
1361
+ getTaskWorkspaceFile: (path: string) => Promise<ApiResult<ProjectTaskWorkspaceFileContent>>;
1362
+ listTaskWorkspaceDirectory: (path?: string) => Promise<ApiResult<ProjectTaskWorkspaceListing>>;
1363
+ appendJournal: (request: AppendProjectTaskBoardItemJournalRequest, files?: File[]) => Promise<ApiResult<ProjectTaskBoardItemEvent>>;
1364
+ refetch: () => Promise<void>;
1365
+ refetchEvents: () => Promise<void>;
1366
+ refetchAssignments: () => Promise<void>;
1367
+ refetchTaskWorkspace: () => Promise<void>;
1368
+ };
1369
+
1370
+ export declare function useProjectTasks(projectId?: string, enabled?: boolean, options?: ProjectTaskListOptions): {
1371
+ tasks: ProjectTaskBoardItem[];
1372
+ loading: boolean;
1373
+ error: any;
1374
+ hasMore: boolean;
1375
+ loadingMore: boolean;
1376
+ loadMore: () => Promise<void>;
1377
+ createTask: (request: CreateProjectTaskBoardItemRequest, files?: File[]) => Promise<ApiResult<ProjectTaskBoardItem>>;
1378
+ archiveTask: (itemId: string) => Promise<ApiResult<ProjectTaskBoardItem>>;
1379
+ unarchiveTask: (itemId: string) => Promise<ApiResult<ProjectTaskBoardItem>>;
1380
+ refetch: () => Promise<void>;
1381
+ };
1382
+
1383
+ export declare function useProjectThreadFeed(projectId?: string, options?: {
1384
+ includeArchived?: boolean;
1385
+ archivedOnly?: boolean;
1386
+ enabled?: boolean;
1387
+ query?: string;
1388
+ limit?: number;
1389
+ }): {
1390
+ threads: AgentThread[];
1391
+ loading: boolean;
1392
+ error: any;
1393
+ hasMore: boolean;
1394
+ loadingMore: boolean;
1395
+ loadMore: () => Promise<void>;
1396
+ refetch: () => Promise<void>;
1397
+ };
1398
+
1399
+ export declare function useProjectThreads(projectId?: string, options?: {
1400
+ includeArchived?: boolean;
1401
+ enabled?: boolean;
1402
+ }): {
1403
+ threads: AgentThread[];
1404
+ loading: boolean;
1405
+ error: any;
1406
+ hasMore: boolean;
1407
+ nextCursor: string;
1408
+ createThread: (request: CreateAgentThreadRequest) => Promise<ApiResult<AgentThread>>;
1409
+ createThreadForProject: (targetProjectId: string, request: CreateAgentThreadRequest) => Promise<ApiResult<AgentThread>>;
1410
+ updateThread: (threadId: string, request: UpdateAgentThreadRequest) => Promise<ApiResult<AgentThread>>;
1411
+ archiveThread: (threadId: string) => Promise<ApiResult<AgentThread>>;
1412
+ unarchiveThread: (threadId: string) => Promise<ApiResult<AgentThread>>;
1413
+ refetch: () => Promise<void>;
1414
+ };
1415
+
1234
1416
  export declare const UserButton: default_2.FC<UserButtonProps>;
1235
1417
 
1236
1418
  declare interface UserButtonProps {
1237
1419
  showName?: boolean;
1420
+ onCreateOrg?: () => void;
1421
+ /** Show the org/workspace chip row and side panel. Defaults to true. */
1422
+ showOrgSwitcher?: boolean;
1423
+ /** Viewport width threshold (px) below which the side panel replaces the main dropdown. Defaults to 640. */
1424
+ narrowBreakpoint?: number;
1238
1425
  }
1239
1426
 
1240
1427
  export declare const UserControls: default_2.FC<UserControlsProps>;
@@ -1249,8 +1436,6 @@ declare type UsernameSignInParams = {
1249
1436
  password: string;
1250
1437
  };
1251
1438
 
1252
- export declare function useScopeUnread(params?: NotificationListParams): UseScopeUnreadReturnType;
1253
-
1254
1439
  declare type UseScopeUnreadReturnType = {
1255
1440
  loading: true;
1256
1441
  count: number;
@@ -1305,32 +1490,6 @@ declare type UseSignInReturnType = {
1305
1490
  setSignInAttempt: (attempt: SigninAttempt | null) => void;
1306
1491
  };
1307
1492
 
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
1493
  export declare function useSignUp(): UseSignUpReturnType;
1335
1494
 
1336
1495
  export declare type UseSignUpReturnType = {
@@ -1427,7 +1586,7 @@ export declare function useUserSignins(): {
1427
1586
 
1428
1587
  export declare function useWaitlist(): {
1429
1588
  loading: boolean;
1430
- joinWaitlist: (params: WaitlistParams) => Promise<ApiResult<WaitlistResponse, ErrorInterface>>;
1589
+ joinWaitlist: (params: WaitlistParams) => Promise<ApiResult<WaitlistResponse>>;
1431
1590
  };
1432
1591
 
1433
1592
  export declare function useWebhookAnalytics(options?: UseWebhookAnalyticsOptions): UseWebhookAnalyticsReturn;
@@ -1450,17 +1609,17 @@ declare interface UseWebhookAppSessionResult {
1450
1609
  ticketExchanged: boolean;
1451
1610
  ticketLoading: boolean;
1452
1611
  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[]>;
1612
+ createEndpoint: (options: CreateEndpointOptions) => Promise<ApiResult<EndpointWithSubscriptions>>;
1613
+ updateEndpoint: (endpointId: string, options: UpdateEndpointOptions) => Promise<ApiResult<EndpointWithSubscriptions>>;
1614
+ deleteEndpoint: (endpointId: string) => Promise<ApiResult<DeleteEndpointResponse>>;
1615
+ testEndpoint: (endpointId: string, options: TestEndpointOptions) => Promise<ApiResult<TestEndpointResponse>>;
1616
+ rotateSecret: () => Promise<ApiResult<WebhookAppInfo>>;
1617
+ updateSettings: (options: UpdateWebhookSettingsOptions) => Promise<ApiResult<WebhookSettingsResponse>>;
1618
+ replayDelivery: (options: ReplayWebhookDeliveryOptions) => Promise<ApiResult<ReplayWebhookDeliveryResponse>>;
1619
+ fetchReplayTaskStatus: (options: ReplayTaskStatusOptions) => Promise<ApiResult<ReplayTaskStatusResponse>>;
1620
+ fetchReplayTasks: (options?: ReplayTaskListOptions) => Promise<ApiResult<ReplayTaskListResponse>>;
1621
+ cancelReplayTask: (options: CancelReplayTaskOptions) => Promise<ApiResult<CancelReplayTaskResponse>>;
1622
+ fetchDeliveryDetail: (deliveryId: string) => Promise<ApiResult<WebhookDeliveryDetail[]>>;
1464
1623
  }
1465
1624
 
1466
1625
  export declare function useWebhookDeliveries(options?: UseWebhookDeliveriesOptions): {
@@ -1506,7 +1665,7 @@ export declare const useWorkspaceList: () => {
1506
1665
  loading: boolean;
1507
1666
  error: any;
1508
1667
  refetch: () => Promise<void>;
1509
- leaveWorkspace: (id: string, userId: string) => Promise<void>;
1668
+ leaveWorkspace: (id: string) => Promise<void>;
1510
1669
  createWorkspace: (organizationId: string, name: string, image?: File, description?: string) => Promise<{
1511
1670
  workspace: Workspace;
1512
1671
  membership: WorkspaceMembership;