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

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,7 @@
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 { ActorProject } from '@wacht/types';
3
+ import { Agent } from '@wacht/types';
4
+ import { AgentThread } from '@wacht/types';
5
5
  import { ApiAuditAnalyticsResponse } from '@wacht/types';
6
6
  import { ApiAuditLogsResponse } from '@wacht/types';
7
7
  import { ApiAuditTimeseriesResponse } from '@wacht/types';
@@ -9,16 +9,19 @@ import { ApiAuthAppInfo } from '@wacht/types';
9
9
  import { ApiKey } from '@wacht/types';
10
10
  import { ApiKeyWithSecret } from '@wacht/types';
11
11
  import { ApiResult } from '@wacht/types';
12
+ import { AppendProjectTaskBoardItemJournalRequest } from '@wacht/types';
12
13
  import { ButtonHTMLAttributes } from 'react';
13
14
  import { CancelReplayTaskOptions } from '@wacht/types';
14
15
  import { CancelReplayTaskResponse } from '@wacht/types';
15
16
  import { Client } from '@wacht/types';
16
- import { ConsentURLResponse } from '@wacht/types';
17
+ import { ComponentPropsWithoutRef } from 'react';
17
18
  import { ConversationMessage } from '@wacht/types';
19
+ import { CreateActorProjectRequest } from '@wacht/types';
20
+ import { CreateAgentThreadRequest } from '@wacht/types';
18
21
  import { CreateApiAuthKeyInput } from '@wacht/types';
19
- import { CreateContextRequest } from '@wacht/types';
20
22
  import { CreateEndpointOptions } from '@wacht/types';
21
23
  import { CreateEnterpriseConnectionPayload } from '@wacht/types';
24
+ import { CreateProjectTaskBoardItemRequest } from '@wacht/types';
22
25
  import { CSSProperties } from 'react';
23
26
  import { CurrentUser } from '@wacht/types';
24
27
  import { default as default_2 } from 'react';
@@ -40,8 +43,6 @@ import { IStyledComponentBase } from 'styled-components/dist/types';
40
43
  import { JSX } from 'react/jsx-runtime';
41
44
  import { KeyedMutator } from 'swr';
42
45
  import { LabelHTMLAttributes } from 'react';
43
- import { ListContextsOptions } from '@wacht/types';
44
- import { McpConnectResponse } from '@wacht/types';
45
46
  import { NewDomain } from '@wacht/types';
46
47
  import { NewOrgnization } from '@wacht/types';
47
48
  import { Notification as Notification_2 } from '@wacht/types';
@@ -56,6 +57,11 @@ import { OrganizationRole } from '@wacht/types';
56
57
  import { OrganizationUpdate } from '@wacht/types';
57
58
  import { ProfileCompletionData } from '@wacht/types';
58
59
  import { ProfileCompletionProps } from '@wacht/types';
60
+ import { ProjectTaskBoardItem } from '@wacht/types';
61
+ import { ProjectTaskBoardItemAssignment } from '@wacht/types';
62
+ import { ProjectTaskBoardItemEvent } from '@wacht/types';
63
+ import { ProjectTaskWorkspaceFileContent } from '@wacht/types';
64
+ import { ProjectTaskWorkspaceListing } from '@wacht/types';
59
65
  import { ReactNode } from 'react';
60
66
  import { RefAttributes } from 'react';
61
67
  import { ReplayTaskListOptions } from '@wacht/types';
@@ -79,9 +85,16 @@ import { SocialConnection } from '@wacht/types';
79
85
  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,35 @@ 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
+ export declare interface ActorMcpServerSummary {
154
+ id: string;
155
+ name: string;
156
+ endpoint: string;
157
+ auth_type: string;
158
+ requires_user_connection: boolean;
159
+ connection_status: "ready" | "connected" | "not_connected" | "expired";
160
+ connected_at?: string;
161
+ expires_at?: string;
162
+ }
163
+
164
+ declare type AgentSearchOptions = {
165
+ enabled?: boolean;
166
+ query?: string;
167
+ limit?: number;
168
+ };
169
+
170
+ declare type AgentThreadHookOptions = {
171
+ enabled?: boolean;
172
+ limit?: number;
173
+ };
174
+
175
+ export declare function AuthFormImage({ placement, }: {
176
+ placement?: "center" | "left" | "right";
177
+ }): JSX.Element | null;
138
178
 
