@app-studio/web 0.9.15 → 0.9.17
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/components/Alert/Alert/Alert.props.d.ts +3 -2
- package/dist/components/Alert/Alert/Alert.view.d.ts +1 -1
- package/dist/components/AuthGuard/AuthGuard.d.ts +35 -0
- package/dist/components/AuthGuard/index.d.ts +1 -0
- package/dist/components/Avatar/Avatar/Avatar.props.d.ts +2 -1
- package/dist/components/Avatar/Avatar/Avatar.view.d.ts +1 -1
- package/dist/components/Avatar/Avatar.d.ts +1 -1
- package/dist/components/Tabs/Tabs/Tabs.props.d.ts +51 -3
- package/dist/components/Tabs/Tabs/Tabs.state.d.ts +13 -2
- package/dist/components/Tabs/Tabs/Tabs.view.d.ts +7 -1
- package/dist/components/Tabs/Tabs.d.ts +8 -1
- package/dist/components/Tabs/examples/compound.d.ts +5 -0
- package/dist/components/Tabs/examples/index.d.ts +1 -0
- package/dist/components/adk/AgentChat/AgentChat/AgentChat.props.d.ts +157 -0
- package/dist/components/adk/AgentChat/AgentChat/AgentChat.state.d.ts +24 -0
- package/dist/components/adk/AgentChat/AgentChat/AgentChat.style.d.ts +130 -0
- package/dist/components/adk/AgentChat/AgentChat/AgentChat.view.d.ts +12 -0
- package/dist/components/adk/AgentChat/AgentChat/AgentMessage.d.ts +21 -0
- package/dist/components/adk/AgentChat/AgentChat/AgentTypingIndicator.d.ts +7 -0
- package/dist/components/adk/AgentChat/AgentChat/MessageAttachmentPreview.d.ts +12 -0
- package/dist/components/adk/AgentChat/AgentChat.d.ts +41 -0
- package/dist/components/adk/AgentChat/examples/default.d.ts +25 -0
- package/dist/components/adk/AgentEval/AgentEval/AgentEval.props.d.ts +182 -0
- package/dist/components/adk/AgentEval/AgentEval/AgentEval.state.d.ts +27 -0
- package/dist/components/adk/AgentEval/AgentEval/AgentEval.style.d.ts +144 -0
- package/dist/components/adk/AgentEval/AgentEval/AgentEval.view.d.ts +12 -0
- package/dist/components/adk/AgentEval/AgentEval/EvaluationCreator.d.ts +17 -0
- package/dist/components/adk/AgentEval/AgentEval/EvaluationList.d.ts +23 -0
- package/dist/components/adk/AgentEval/AgentEval/EvaluationMetrics.d.ts +15 -0
- package/dist/components/adk/AgentEval/AgentEval/EvaluationResults.d.ts +19 -0
- package/dist/components/adk/AgentEval/AgentEval.d.ts +41 -0
- package/dist/components/adk/AgentEval/examples/default.d.ts +31 -0
- package/dist/components/adk/AgentSession/AgentSession/AgentSession.props.d.ts +148 -0
- package/dist/components/adk/AgentSession/AgentSession/AgentSession.state.d.ts +32 -0
- package/dist/components/adk/AgentSession/AgentSession/AgentSession.style.d.ts +105 -0
- package/dist/components/adk/AgentSession/AgentSession/AgentSession.view.d.ts +12 -0
- package/dist/components/adk/AgentSession/AgentSession/SessionActions.d.ts +20 -0
- package/dist/components/adk/AgentSession/AgentSession/SessionFilters.d.ts +14 -0
- package/dist/components/adk/AgentSession/AgentSession/SessionListItem.d.ts +26 -0
- package/dist/components/adk/AgentSession/AgentSession.d.ts +42 -0
- package/dist/components/adk/AgentSession/examples/default.d.ts +31 -0
- package/dist/components/adk/AgentTrace/AgentTrace/AgentTrace.props.d.ts +159 -0
- package/dist/components/adk/AgentTrace/AgentTrace/AgentTrace.state.d.ts +27 -0
- package/dist/components/adk/AgentTrace/AgentTrace/AgentTrace.style.d.ts +146 -0
- package/dist/components/adk/AgentTrace/AgentTrace/AgentTrace.view.d.ts +12 -0
- package/dist/components/adk/AgentTrace/AgentTrace/TraceEventList.d.ts +20 -0
- package/dist/components/adk/AgentTrace/AgentTrace/TraceFilters.d.ts +13 -0
- package/dist/components/adk/AgentTrace/AgentTrace/TraceMetrics.d.ts +16 -0
- package/dist/components/adk/AgentTrace/AgentTrace/TraceTimeline.d.ts +19 -0
- package/dist/components/adk/AgentTrace/AgentTrace/TraceVisualization.d.ts +19 -0
- package/dist/components/adk/AgentTrace/AgentTrace.d.ts +44 -0
- package/dist/components/adk/AgentTrace/examples/default.d.ts +31 -0
- package/dist/components/index.d.ts +8 -0
- package/dist/configs/AppConfig.d.ts +4 -0
- package/dist/hooks/useAdk.d.ts +42 -0
- package/dist/pages/adk/CompleteAgentApp.d.ts +30 -0
- package/dist/pages/adk/adkComponents.page.d.ts +8 -0
- package/dist/pages/adk/adkIntegration.page.d.ts +6 -0
- package/dist/pages/adk/agentChat.page.d.ts +8 -0
- package/dist/pages/adk/providers/AdkProvider.d.ts +83 -0
- package/dist/pages/adk/providers/index.d.ts +1 -0
- package/dist/pages/adk/services/AgentService.d.ts +167 -0
- package/dist/pages/adk/services/AgentServiceProvider.d.ts +83 -0
- package/dist/pages/adk/services/AgentServiceUtils.d.ts +176 -0
- package/dist/pages/adk/services/index.d.ts +50 -0
- package/dist/services/api/core/ApiError.d.ts +8 -0
- package/dist/services/api/core/ApiRequestOptions.d.ts +14 -0
- package/dist/services/api/core/ApiResult.d.ts +7 -0
- package/dist/services/api/core/CancelablePromise.d.ts +19 -0
- package/dist/services/api/core/OpenAPI.d.ts +17 -0
- package/dist/services/api/core/request.d.ts +16 -0
- package/dist/services/api/index.d.ts +156 -0
- package/dist/services/api/models/AgentMessage.d.ts +15 -0
- package/dist/services/api/models/AgentMessageResponse.d.ts +26 -0
- package/dist/services/api/models/AgentRunRequest.d.ts +27 -0
- package/dist/services/api/models/AgentRunResponse.d.ts +16 -0
- package/dist/services/api/models/AutoChargeSettingsParams.d.ts +14 -0
- package/dist/services/api/models/Buffer.d.ts +1 -0
- package/dist/services/api/models/CheckRatingParams.d.ts +7 -0
- package/dist/services/api/models/CreateActionParams.d.ts +22 -0
- package/dist/services/api/models/CreateAdminParams.d.ts +5 -0
- package/dist/services/api/models/CreateAnalyticParams.d.ts +22 -0
- package/dist/services/api/models/CreateApplicationParams.d.ts +10 -0
- package/dist/services/api/models/CreateCommentAnswerParams.d.ts +9 -0
- package/dist/services/api/models/CreateCommentParams.d.ts +8 -0
- package/dist/services/api/models/CreateComponentRevisionParams.d.ts +10 -0
- package/dist/services/api/models/CreateContentParams.d.ts +10 -0
- package/dist/services/api/models/CreateEvaluationParams.d.ts +22 -0
- package/dist/services/api/models/CreateExempleParams.d.ts +6 -0
- package/dist/services/api/models/CreateFeedbackParams.d.ts +14 -0
- package/dist/services/api/models/CreateGrantParams.d.ts +10 -0
- package/dist/services/api/models/CreateHighlightParams.d.ts +14 -0
- package/dist/services/api/models/CreateHomeParams.d.ts +10 -0
- package/dist/services/api/models/CreateItemParams.d.ts +22 -0
- package/dist/services/api/models/CreateLikeParams.d.ts +14 -0
- package/dist/services/api/models/CreateNewsParams.d.ts +6 -0
- package/dist/services/api/models/CreateNewsletterParams.d.ts +10 -0
- package/dist/services/api/models/CreateNewsletterSectionParams.d.ts +6 -0
- package/dist/services/api/models/CreatePageParams.d.ts +22 -0
- package/dist/services/api/models/CreatePaymentParams.d.ts +6 -0
- package/dist/services/api/models/CreateProjectParams.d.ts +10 -0
- package/dist/services/api/models/CreateRatingParams.d.ts +14 -0
- package/dist/services/api/models/CreateReportParams.d.ts +15 -0
- package/dist/services/api/models/CreateSessionParams.d.ts +14 -0
- package/dist/services/api/models/CreateSourceParams.d.ts +10 -0
- package/dist/services/api/models/CreateUserParams.d.ts +5 -0
- package/dist/services/api/models/DeployPageParams.d.ts +6 -0
- package/dist/services/api/models/DomainPageParams.d.ts +10 -0
- package/dist/services/api/models/EditComponentsParams.d.ts +14 -0
- package/dist/services/api/models/EditImageParams.d.ts +14 -0
- package/dist/services/api/models/EditTextParams.d.ts +18 -0
- package/dist/services/api/models/EvaluationResponse.d.ts +38 -0
- package/dist/services/api/models/FieldCreateOptionsParams.d.ts +14 -0
- package/dist/services/api/models/FindAdminParams.d.ts +19 -0
- package/dist/services/api/models/FindAnalyticParams.d.ts +19 -0
- package/dist/services/api/models/FindApplicationParams.d.ts +19 -0
- package/dist/services/api/models/FindCommentParams.d.ts +26 -0
- package/dist/services/api/models/FindContentParams.d.ts +19 -0
- package/dist/services/api/models/FindExempleParams.d.ts +19 -0
- package/dist/services/api/models/FindFeedbackParams.d.ts +30 -0
- package/dist/services/api/models/FindLikeParams.d.ts +26 -0
- package/dist/services/api/models/FindNewsParams.d.ts +31 -0
- package/dist/services/api/models/FindNewsletterParams.d.ts +19 -0
- package/dist/services/api/models/FindPageParams.d.ts +22 -0
- package/dist/services/api/models/FindReportParams.d.ts +30 -0
- package/dist/services/api/models/FindUserParams.d.ts +23 -0
- package/dist/services/api/models/FixComponentParams.d.ts +10 -0
- package/dist/services/api/models/FixPageParams.d.ts +10 -0
- package/dist/services/api/models/ForgotPasswordAdminParams.d.ts +6 -0
- package/dist/services/api/models/ForgotPasswordParams.d.ts +6 -0
- package/dist/services/api/models/GenerateAssistantParams.d.ts +15 -0
- package/dist/services/api/models/GenerateJsonAssistantParams.d.ts +14 -0
- package/dist/services/api/models/GenerateProjectParams.d.ts +10 -0
- package/dist/services/api/models/GetAnalyticViewParams.d.ts +10 -0
- package/dist/services/api/models/ImportSessionParams.d.ts +14 -0
- package/dist/services/api/models/ListCommentParams.d.ts +7 -0
- package/dist/services/api/models/ManualChargeParams.d.ts +14 -0
- package/dist/services/api/models/MessagePart.d.ts +14 -0
- package/dist/services/api/models/RequestTask.d.ts +10 -0
- package/dist/services/api/models/ResetPasswordAdminParams.d.ts +10 -0
- package/dist/services/api/models/ResetPasswordParams.d.ts +10 -0
- package/dist/services/api/models/ResetTaskParams.d.ts +10 -0
- package/dist/services/api/models/SaveReceiptParams.d.ts +10 -0
- package/dist/services/api/models/SessionResponse.d.ts +30 -0
- package/dist/services/api/models/SetAnalyticViewParams.d.ts +14 -0
- package/dist/services/api/models/SetPaymentMethodParams.d.ts +6 -0
- package/dist/services/api/models/SignInAdminParams.d.ts +4 -0
- package/dist/services/api/models/SignInParams.d.ts +4 -0
- package/dist/services/api/models/SignUpParams.d.ts +14 -0
- package/dist/services/api/models/SignalCommentParams.d.ts +7 -0
- package/dist/services/api/models/TraceEvent.d.ts +26 -0
- package/dist/services/api/models/TraceMetrics.d.ts +22 -0
- package/dist/services/api/models/UpdateAccountParams.d.ts +4 -0
- package/dist/services/api/models/UpdateActionParams.d.ts +6 -0
- package/dist/services/api/models/UpdateAdminParams.d.ts +4 -0
- package/dist/services/api/models/UpdateApplicationParams.d.ts +6 -0
- package/dist/services/api/models/UpdateCommentParams.d.ts +6 -0
- package/dist/services/api/models/UpdateComponentParams.d.ts +26 -0
- package/dist/services/api/models/UpdateComponentPropsParams.d.ts +10 -0
- package/dist/services/api/models/UpdateContentParams.d.ts +10 -0
- package/dist/services/api/models/UpdateExempleParams.d.ts +6 -0
- package/dist/services/api/models/UpdateFeedbackParams.d.ts +14 -0
- package/dist/services/api/models/UpdateGrantParams.d.ts +6 -0
- package/dist/services/api/models/UpdateHighlightParams.d.ts +10 -0
- package/dist/services/api/models/UpdateHomeParams.d.ts +6 -0
- package/dist/services/api/models/UpdateImagePropsParams.d.ts +10 -0
- package/dist/services/api/models/UpdateItemJsonBody.d.ts +6 -0
- package/dist/services/api/models/UpdateItemParams.d.ts +14 -0
- package/dist/services/api/models/UpdateItemTextBody.d.ts +6 -0
- package/dist/services/api/models/UpdateLikeParams.d.ts +6 -0
- package/dist/services/api/models/UpdateNewsParams.d.ts +46 -0
- package/dist/services/api/models/UpdateNewsletterParams.d.ts +6 -0
- package/dist/services/api/models/UpdateNewsletterSectionParams.d.ts +6 -0
- package/dist/services/api/models/UpdatePageParams.d.ts +14 -0
- package/dist/services/api/models/UpdatePasswordAminParams.d.ts +10 -0
- package/dist/services/api/models/UpdatePasswordParams.d.ts +10 -0
- package/dist/services/api/models/UpdateProfileParams.d.ts +22 -0
- package/dist/services/api/models/UpdateProjectParams.d.ts +10 -0
- package/dist/services/api/models/UpdateReportParams.d.ts +3 -0
- package/dist/services/api/models/UpdateSourceParams.d.ts +6 -0
- package/dist/services/api/models/UpdateTaskStatus.d.ts +18 -0
- package/dist/services/api/models/UpdateUserCountParams.d.ts +6 -0
- package/dist/services/api/models/UpdateUserParams.d.ts +44 -0
- package/dist/services/api/models/createPageComponentParams.d.ts +10 -0
- package/dist/services/api/services/AccountService.d.ts +132 -0
- package/dist/services/api/services/ActionService.d.ts +72 -0
- package/dist/services/api/services/AdkEvaluationService.d.ts +93 -0
- package/dist/services/api/services/AdkService.d.ts +104 -0
- package/dist/services/api/services/AdkTraceService.d.ts +90 -0
- package/dist/services/api/services/AdminService.d.ts +131 -0
- package/dist/services/api/services/AnalyticService.d.ts +72 -0
- package/dist/services/api/services/AppService.d.ts +42 -0
- package/dist/services/api/services/ApplicationService.d.ts +83 -0
- package/dist/services/api/services/AssistantService.d.ts +50 -0
- package/dist/services/api/services/AuthService.d.ts +130 -0
- package/dist/services/api/services/CommentService.d.ts +144 -0
- package/dist/services/api/services/ComponentRevisionService.d.ts +25 -0
- package/dist/services/api/services/ComponentService.d.ts +102 -0
- package/dist/services/api/services/ContentService.d.ts +72 -0
- package/dist/services/api/services/CronService.d.ts +12 -0
- package/dist/services/api/services/ExempleService.d.ts +104 -0
- package/dist/services/api/services/FeedbackService.d.ts +83 -0
- package/dist/services/api/services/FieldService.d.ts +47 -0
- package/dist/services/api/services/FileService.d.ts +30 -0
- package/dist/services/api/services/GrantService.d.ts +100 -0
- package/dist/services/api/services/HighlightService.d.ts +59 -0
- package/dist/services/api/services/HomeService.d.ts +59 -0
- package/dist/services/api/services/IapService.d.ts +36 -0
- package/dist/services/api/services/ItemJsonService.d.ts +58 -0
- package/dist/services/api/services/ItemService.d.ts +53 -0
- package/dist/services/api/services/ItemTextsService.d.ts +101 -0
- package/dist/services/api/services/LikeService.d.ts +86 -0
- package/dist/services/api/services/NewsService.d.ts +87 -0
- package/dist/services/api/services/NewsletterService.d.ts +169 -0
- package/dist/services/api/services/PageService.d.ts +84 -0
- package/dist/services/api/services/PaymentService.d.ts +79 -0
- package/dist/services/api/services/ProfileService.d.ts +50 -0
- package/dist/services/api/services/ProjectService.d.ts +59 -0
- package/dist/services/api/services/PromptService.d.ts +18 -0
- package/dist/services/api/services/RatingService.d.ts +34 -0
- package/dist/services/api/services/ReportService.d.ts +48 -0
- package/dist/services/api/services/SectionService.d.ts +50 -0
- package/dist/services/api/services/SeedService.d.ts +24 -0
- package/dist/services/api/services/UserService.d.ts +148 -0
- package/dist/services/api/services/WorkflowService.d.ts +203 -0
- package/dist/stores/AuthStore.d.ts +2 -0
- package/dist/utils/env.d.ts +15 -0
- package/dist/utils/localstorage.d.ts +5 -0
- package/dist/utils/request.d.ts +38 -0
- package/dist/utils/store.d.ts +7 -0
- package/dist/web.cjs.development.js +6085 -57
- package/dist/web.cjs.development.js.map +1 -1
- package/dist/web.cjs.production.min.js +1 -1
- package/dist/web.cjs.production.min.js.map +1 -1
- package/dist/web.esm.js +6083 -59
- package/dist/web.esm.js.map +1 -1
- package/dist/web.umd.development.js +6082 -61
- package/dist/web.umd.development.js.map +1 -1
- package/dist/web.umd.production.min.js +1 -1
- package/dist/web.umd.production.min.js.map +1 -1
- package/package.json +6 -3
- package/dist/hooks/useRect.d.ts +0 -7
- package/dist/pages/positioning-test.page.d.ts +0 -3
- package/dist/pages/responsive-title-demo.page.d.ts +0 -6
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AgentTraceProps } from './AgentTrace/AgentTrace.props';
|
|
3
|
+
/**
|
|
4
|
+
* AgentTrace Component
|
|
5
|
+
*
|
|
6
|
+
* A comprehensive trace visualization component for ADK agents.
|
|
7
|
+
* Displays execution traces, events, and performance metrics in an interactive format.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* <AgentTrace
|
|
12
|
+
* sessionId="session-123"
|
|
13
|
+
* userId="user123"
|
|
14
|
+
* appName="my-agent"
|
|
15
|
+
* onEventSelect={(event) => console.log('Event selected:', event)}
|
|
16
|
+
* />
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```tsx
|
|
21
|
+
* // With custom visualization and filtering
|
|
22
|
+
* <AgentTrace
|
|
23
|
+
* sessionId="session-123"
|
|
24
|
+
* userId="user123"
|
|
25
|
+
* appName="my-agent"
|
|
26
|
+
* showTimeline={true}
|
|
27
|
+
* showMetrics={true}
|
|
28
|
+
* enableFiltering={true}
|
|
29
|
+
* enableExport={true}
|
|
30
|
+
* visualizationType="tree"
|
|
31
|
+
* autoRefresh={true}
|
|
32
|
+
* refreshInterval={5000}
|
|
33
|
+
* views={{
|
|
34
|
+
* container: { backgroundColor: 'color.gray.50' },
|
|
35
|
+
* timeline: { height: '200px' },
|
|
36
|
+
* eventList: { maxHeight: '400px' }
|
|
37
|
+
* }}
|
|
38
|
+
* />
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
declare const AgentTrace: React.FC<AgentTraceProps>;
|
|
42
|
+
export default AgentTrace;
|
|
43
|
+
export { AgentTrace };
|
|
44
|
+
export type { AgentTraceProps };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Default AgentTrace Example
|
|
4
|
+
*
|
|
5
|
+
* Demonstrates basic usage of the AgentTrace component
|
|
6
|
+
*/
|
|
7
|
+
export declare const DefaultDemo: () => React.JSX.Element;
|
|
8
|
+
/**
|
|
9
|
+
* AgentTrace with Mock Data Example
|
|
10
|
+
*
|
|
11
|
+
* Shows the component with sample trace data
|
|
12
|
+
*/
|
|
13
|
+
export declare const MockDataDemo: () => React.JSX.Element;
|
|
14
|
+
/**
|
|
15
|
+
* Compact AgentTrace Example
|
|
16
|
+
*
|
|
17
|
+
* Shows the component in compact mode
|
|
18
|
+
*/
|
|
19
|
+
export declare const CompactDemo: () => React.JSX.Element;
|
|
20
|
+
/**
|
|
21
|
+
* Real-time AgentTrace Example
|
|
22
|
+
*
|
|
23
|
+
* Demonstrates real-time updates and auto-refresh
|
|
24
|
+
*/
|
|
25
|
+
export declare const RealTimeDemo: () => React.JSX.Element;
|
|
26
|
+
/**
|
|
27
|
+
* Customized AgentTrace Example
|
|
28
|
+
*
|
|
29
|
+
* Shows advanced customization options
|
|
30
|
+
*/
|
|
31
|
+
export declare const CustomizedDemo: () => React.JSX.Element;
|
|
@@ -56,6 +56,10 @@ export * from './Tree/Tree';
|
|
|
56
56
|
export * from './Flow/Flow';
|
|
57
57
|
export * from './ChatInput/ChatInput';
|
|
58
58
|
export * from './Background/Background';
|
|
59
|
+
export { default as AgentChat } from './adk/AgentChat/AgentChat';
|
|
60
|
+
export { default as AgentSession } from './adk/AgentSession/AgentSession';
|
|
61
|
+
export { default as AgentTrace } from './adk/AgentTrace/AgentTrace';
|
|
62
|
+
export { default as AgentEval } from './adk/AgentEval/AgentEval';
|
|
59
63
|
export * from './Accordion/Accordion/Accordion.props';
|
|
60
64
|
export * from './Alert/Alert/Alert.props';
|
|
61
65
|
export * from './AspectRatio/AspectRatio/AspectRatio.props';
|
|
@@ -107,3 +111,7 @@ export * from './Tree/Tree/Tree.props';
|
|
|
107
111
|
export * from './Flow/Flow/Flow.props';
|
|
108
112
|
export * from './ChatInput/ChatInput/ChatInput.props';
|
|
109
113
|
export * from './Background/Background/Background.props';
|
|
114
|
+
export type { AgentRunRequest, MessagePart, AgentMessage, MessageAttachment, AgentChatViews, AgentChatEventHandlers, AgentChatProps, } from './adk/AgentChat/AgentChat/AgentChat.props';
|
|
115
|
+
export type { AgentSession as AgentSessionType, AgentEvent, SessionSummary, AgentSessionViews, AgentSessionEventHandlers, SessionFilters, SessionSortOptions, AgentSessionProps, SessionAction, SessionStatus, SessionExportData, SessionImportOptions, } from './adk/AgentSession/AgentSession/AgentSession.props';
|
|
116
|
+
export * from './adk/AgentTrace/AgentTrace/AgentTrace.props';
|
|
117
|
+
export * from './adk/AgentEval/AgentEval/AgentEval.props';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { CreateSessionParams, AgentRunRequest, SessionResponse } from '../services/api';
|
|
3
|
+
/**
|
|
4
|
+
* Custom hook for ADK operations
|
|
5
|
+
* Integrates with the existing ADK service and auth store
|
|
6
|
+
*/
|
|
7
|
+
export declare const useAdk: () => {
|
|
8
|
+
isAuthenticated: any;
|
|
9
|
+
user: any;
|
|
10
|
+
currentSessionId: string | null;
|
|
11
|
+
sessions: SessionResponse[];
|
|
12
|
+
createSession: (params: CreateSessionParams) => void;
|
|
13
|
+
loadSessions: (appName?: string | undefined) => void;
|
|
14
|
+
loadSession: (sessionId: string) => void;
|
|
15
|
+
deleteSession: (sessionId: string) => void;
|
|
16
|
+
runAgent: (request: AgentRunRequest) => void;
|
|
17
|
+
runAgentStreaming: (request: AgentRunRequest) => void;
|
|
18
|
+
checkHealth: () => void;
|
|
19
|
+
getServiceInfo: () => void;
|
|
20
|
+
setCurrentSessionId: import("react").Dispatch<import("react").SetStateAction<string | null>>;
|
|
21
|
+
isCreatingSession: boolean;
|
|
22
|
+
isLoadingSessions: boolean;
|
|
23
|
+
isLoadingSession: boolean;
|
|
24
|
+
isDeletingSession: boolean;
|
|
25
|
+
isRunningAgent: boolean;
|
|
26
|
+
isRunningAgentStreaming: boolean;
|
|
27
|
+
isCheckingHealth: boolean;
|
|
28
|
+
isLoadingServiceInfo: boolean;
|
|
29
|
+
sessionData: any;
|
|
30
|
+
agentResponse: any;
|
|
31
|
+
agentStreamingResponse: any;
|
|
32
|
+
healthData: any;
|
|
33
|
+
serviceInfo: any;
|
|
34
|
+
createSessionError: Error | undefined;
|
|
35
|
+
listSessionsError: Error | undefined;
|
|
36
|
+
getSessionError: Error | undefined;
|
|
37
|
+
deleteSessionError: Error | undefined;
|
|
38
|
+
runAgentError: Error | undefined;
|
|
39
|
+
runAgentStreamingError: Error | undefined;
|
|
40
|
+
healthError: Error | undefined;
|
|
41
|
+
serviceInfoError: Error | undefined;
|
|
42
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Complete Agent Application Example
|
|
4
|
+
*
|
|
5
|
+
* This example demonstrates how to integrate all ADK components
|
|
6
|
+
* into a complete agent application with proper service management,
|
|
7
|
+
* state coordination, and user experience.
|
|
8
|
+
*/
|
|
9
|
+
interface CompleteAgentAppProps {
|
|
10
|
+
appName: string;
|
|
11
|
+
userId: string;
|
|
12
|
+
apiBaseUrl: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Complete Agent Application with Service Provider
|
|
16
|
+
*/
|
|
17
|
+
declare const CompleteAgentApp: React.FC<CompleteAgentAppProps>;
|
|
18
|
+
/**
|
|
19
|
+
* Usage Example
|
|
20
|
+
*/
|
|
21
|
+
export declare const CompleteAgentAppExample: () => React.JSX.Element;
|
|
22
|
+
/**
|
|
23
|
+
* Development Example with Local API
|
|
24
|
+
*/
|
|
25
|
+
export declare const DevelopmentExample: () => React.JSX.Element;
|
|
26
|
+
/**
|
|
27
|
+
* Production Example with Environment Variables
|
|
28
|
+
*/
|
|
29
|
+
export declare const ProductionExample: () => React.JSX.Element;
|
|
30
|
+
export default CompleteAgentApp;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* ADK Context Type
|
|
4
|
+
*/
|
|
5
|
+
interface AdkContextType {
|
|
6
|
+
isAuthenticated: boolean;
|
|
7
|
+
user: any;
|
|
8
|
+
currentSessionId: string | null;
|
|
9
|
+
sessions: any[];
|
|
10
|
+
createSession: (params: any) => void;
|
|
11
|
+
loadSessions: (appName?: string) => void;
|
|
12
|
+
loadSession: (sessionId: string) => void;
|
|
13
|
+
deleteSession: (sessionId: string) => void;
|
|
14
|
+
runAgent: (request: any) => void;
|
|
15
|
+
runAgentStreaming: (request: any) => void;
|
|
16
|
+
checkHealth: () => void;
|
|
17
|
+
getServiceInfo: () => void;
|
|
18
|
+
setCurrentSessionId: (sessionId: string | null) => void;
|
|
19
|
+
isCreatingSession: boolean;
|
|
20
|
+
isLoadingSessions: boolean;
|
|
21
|
+
isLoadingSession: boolean;
|
|
22
|
+
isDeletingSession: boolean;
|
|
23
|
+
isRunningAgent: boolean;
|
|
24
|
+
isRunningAgentStreaming: boolean;
|
|
25
|
+
isCheckingHealth: boolean;
|
|
26
|
+
isLoadingServiceInfo: boolean;
|
|
27
|
+
sessionData: any;
|
|
28
|
+
agentResponse: any;
|
|
29
|
+
agentStreamingResponse: any;
|
|
30
|
+
healthData: any;
|
|
31
|
+
serviceInfo: any;
|
|
32
|
+
createSessionError: any;
|
|
33
|
+
listSessionsError: any;
|
|
34
|
+
getSessionError: any;
|
|
35
|
+
deleteSessionError: any;
|
|
36
|
+
runAgentError: any;
|
|
37
|
+
runAgentStreamingError: any;
|
|
38
|
+
healthError: any;
|
|
39
|
+
serviceInfoError: any;
|
|
40
|
+
isConnected: boolean;
|
|
41
|
+
error: string | null;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* ADK Provider Props
|
|
45
|
+
*/
|
|
46
|
+
interface AdkProviderProps {
|
|
47
|
+
children: ReactNode;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* ADK Provider Component
|
|
51
|
+
*
|
|
52
|
+
* Provides ADK functionality using the existing API services and auth store
|
|
53
|
+
*/
|
|
54
|
+
export declare const AdkProvider: React.FC<AdkProviderProps>;
|
|
55
|
+
/**
|
|
56
|
+
* Hook to use ADK context
|
|
57
|
+
*/
|
|
58
|
+
export declare const useAdkContext: () => AdkContextType;
|
|
59
|
+
/**
|
|
60
|
+
* Legacy hook for compatibility with existing components
|
|
61
|
+
*/
|
|
62
|
+
export declare const useAgentService: () => {
|
|
63
|
+
isConnected: boolean;
|
|
64
|
+
error: string | null;
|
|
65
|
+
service: {
|
|
66
|
+
createSession: (params: any) => void;
|
|
67
|
+
listSessions: (appName?: string | undefined) => void;
|
|
68
|
+
getSession: (sessionId: string) => void;
|
|
69
|
+
deleteSession: (sessionId: string) => void;
|
|
70
|
+
runAgent: (request: any) => void;
|
|
71
|
+
runAgentStreaming: (request: any) => void;
|
|
72
|
+
healthCheck: () => void;
|
|
73
|
+
getServiceInfo: () => void;
|
|
74
|
+
};
|
|
75
|
+
currentSessionId: string | null;
|
|
76
|
+
sessions: any[];
|
|
77
|
+
isCreatingSession: boolean;
|
|
78
|
+
isLoadingSessions: boolean;
|
|
79
|
+
isRunningAgent: boolean;
|
|
80
|
+
agentResponse: any;
|
|
81
|
+
sessionData: any;
|
|
82
|
+
};
|
|
83
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AdkProvider, useAdkContext, useAgentService } from './AdkProvider';
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent Service Integration
|
|
3
|
+
*
|
|
4
|
+
* Enhanced service layer for backend communication with ADK agents.
|
|
5
|
+
* Provides a unified interface for all agent-related operations.
|
|
6
|
+
*/
|
|
7
|
+
import { AgentSession, AgentMessage, AgentRunRequest } from '../../../components/adk/AgentChat/AgentChat/AgentChat.props';
|
|
8
|
+
import { TraceEvent, TraceSpan, TraceMetrics } from '../../../components/adk/AgentTrace/AgentTrace/AgentTrace.props';
|
|
9
|
+
import { EvaluationRun, EvaluationTestCase, EvaluationMetric } from '../../../components/adk/AgentEval/AgentEval/AgentEval.props';
|
|
10
|
+
/**
|
|
11
|
+
* Configuration for the Agent Service
|
|
12
|
+
*/
|
|
13
|
+
export interface AgentServiceConfig {
|
|
14
|
+
baseUrl: string;
|
|
15
|
+
timeout?: number;
|
|
16
|
+
retryCount?: number;
|
|
17
|
+
enableLogging?: boolean;
|
|
18
|
+
apiKey?: string;
|
|
19
|
+
headers?: Record<string, string>;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Event listener types for real-time updates
|
|
23
|
+
*/
|
|
24
|
+
export declare type AgentEventListener = (event: any) => void;
|
|
25
|
+
/**
|
|
26
|
+
* Enhanced Agent Service Class
|
|
27
|
+
*
|
|
28
|
+
* Provides a comprehensive interface for interacting with ADK agents,
|
|
29
|
+
* including session management, messaging, tracing, and evaluation.
|
|
30
|
+
*/
|
|
31
|
+
export declare class AgentService {
|
|
32
|
+
private config;
|
|
33
|
+
private eventListeners;
|
|
34
|
+
private activeConnections;
|
|
35
|
+
constructor(config: AgentServiceConfig);
|
|
36
|
+
/**
|
|
37
|
+
* Session Management
|
|
38
|
+
*/
|
|
39
|
+
/**
|
|
40
|
+
* Create a new agent session
|
|
41
|
+
*/
|
|
42
|
+
createSession(appName: string, userId: string, metadata?: any): Promise<AgentSession>;
|
|
43
|
+
/**
|
|
44
|
+
* Get session details
|
|
45
|
+
*/
|
|
46
|
+
getSession(sessionId: string): Promise<AgentSession>;
|
|
47
|
+
/**
|
|
48
|
+
* List sessions for a user
|
|
49
|
+
*/
|
|
50
|
+
listSessions(userId: string, appName?: string, limit?: number): Promise<AgentSession[]>;
|
|
51
|
+
/**
|
|
52
|
+
* Delete a session
|
|
53
|
+
*/
|
|
54
|
+
deleteSession(sessionId: string): Promise<void>;
|
|
55
|
+
/**
|
|
56
|
+
* Messaging
|
|
57
|
+
*/
|
|
58
|
+
/**
|
|
59
|
+
* Send a message to an agent (non-streaming)
|
|
60
|
+
*/
|
|
61
|
+
sendMessage(request: AgentRunRequest): Promise<any>;
|
|
62
|
+
/**
|
|
63
|
+
* Send a message to an agent with streaming response
|
|
64
|
+
*/
|
|
65
|
+
sendMessageStreaming(request: AgentRunRequest, onMessage: (message: AgentMessage) => void, onError?: (error: Error) => void, onComplete?: () => void): Promise<void>;
|
|
66
|
+
/**
|
|
67
|
+
* Cancel a streaming request
|
|
68
|
+
*/
|
|
69
|
+
cancelStreaming(sessionId: string): void;
|
|
70
|
+
/**
|
|
71
|
+
* Tracing
|
|
72
|
+
*/
|
|
73
|
+
/**
|
|
74
|
+
* Get trace events for a session
|
|
75
|
+
*/
|
|
76
|
+
getTraceEvents(sessionId: string, filters?: {
|
|
77
|
+
eventTypes?: string[];
|
|
78
|
+
startTime?: number;
|
|
79
|
+
endTime?: number;
|
|
80
|
+
limit?: number;
|
|
81
|
+
}): Promise<TraceEvent[]>;
|
|
82
|
+
/**
|
|
83
|
+
* Get trace spans for a session
|
|
84
|
+
*/
|
|
85
|
+
getTraceSpans(sessionId: string): Promise<TraceSpan[]>;
|
|
86
|
+
/**
|
|
87
|
+
* Get trace metrics for a session
|
|
88
|
+
*/
|
|
89
|
+
getTraceMetrics(sessionId: string): Promise<TraceMetrics>;
|
|
90
|
+
/**
|
|
91
|
+
* Subscribe to real-time trace updates
|
|
92
|
+
*/
|
|
93
|
+
subscribeToTraceUpdates(sessionId: string, onUpdate: (update: any) => void, onError?: (error: Error) => void): void;
|
|
94
|
+
/**
|
|
95
|
+
* Evaluation
|
|
96
|
+
*/
|
|
97
|
+
/**
|
|
98
|
+
* Create a new evaluation
|
|
99
|
+
*/
|
|
100
|
+
createEvaluation(name: string, appName: string, userId: string, testCases: EvaluationTestCase[], metrics: EvaluationMetric[], config?: any): Promise<EvaluationRun>;
|
|
101
|
+
/**
|
|
102
|
+
* Start an evaluation
|
|
103
|
+
*/
|
|
104
|
+
startEvaluation(evaluationId: string): Promise<void>;
|
|
105
|
+
/**
|
|
106
|
+
* Cancel an evaluation
|
|
107
|
+
*/
|
|
108
|
+
cancelEvaluation(evaluationId: string): Promise<void>;
|
|
109
|
+
/**
|
|
110
|
+
* Get evaluation details
|
|
111
|
+
*/
|
|
112
|
+
getEvaluation(evaluationId: string): Promise<EvaluationRun>;
|
|
113
|
+
/**
|
|
114
|
+
* List evaluations
|
|
115
|
+
*/
|
|
116
|
+
listEvaluations(appName: string, userId: string, limit?: number): Promise<EvaluationRun[]>;
|
|
117
|
+
/**
|
|
118
|
+
* Delete an evaluation
|
|
119
|
+
*/
|
|
120
|
+
deleteEvaluation(evaluationId: string): Promise<void>;
|
|
121
|
+
/**
|
|
122
|
+
* Subscribe to evaluation updates
|
|
123
|
+
*/
|
|
124
|
+
subscribeToEvaluationUpdates(userId: string, onUpdate: (update: any) => void, onError?: (error: Error) => void): void;
|
|
125
|
+
/**
|
|
126
|
+
* Utility Methods
|
|
127
|
+
*/
|
|
128
|
+
/**
|
|
129
|
+
* Make an HTTP request with retry logic
|
|
130
|
+
*/
|
|
131
|
+
private request;
|
|
132
|
+
/**
|
|
133
|
+
* Get default headers for requests
|
|
134
|
+
*/
|
|
135
|
+
private getHeaders;
|
|
136
|
+
/**
|
|
137
|
+
* Event Management
|
|
138
|
+
*/
|
|
139
|
+
/**
|
|
140
|
+
* Add event listener
|
|
141
|
+
*/
|
|
142
|
+
addEventListener(event: string, listener: AgentEventListener): void;
|
|
143
|
+
/**
|
|
144
|
+
* Remove event listener
|
|
145
|
+
*/
|
|
146
|
+
removeEventListener(event: string, listener: AgentEventListener): void;
|
|
147
|
+
/**
|
|
148
|
+
* Emit event to listeners
|
|
149
|
+
*/
|
|
150
|
+
private emit;
|
|
151
|
+
/**
|
|
152
|
+
* Cleanup all connections and listeners
|
|
153
|
+
*/
|
|
154
|
+
cleanup(): void;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Default Agent Service Instance
|
|
158
|
+
*
|
|
159
|
+
* Pre-configured service instance for common use cases
|
|
160
|
+
*/
|
|
161
|
+
export declare const createAgentService: (config: AgentServiceConfig) => AgentService;
|
|
162
|
+
/**
|
|
163
|
+
* Agent Service Hook for React Components
|
|
164
|
+
*
|
|
165
|
+
* Provides a convenient way to use the Agent Service in React components
|
|
166
|
+
*/
|
|
167
|
+
export declare const useAgentServiceHook: (config: AgentServiceConfig) => AgentService;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AgentService, AgentServiceConfig } from './AgentService';
|
|
3
|
+
/**
|
|
4
|
+
* Agent Service Context
|
|
5
|
+
*
|
|
6
|
+
* Provides the Agent Service instance throughout the React component tree
|
|
7
|
+
*/
|
|
8
|
+
interface AgentServiceContextType {
|
|
9
|
+
service: AgentService | null;
|
|
10
|
+
isConnected: boolean;
|
|
11
|
+
error: string | null;
|
|
12
|
+
reconnect: () => void;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Agent Service Provider Props
|
|
16
|
+
*/
|
|
17
|
+
export interface AgentServiceProviderProps {
|
|
18
|
+
config: AgentServiceConfig;
|
|
19
|
+
children: React.ReactNode;
|
|
20
|
+
onConnectionChange?: (isConnected: boolean) => void;
|
|
21
|
+
onError?: (error: Error) => void;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Agent Service Provider Component
|
|
25
|
+
*
|
|
26
|
+
* Provides the Agent Service instance to all child components
|
|
27
|
+
* and manages connection state and error handling.
|
|
28
|
+
*/
|
|
29
|
+
export declare const AgentServiceProvider: React.FC<AgentServiceProviderProps>;
|
|
30
|
+
/**
|
|
31
|
+
* Hook to use the Agent Service
|
|
32
|
+
*
|
|
33
|
+
* Provides access to the Agent Service instance and connection state
|
|
34
|
+
*/
|
|
35
|
+
export declare const useAgentService: () => AgentServiceContextType;
|
|
36
|
+
/**
|
|
37
|
+
* Hook for Agent Service Operations
|
|
38
|
+
*
|
|
39
|
+
* Provides common operations with built-in error handling and loading states
|
|
40
|
+
*/
|
|
41
|
+
export declare const useAgentOperations: () => {
|
|
42
|
+
isLoading: boolean;
|
|
43
|
+
error: string | null;
|
|
44
|
+
setError: React.Dispatch<React.SetStateAction<string | null>>;
|
|
45
|
+
executeOperation: <T>(operation: () => Promise<T>, onSuccess?: ((result: T) => void) | undefined, onError?: ((error: Error) => void) | undefined) => Promise<T | null>;
|
|
46
|
+
sessions: {
|
|
47
|
+
create: (appName: string, userId: string, metadata?: any) => Promise<import("../../../components/adk/AgentChat/AgentChat/AgentChat.props").AgentSession | null>;
|
|
48
|
+
get: (sessionId: string) => Promise<import("../../../components/adk/AgentChat/AgentChat/AgentChat.props").AgentSession | null>;
|
|
49
|
+
list: (userId: string, appName?: string | undefined, limit?: number | undefined) => Promise<import("../../../components/adk/AgentChat/AgentChat/AgentChat.props").AgentSession[] | null>;
|
|
50
|
+
delete: (sessionId: string) => Promise<void | null>;
|
|
51
|
+
};
|
|
52
|
+
messages: {
|
|
53
|
+
send: (request: any) => Promise<any>;
|
|
54
|
+
sendStreaming: (request: any, onMessage: (message: any) => void, onComplete?: (() => void) | undefined) => Promise<void | null>;
|
|
55
|
+
cancelStreaming: (sessionId: string) => void;
|
|
56
|
+
};
|
|
57
|
+
trace: {
|
|
58
|
+
getEvents: (sessionId: string, filters?: any) => Promise<import("../../../components").TraceEvent[] | null>;
|
|
59
|
+
getSpans: (sessionId: string) => Promise<import("../../../components").TraceSpan[] | null>;
|
|
60
|
+
getMetrics: (sessionId: string) => Promise<import("../../../components").TraceMetrics | null>;
|
|
61
|
+
subscribe: (sessionId: string, onUpdate: (update: any) => void) => void;
|
|
62
|
+
};
|
|
63
|
+
evaluations: {
|
|
64
|
+
create: (name: string, appName: string, userId: string, testCases: any[], metrics: any[], config?: any) => Promise<import("../../../components").EvaluationRun | null>;
|
|
65
|
+
start: (evaluationId: string) => Promise<void | null>;
|
|
66
|
+
cancel: (evaluationId: string) => Promise<void | null>;
|
|
67
|
+
get: (evaluationId: string) => Promise<import("../../../components").EvaluationRun | null>;
|
|
68
|
+
list: (appName: string, userId: string, limit?: number | undefined) => Promise<import("../../../components").EvaluationRun[] | null>;
|
|
69
|
+
delete: (evaluationId: string) => Promise<void | null>;
|
|
70
|
+
subscribe: (userId: string, onUpdate: (update: any) => void) => void;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* Connection Status Component
|
|
75
|
+
*
|
|
76
|
+
* Displays the current connection status of the Agent Service
|
|
77
|
+
*/
|
|
78
|
+
export interface ConnectionStatusProps {
|
|
79
|
+
showDetails?: boolean;
|
|
80
|
+
onReconnect?: () => void;
|
|
81
|
+
}
|
|
82
|
+
export declare const ConnectionStatus: React.FC<ConnectionStatusProps>;
|
|
83
|
+
export {};
|