139
179
  /**
140
180
  * Check if user can manage the organization (admin or manage permissions)
@@ -191,6 +231,10 @@ declare interface CreateWorkspaceFormProps {
191
231
  onCreateOrganization?: () => void;
192
232
  }
193
233
 
234
+ export declare function DefaultStylesProvider({ children, style, ...props }: DefaultStylesProviderProps): JSX.Element;
235
+
236
+ declare type DefaultStylesProviderProps = ComponentPropsWithoutRef<"div">;
237
+
194
238
  export declare interface DeploymentContextType {
195
239
  loading: boolean;
196
240
  deployment: Deployment | null;
@@ -326,7 +370,7 @@ declare const FRONTEND_STATUS: {
326
370
  readonly FAILED: "failed";
327
371
  };
328
372
 
329
- declare type FrontendStatus = typeof FRONTEND_STATUS[keyof typeof FRONTEND_STATUS];
373
+ declare type FrontendStatus = (typeof FRONTEND_STATUS)[keyof typeof FRONTEND_STATUS];
330
374
 
331
375
  declare type GenericSignInParams = {
332
376
  email?: string;
@@ -626,6 +670,17 @@ declare interface ProfileUpdateData {
626
670
  remove_profile_picture?: boolean;
627
671
  }
628
672
 
673
+ declare type ProjectTaskDetailOptions = {
674
+ includeArchived?: boolean;
675
+ };
676
+
677
+ declare type ProjectTaskListOptions = {
678
+ statuses?: string[];
679
+ includeArchived?: boolean;
680
+ archivedOnly?: boolean;
681
+ limit?: number;
682
+ };
683
+
629
684
  export declare function redirectToProfileCompletion(returnUrl?: string): void;
630
685
 
631
686
  export declare const RequireActiveTenancy: ({ children, }: RequireActiveTenancyProps) => JSX.Element | null;
@@ -875,8 +930,8 @@ export declare const useActiveOrganization: () => {
875
930
 
876
931
  export declare function useActiveTenancy(): {
877
932
  loading: boolean;
878
- orgMembership: OrganizationMembershipWithOrganization | null | undefined;
879
- workspaceMembership: WorkspaceMembership | null | undefined;
933
+ orgMembership: OrganizationMembershipWithOrganization | null;
934
+ workspaceMembership: WorkspaceMembership | null;
880
935
  };
881
936
 
882
937
  export declare const useActiveWorkspace: () => {
@@ -915,22 +970,113 @@ export declare const useActiveWorkspace: () => {
915
970
  resendInvitation: (invitationId: string) => Promise<unknown>;
916
971
  };
917
972
 
918
- export declare function useAgentContext({ contextId, agentName, platformAdapter, }: UseAgentContextProps): {
973
+ export declare function useActorMcpServers(enabled?: boolean): {
974
+ servers: ActorMcpServerSummary[];
975
+ loading: boolean;
976
+ error: any;
977
+ connect: (mcpServerId: string) => Promise<ActorMcpServerConnectResponse>;
978
+ disconnect: (mcpServerId: string) => Promise<void>;
979
+ refetch: () => Promise<void>;
980
+ };
981
+
982
+ export declare function useActorProjects(options?: {
983
+ includeArchived?: boolean;
984
+ enabled?: boolean;
985
+ }): {
986
+ projects: ActorProject[];
987
+ loading: boolean;
988
+ error: any;
989
+ createProject: (request: CreateActorProjectRequest) => Promise<ActorProject>;
990
+ updateProject: (projectId: string, request: UpdateActorProjectRequest) => Promise<ActorProject>;
991
+ archiveProject: (projectId: string) => Promise<ActorProject>;
992
+ unarchiveProject: (projectId: string) => Promise<ActorProject>;
993
+ refetch: () => Promise<void>;
994
+ };
995
+
996
+ export declare function useActorProjectSearch(options?: AgentSearchOptions): {
997
+ projects: ActorProject[];
998
+ loading: boolean;
999
+ error: any;
1000
+ hasMore: boolean;
1001
+ nextCursor: string | undefined;
1002
+ refetch: () => Promise<void>;
1003
+ };
1004
+
1005
+ export declare function useActors(options?: {
1006
+ includeArchived?: boolean;
1007
+ enabled?: boolean;
1008
+ }): {
1009
+ actors: Actor[];
1010
+ loading: boolean;
1011
+ error: any;
1012
+ refetch: () => Promise<void>;
1013
+ };
1014
+
1015
+ export declare function useActorThreadSearch(options?: AgentSearchOptions): {
1016
+ threads: AgentThread[];
1017
+ loading: boolean;
1018
+ error: any;
1019
+ hasMore: boolean;
1020
+ nextCursor: string | undefined;
1021
+ refetch: () => Promise<void>;
1022
+ };
1023
+
1024
+ export declare function useAgentSession(ticket?: string | null): UseAgentSessionResult;
1025
+
1026
+ declare interface UseAgentSessionResult {
1027
+ hasSession: boolean;
1028
+ sessionLoading: boolean;
1029
+ sessionError: Error | null;
1030
+ sessionId: string | null;
1031
+ actor: Actor | null;
1032
+ agents: Agent[];
1033
+ ticketExchanged: boolean;
1034
+ ticketLoading: boolean;
1035
+ refetch: () => Promise<void>;
1036
+ }
1037
+
1038
+ export declare function useAgentThread(threadId?: string, enabled?: boolean): {
1039
+ thread: AgentThread | null;
1040
+ loading: boolean;
1041
+ error: any;
1042
+ updateThread: (request: UpdateAgentThreadRequest) => Promise<AgentThread>;
1043
+ archiveThread: () => Promise<AgentThread>;
1044
+ unarchiveThread: () => Promise<AgentThread>;
1045
+ refetch: () => Promise<void>;
1046
+ };
1047
+
1048
+ export declare function useAgentThreadAssignments(threadId?: string, options?: AgentThreadHookOptions): {
1049
+ assignments: ProjectTaskBoardItemAssignment[];
1050
+ loading: boolean;
1051
+ error: any;
1052
+ hasMore: boolean;
1053
+ loadingMore: boolean;
1054
+ loadMore: () => Promise<void>;
1055
+ refetch: () => Promise<void>;
1056
+ };
1057
+
1058
+ export declare function useAgentThreadConversation({ threadId, platformAdapter, }: UseAgentThreadConversationProps): {
1059
+ threadState: AgentThread | null;
919
1060
  messages: ConversationMessage[];
920
- quickQuestions: string[];
921
1061
  pendingMessage: string | null;
922
1062
  pendingFiles: File[] | null;
923
1063
  connectionState: {
924
1064
  status: (typeof CONNECTION_STATES)[keyof typeof CONNECTION_STATES];
925
1065
  };
926
1066
  isConnected: boolean;
927
- isExecuting: boolean;
1067
+ hasActiveRun: boolean;
1068
+ isRunning: boolean;
928
1069
  executionStatus: FrontendStatus;
929
1070
  isWaitingForInput: boolean;
1071
+ pendingApprovalRequest: ThreadPendingApprovalRequestState | null;
1072
+ activeApprovalRequestId: string | null;
930
1073
  hasMoreMessages: boolean;
931
1074
  isLoadingMore: boolean;
1075
+ messagesLoading: boolean;
1076
+ messagesError: Error | null;
1077
+ refreshMessages: () => Promise<void>;
932
1078
  sendMessage: (message: string, files?: File[]) => Promise<void>;
933
- submitUserInput: (input: string) => Promise<void>;
1079
+ submitApprovalResponse: (requestMessageId: string, approvals: ToolApprovalDecision[]) => Promise<boolean>;
934
1080
  clearMessages: () => void;
935
1081
  loadMoreMessages: () => Promise<void>;
936
1082
  cancelExecution: () => Promise<void>;
@@ -938,73 +1084,45 @@ export declare function useAgentContext({ contextId, agentName, platformAdapter,
938
1084
  downloadMessageFile: (file: FileData | null | undefined) => void;
939
1085
  };
940
1086
 
941
- declare interface UseAgentContextProps {
942
- contextId: string;
943
- agentName: string;
1087
+ declare interface UseAgentThreadConversationProps {
1088
+ threadId: string;
944
1089
  platformAdapter?: {
945
1090
  onPlatformEvent?: (eventName: string, eventData: unknown) => void;
946
- onPlatformFunction?: (functionName: string, parameters: unknown, executionId: string) => Promise<unknown>;
947
1091
  };
948
- onUserInputRequest?: (request: UserInputRequestContent) => Promise<string>;
949
1092
  }
950
1093
 
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[];
1094
+ export declare function useAgentThreadEvents(threadId?: string, options?: AgentThreadHookOptions): {
1095
+ events: ThreadEvent[];
959
1096
  loading: boolean;
960
- error: Error | null;
1097
+ error: any;
961
1098
  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>;
1099
+ loadingMore: boolean;
1100
+ loadMore: () => Promise<void>;
967
1101
  refetch: () => Promise<void>;
968
1102
  };
969
1103
 
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>;
1104
+ export declare function useAgentThreadFilesystem(threadId?: string, enabled?: boolean): {
1105
+ filesystem: ProjectTaskWorkspaceListing;
1106
+ filesystemLoading: boolean;
1107
+ filesystemError: any;
1108
+ getFile: (path: string) => Promise<ProjectTaskWorkspaceFileContent & {
1109
+ blob: Blob;
1110
+ }>;
1111
+ listDirectory: (path?: string) => Promise<ProjectTaskWorkspaceListing>;
978
1112
  refetch: () => Promise<void>;
979
1113
  };
980
1114
 
981
- export declare function useAgentMcpServers(agentName: string | null): UseAgentMcpServersReturnType;
982
-
983
- declare type UseAgentMcpServersReturnType = {
984
- mcpServers: AgentMcpServer[];
1115
+ export declare function useAgentThreadTaskGraphs(threadId?: string, enabled?: boolean): {
1116
+ graphs: ThreadTaskGraphBundle[];
1117
+ latestGraph: ThreadTaskGraphBundle;
1118
+ has_more: boolean;
1119
+ loadingMore: boolean;
985
1120
  loading: boolean;
986
- error: Error | null;
987
- connect: (mcpServerId: string) => Promise<McpConnectResponse>;
988
- disconnect: (mcpServerId: string) => Promise<void>;
1121
+ error: any;
1122
+ loadMore: () => Promise<void>;
989
1123
  refetch: () => Promise<void>;
990
1124
  };
991
1125
 
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
1126
  export declare function useApiAuthAppSession(ticket?: string | null): UseApiAuthAppSessionResult;
1009
1127
 
1010
1128
  declare interface UseApiAuthAppSessionResult {
@@ -1231,6 +1349,69 @@ export declare const useOrganizationMemberships: () => {
1231
1349
  refetch: () => Promise<void>;
1232
1350
  };
1233
1351
 
1352
+ export declare function useProjectTaskBoardItem(itemId?: string, enabled?: boolean, options?: ProjectTaskDetailOptions): {
1353
+ item: ProjectTaskBoardItem | null;
1354
+ events: ProjectTaskBoardItemEvent[];
1355
+ assignments: ProjectTaskBoardItemAssignment[];
1356
+ taskWorkspace: ProjectTaskWorkspaceListing;
1357
+ taskWorkspaceLoading: boolean;
1358
+ taskWorkspaceError: any;
1359
+ loading: boolean;
1360
+ error: any;
1361
+ updateItem: (request: UpdateProjectTaskBoardItemRequest, files?: File[]) => Promise<ProjectTaskBoardItem>;
1362
+ archiveItem: () => Promise<ProjectTaskBoardItem>;
1363
+ unarchiveItem: () => Promise<ProjectTaskBoardItem>;
1364
+ getTaskWorkspaceFile: (path: string) => Promise<ProjectTaskWorkspaceFileContent>;
1365
+ listTaskWorkspaceDirectory: (path?: string) => Promise<ProjectTaskWorkspaceListing>;
1366
+ appendJournal: (request: AppendProjectTaskBoardItemJournalRequest, files?: File[]) => Promise<ProjectTaskBoardItemEvent>;
1367
+ refetch: () => Promise<void>;
1368
+ refetchTaskWorkspace: () => Promise<void>;
1369
+ };
1370
+
1371
+ export declare function useProjectTasks(projectId?: string, enabled?: boolean, options?: ProjectTaskListOptions): {
1372
+ tasks: ProjectTaskBoardItem[];
1373
+ loading: boolean;
1374
+ error: any;
1375
+ hasMore: boolean;
1376
+ loadingMore: boolean;
1377
+ loadMore: () => Promise<void>;
1378
+ createTask: (request: CreateProjectTaskBoardItemRequest, files?: File[]) => Promise<ProjectTaskBoardItem>;
1379
+ archiveTask: (itemId: string) => Promise<ProjectTaskBoardItem>;
1380
+ unarchiveTask: (itemId: string) => Promise<ProjectTaskBoardItem>;
1381
+ refetch: () => Promise<void>;
1382
+ };
1383
+
1384
+ export declare function useProjectThreadFeed(projectId?: string, options?: {
1385
+ includeArchived?: boolean;
1386
+ archivedOnly?: boolean;
1387
+ enabled?: boolean;
1388
+ query?: string;
1389
+ limit?: number;
1390
+ }): {
1391
+ threads: AgentThread[];
1392
+ loading: boolean;
1393
+ error: any;
1394
+ hasMore: boolean;
1395
+ loadingMore: boolean;
1396
+ loadMore: () => Promise<void>;
1397
+ refetch: () => Promise<void>;
1398
+ };
1399
+
1400
+ export declare function useProjectThreads(projectId?: string, options?: {
1401
+ includeArchived?: boolean;
1402
+ enabled?: boolean;
1403
+ }): {
1404
+ threads: AgentThread[];
1405
+ loading: boolean;
1406
+ error: any;
1407
+ createThread: (request: CreateAgentThreadRequest) => Promise<AgentThread>;
1408
+ createThreadForProject: (targetProjectId: string, request: CreateAgentThreadRequest) => Promise<AgentThread>;
1409
+ updateThread: (threadId: string, request: UpdateAgentThreadRequest) => Promise<AgentThread>;
1410
+ archiveThread: (threadId: string) => Promise<AgentThread>;
1411
+ unarchiveThread: (threadId: string) => Promise<AgentThread>;
1412
+ refetch: () => Promise<void>;
1413
+ };
1414
+
1234
1415
  export declare const UserButton: default_2.FC<UserButtonProps>;
1235
1416
 
1236
1417
  declare interface UserButtonProps {