@surf-kit/agent 0.1.1 → 0.2.1

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.
Files changed (74) hide show
  1. package/README.md +19 -1
  2. package/dist/agent-BNSmiexZ.d.cts +44 -0
  3. package/dist/agent-BNSmiexZ.d.ts +44 -0
  4. package/dist/agent-identity/index.cjs +157 -0
  5. package/dist/agent-identity/index.cjs.map +1 -0
  6. package/dist/agent-identity/index.d.cts +35 -0
  7. package/dist/agent-identity/index.d.ts +35 -0
  8. package/dist/agent-identity/index.js +127 -0
  9. package/dist/agent-identity/index.js.map +1 -0
  10. package/dist/chat/index.cjs +1281 -0
  11. package/dist/chat/index.cjs.map +1 -0
  12. package/dist/chat/index.d.cts +72 -0
  13. package/dist/chat/index.d.ts +72 -0
  14. package/dist/chat/index.js +1239 -0
  15. package/dist/chat/index.js.map +1 -0
  16. package/dist/chat--OifhIRe.d.ts +24 -0
  17. package/dist/chat-ChYl2XjV.d.cts +24 -0
  18. package/dist/confidence/index.cjs +253 -0
  19. package/dist/confidence/index.cjs.map +1 -0
  20. package/dist/confidence/index.d.cts +40 -0
  21. package/dist/confidence/index.d.ts +40 -0
  22. package/dist/confidence/index.js +222 -0
  23. package/dist/confidence/index.js.map +1 -0
  24. package/dist/feedback/index.cjs +186 -0
  25. package/dist/feedback/index.cjs.map +1 -0
  26. package/dist/feedback/index.d.cts +27 -0
  27. package/dist/feedback/index.d.ts +27 -0
  28. package/dist/feedback/index.js +157 -0
  29. package/dist/feedback/index.js.map +1 -0
  30. package/dist/{hooks-B8CSeOsn.d.cts → hooks-BGs8-4GK.d.ts} +4 -99
  31. package/dist/{hooks-B8CSeOsn.d.ts → hooks-DLfF18IU.d.cts} +4 -99
  32. package/dist/hooks.d.cts +4 -1
  33. package/dist/hooks.d.ts +4 -1
  34. package/dist/index-BazLnae1.d.cts +67 -0
  35. package/dist/index-BazLnae1.d.ts +67 -0
  36. package/dist/index.cjs +889 -144
  37. package/dist/index.cjs.map +1 -1
  38. package/dist/index.d.cts +15 -321
  39. package/dist/index.d.ts +15 -321
  40. package/dist/index.js +879 -142
  41. package/dist/index.js.map +1 -1
  42. package/dist/layouts/index.cjs +1588 -0
  43. package/dist/layouts/index.cjs.map +1 -0
  44. package/dist/layouts/index.d.cts +46 -0
  45. package/dist/layouts/index.d.ts +46 -0
  46. package/dist/layouts/index.js +1548 -0
  47. package/dist/layouts/index.js.map +1 -0
  48. package/dist/mcp/index.cjs +522 -0
  49. package/dist/mcp/index.cjs.map +1 -0
  50. package/dist/mcp/index.d.cts +2 -0
  51. package/dist/mcp/index.d.ts +2 -0
  52. package/dist/mcp/index.js +492 -0
  53. package/dist/mcp/index.js.map +1 -0
  54. package/dist/response/index.cjs +519 -0
  55. package/dist/response/index.cjs.map +1 -0
  56. package/dist/response/index.d.cts +44 -0
  57. package/dist/response/index.d.ts +44 -0
  58. package/dist/response/index.js +478 -0
  59. package/dist/response/index.js.map +1 -0
  60. package/dist/sources/index.cjs +243 -0
  61. package/dist/sources/index.cjs.map +1 -0
  62. package/dist/sources/index.d.cts +44 -0
  63. package/dist/sources/index.d.ts +44 -0
  64. package/dist/sources/index.js +212 -0
  65. package/dist/sources/index.js.map +1 -0
  66. package/dist/streaming/index.cjs +531 -0
  67. package/dist/streaming/index.cjs.map +1 -0
  68. package/dist/streaming/index.d.cts +81 -0
  69. package/dist/streaming/index.d.ts +81 -0
  70. package/dist/streaming/index.js +495 -0
  71. package/dist/streaming/index.js.map +1 -0
  72. package/dist/streaming-DbQxScpi.d.ts +39 -0
  73. package/dist/streaming-DfT22A0z.d.cts +39 -0
  74. package/package.json +62 -17
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/feedback/ThumbsFeedback/ThumbsFeedback.tsx","../../src/feedback/FeedbackDialog/FeedbackDialog.tsx","../../src/feedback/FeedbackConfirmation/FeedbackConfirmation.tsx"],"sourcesContent":["import React, { useState } from 'react'\n\ntype FeedbackRating = 'positive' | 'negative'\n\ntype ThumbsFeedbackProps = {\n messageId: string\n onFeedback: (messageId: string, rating: FeedbackRating, comment?: string) => void\n state?: FeedbackRating | null\n onNegative?: () => void\n className?: string\n}\n\nfunction ThumbsFeedback({\n messageId,\n onFeedback,\n state = null,\n onNegative,\n className,\n}: ThumbsFeedbackProps) {\n const [selected, setSelected] = useState<FeedbackRating | null>(state)\n\n const handleClick = (rating: FeedbackRating) => {\n setSelected(rating)\n onFeedback(messageId, rating)\n if (rating === 'negative' && onNegative) {\n onNegative()\n }\n }\n\n return (\n <div\n className={`inline-flex items-center gap-0.5 ${className ?? ''}`}\n role=\"group\"\n aria-label=\"Rate this response\"\n data-testid=\"thumbs-feedback\"\n >\n <button\n type=\"button\"\n onClick={() => handleClick('positive')}\n aria-label=\"Thumbs up\"\n aria-pressed={selected === 'positive'}\n className={`p-1.5 rounded-md transition-colors duration-200 ${\n selected === 'positive'\n ? 'text-brand-cyan bg-brand-cyan/15'\n : 'text-brand-cream/30 hover:text-brand-cyan hover:bg-brand-cyan/10'\n }`}\n data-testid=\"thumbs-up\"\n >\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M7 10v12\" />\n <path d=\"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2h0a3.13 3.13 0 0 1 3 3.88Z\" />\n </svg>\n </button>\n <button\n type=\"button\"\n onClick={() => handleClick('negative')}\n aria-label=\"Thumbs down\"\n aria-pressed={selected === 'negative'}\n className={`p-1.5 rounded-md transition-colors duration-200 ${\n selected === 'negative'\n ? 'text-brand-watermelon bg-brand-watermelon/15'\n : 'text-brand-cream/30 hover:text-brand-watermelon hover:bg-brand-watermelon/10'\n }`}\n data-testid=\"thumbs-down\"\n >\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M17 14V2\" />\n <path d=\"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22h0a3.13 3.13 0 0 1-3-3.88Z\" />\n </svg>\n </button>\n </div>\n )\n}\n\nexport { ThumbsFeedback }\nexport type { ThumbsFeedbackProps, FeedbackRating }\n","import React, { useState } from 'react'\nimport { Dialog, Button, TextArea } from '@surf-kit/core'\n\ntype FeedbackDialogProps = {\n isOpen: boolean\n onClose: () => void\n onSubmit: (comment: string) => void\n className?: string\n}\n\nfunction FeedbackDialog({ isOpen, onClose, onSubmit, className }: FeedbackDialogProps) {\n const [comment, setComment] = useState('')\n\n const handleSubmit = () => {\n onSubmit(comment)\n setComment('')\n onClose()\n }\n\n return (\n <Dialog\n isOpen={isOpen}\n onClose={onClose}\n title=\"Share your feedback\"\n size=\"sm\"\n className={className}\n footer={\n <>\n <Button intent=\"ghost\" onPress={onClose}>\n Cancel\n </Button>\n <Button intent=\"primary\" onPress={handleSubmit} isDisabled={comment.trim().length === 0}>\n Submit\n </Button>\n </>\n }\n >\n <TextArea\n label=\"What could be improved?\"\n value={comment}\n onChange={setComment}\n placeholder=\"Tell us what went wrong or how this response could be better...\"\n rows={4}\n data-testid=\"feedback-textarea\"\n />\n </Dialog>\n )\n}\n\nexport { FeedbackDialog }\nexport type { FeedbackDialogProps }\n","import React from 'react'\n\ntype FeedbackConfirmationProps = {\n variant?: 'inline' | 'toast'\n className?: string\n}\n\nfunction FeedbackConfirmation({ variant = 'inline', className }: FeedbackConfirmationProps) {\n if (variant === 'toast') {\n return (\n <div\n role=\"status\"\n className={`fixed bottom-4 right-4 bg-surface border border-border rounded-lg px-4 py-3 shadow-lg text-sm text-text-primary ${className ?? ''}`}\n data-testid=\"feedback-confirmation\"\n >\n Thanks for your feedback\n </div>\n )\n }\n\n return (\n <span\n role=\"status\"\n className={`text-sm text-text-secondary ${className ?? ''}`}\n data-testid=\"feedback-confirmation\"\n >\n Thanks for your feedback\n </span>\n )\n}\n\nexport { FeedbackConfirmation }\nexport type { FeedbackConfirmationProps }\n"],"mappings":"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","names":["useState","jsx","jsxs","jsx"]}
@@ -1,101 +1,6 @@
1
- import React from 'react';
2
-
3
- interface Source {
4
- title: string;
5
- section?: string;
6
- document_id: string;
7
- url: string;
8
- confidence: number;
9
- snippet: string;
10
- }
11
- interface ConfidenceBreakdown {
12
- overall: 'high' | 'medium' | 'low';
13
- retrieval_quality: number;
14
- source_authority: number;
15
- answer_groundedness: number;
16
- recency: number;
17
- reasoning: string;
18
- }
19
- interface VerificationResult {
20
- status: 'passed' | 'flagged' | 'failed';
21
- flags: string[];
22
- claims_checked: number;
23
- claims_verified: number;
24
- }
25
- interface AgentResponse {
26
- message: string;
27
- sources: Source[];
28
- confidence: ConfidenceBreakdown;
29
- verification: VerificationResult;
30
- ui_hint: 'text' | 'table' | 'card' | 'list' | 'steps' | 'warning';
31
- structured_data: Record<string, unknown> | null;
32
- follow_up_suggestions: string[];
33
- }
34
- interface AgentInfo {
35
- id: string;
36
- label: string;
37
- accent?: string;
38
- icon?: React.ComponentType<{
39
- size?: number;
40
- className?: string;
41
- }>;
42
- }
43
-
44
- interface ChatMessage {
45
- id: string;
46
- role: 'user' | 'assistant';
47
- content: string;
48
- response?: AgentResponse;
49
- agent?: string;
50
- timestamp: Date;
51
- }
52
- interface ConversationSummary {
53
- id: string;
54
- title: string;
55
- lastMessage: string;
56
- updatedAt: Date;
57
- messageCount: number;
58
- }
59
- interface ChatError {
60
- code: 'NETWORK_ERROR' | 'API_ERROR' | 'STREAM_ERROR' | 'TIMEOUT';
61
- message: string;
62
- retryable: boolean;
63
- }
64
-
65
- type StreamEvent = {
66
- type: 'phase';
67
- phase: 'thinking' | 'retrieving' | 'generating' | 'verifying' | 'waiting';
68
- } | {
69
- type: 'delta';
70
- content: string;
71
- } | {
72
- type: 'source';
73
- source: Source;
74
- } | {
75
- type: 'agent';
76
- agent: string;
77
- } | {
78
- type: 'verification';
79
- result: VerificationResult;
80
- } | {
81
- type: 'confidence';
82
- breakdown: ConfidenceBreakdown;
83
- } | {
84
- type: 'done';
85
- response: AgentResponse;
86
- conversation_id?: string;
87
- } | {
88
- type: 'error';
89
- error: ChatError;
90
- };
91
- interface StreamState {
92
- active: boolean;
93
- phase: 'idle' | 'thinking' | 'retrieving' | 'generating' | 'verifying' | 'waiting';
94
- content: string;
95
- sources: Source[];
96
- agent: string | null;
97
- agentLabel: string | null;
98
- }
1
+ import { a as ChatMessage, C as ChatError, b as ConversationSummary } from './chat--OifhIRe.js';
2
+ import { a as StreamState, S as StreamEvent } from './streaming-DbQxScpi.js';
3
+ import { A as AgentInfo } from './agent-BNSmiexZ.js';
99
4
 
100
5
  interface AgentChatConfig {
101
6
  /** Base URL for the agent API */
@@ -229,4 +134,4 @@ interface CharacterDrainResult {
229
134
  */
230
135
  declare function useCharacterDrain(target: string, msPerChar?: number): CharacterDrainResult;
231
136
 
232
- export { type AgentResponse as A, type ChatMessage as C, type FeedbackPayload as F, type Source as S, type UseConversationOptions as U, type VerificationResult as V, type ChatError as a, type ConfidenceBreakdown as b, type AgentInfo as c, type StreamState as d, type ConversationSummary as e, type AgentChatActions as f, type AgentChatConfig as g, type AgentChatState as h, type AgentThemeResult as i, type CharacterDrainResult as j, type Conversation as k, type FeedbackState as l, type StreamEvent as m, type UseFeedbackOptions as n, type UseStreamingOptions as o, useAgentTheme as p, useCharacterDrain as q, useConversation as r, useFeedback as s, useStreaming as t, useAgentChat as u };
137
+ export { type AgentChatActions as A, type CharacterDrainResult as C, type FeedbackPayload as F, type UseConversationOptions as U, type AgentChatConfig as a, type AgentChatState as b, type AgentThemeResult as c, type Conversation as d, type FeedbackState as e, type UseFeedbackOptions as f, type UseStreamingOptions as g, useAgentTheme as h, useCharacterDrain as i, useConversation as j, useFeedback as k, useStreaming as l, useAgentChat as u };
@@ -1,101 +1,6 @@
1
- import React from 'react';
2
-
3
- interface Source {
4
- title: string;
5
- section?: string;
6
- document_id: string;
7
- url: string;
8
- confidence: number;
9
- snippet: string;
10
- }
11
- interface ConfidenceBreakdown {
12
- overall: 'high' | 'medium' | 'low';
13
- retrieval_quality: number;
14
- source_authority: number;
15
- answer_groundedness: number;
16
- recency: number;
17
- reasoning: string;
18
- }
19
- interface VerificationResult {
20
- status: 'passed' | 'flagged' | 'failed';
21
- flags: string[];
22
- claims_checked: number;
23
- claims_verified: number;
24
- }
25
- interface AgentResponse {
26
- message: string;
27
- sources: Source[];
28
- confidence: ConfidenceBreakdown;
29
- verification: VerificationResult;
30
- ui_hint: 'text' | 'table' | 'card' | 'list' | 'steps' | 'warning';
31
- structured_data: Record<string, unknown> | null;
32
- follow_up_suggestions: string[];
33
- }
34
- interface AgentInfo {
35
- id: string;
36
- label: string;
37
- accent?: string;
38
- icon?: React.ComponentType<{
39
- size?: number;
40
- className?: string;
41
- }>;
42
- }
43
-
44
- interface ChatMessage {
45
- id: string;
46
- role: 'user' | 'assistant';
47
- content: string;
48
- response?: AgentResponse;
49
- agent?: string;
50
- timestamp: Date;
51
- }
52
- interface ConversationSummary {
53
- id: string;
54
- title: string;
55
- lastMessage: string;
56
- updatedAt: Date;
57
- messageCount: number;
58
- }
59
- interface ChatError {
60
- code: 'NETWORK_ERROR' | 'API_ERROR' | 'STREAM_ERROR' | 'TIMEOUT';
61
- message: string;
62
- retryable: boolean;
63
- }
64
-
65
- type StreamEvent = {
66
- type: 'phase';
67
- phase: 'thinking' | 'retrieving' | 'generating' | 'verifying' | 'waiting';
68
- } | {
69
- type: 'delta';
70
- content: string;
71
- } | {
72
- type: 'source';
73
- source: Source;
74
- } | {
75
- type: 'agent';
76
- agent: string;
77
- } | {
78
- type: 'verification';
79
- result: VerificationResult;
80
- } | {
81
- type: 'confidence';
82
- breakdown: ConfidenceBreakdown;
83
- } | {
84
- type: 'done';
85
- response: AgentResponse;
86
- conversation_id?: string;
87
- } | {
88
- type: 'error';
89
- error: ChatError;
90
- };
91
- interface StreamState {
92
- active: boolean;
93
- phase: 'idle' | 'thinking' | 'retrieving' | 'generating' | 'verifying' | 'waiting';
94
- content: string;
95
- sources: Source[];
96
- agent: string | null;
97
- agentLabel: string | null;
98
- }
1
+ import { a as ChatMessage, C as ChatError, b as ConversationSummary } from './chat-ChYl2XjV.cjs';
2
+ import { a as StreamState, S as StreamEvent } from './streaming-DfT22A0z.cjs';
3
+ import { A as AgentInfo } from './agent-BNSmiexZ.cjs';
99
4
 
100
5
  interface AgentChatConfig {
101
6
  /** Base URL for the agent API */
@@ -229,4 +134,4 @@ interface CharacterDrainResult {
229
134
  */
230
135
  declare function useCharacterDrain(target: string, msPerChar?: number): CharacterDrainResult;
231
136
 
232
- export { type AgentResponse as A, type ChatMessage as C, type FeedbackPayload as F, type Source as S, type UseConversationOptions as U, type VerificationResult as V, type ChatError as a, type ConfidenceBreakdown as b, type AgentInfo as c, type StreamState as d, type ConversationSummary as e, type AgentChatActions as f, type AgentChatConfig as g, type AgentChatState as h, type AgentThemeResult as i, type CharacterDrainResult as j, type Conversation as k, type FeedbackState as l, type StreamEvent as m, type UseFeedbackOptions as n, type UseStreamingOptions as o, useAgentTheme as p, useCharacterDrain as q, useConversation as r, useFeedback as s, useStreaming as t, useAgentChat as u };
137
+ export { type AgentChatActions as A, type CharacterDrainResult as C, type FeedbackPayload as F, type UseConversationOptions as U, type AgentChatConfig as a, type AgentChatState as b, type AgentThemeResult as c, type Conversation as d, type FeedbackState as e, type UseFeedbackOptions as f, type UseStreamingOptions as g, useAgentTheme as h, useCharacterDrain as i, useConversation as j, useFeedback as k, useStreaming as l, useAgentChat as u };
package/dist/hooks.d.cts CHANGED
@@ -1,2 +1,5 @@
1
- export { f as AgentChatActions, h as AgentChatState, i as AgentThemeResult, j as CharacterDrainResult, k as Conversation, F as FeedbackPayload, l as FeedbackState, U as UseConversationOptions, n as UseFeedbackOptions, o as UseStreamingOptions, u as useAgentChat, p as useAgentTheme, q as useCharacterDrain, r as useConversation, s as useFeedback, t as useStreaming } from './hooks-B8CSeOsn.cjs';
1
+ export { A as AgentChatActions, b as AgentChatState, c as AgentThemeResult, C as CharacterDrainResult, d as Conversation, F as FeedbackPayload, e as FeedbackState, U as UseConversationOptions, f as UseFeedbackOptions, g as UseStreamingOptions, u as useAgentChat, h as useAgentTheme, i as useCharacterDrain, j as useConversation, k as useFeedback, l as useStreaming } from './hooks-DLfF18IU.cjs';
2
+ import './chat-ChYl2XjV.cjs';
3
+ import './agent-BNSmiexZ.cjs';
2
4
  import 'react';
5
+ import './streaming-DfT22A0z.cjs';
package/dist/hooks.d.ts CHANGED
@@ -1,2 +1,5 @@
1
- export { f as AgentChatActions, h as AgentChatState, i as AgentThemeResult, j as CharacterDrainResult, k as Conversation, F as FeedbackPayload, l as FeedbackState, U as UseConversationOptions, n as UseFeedbackOptions, o as UseStreamingOptions, u as useAgentChat, p as useAgentTheme, q as useCharacterDrain, r as useConversation, s as useFeedback, t as useStreaming } from './hooks-B8CSeOsn.js';
1
+ export { A as AgentChatActions, b as AgentChatState, c as AgentThemeResult, C as CharacterDrainResult, d as Conversation, F as FeedbackPayload, e as FeedbackState, U as UseConversationOptions, f as UseFeedbackOptions, g as UseStreamingOptions, u as useAgentChat, h as useAgentTheme, i as useCharacterDrain, j as useConversation, k as useFeedback, l as useStreaming } from './hooks-BGs8-4GK.js';
2
+ import './chat--OifhIRe.js';
3
+ import './agent-BNSmiexZ.js';
2
4
  import 'react';
5
+ import './streaming-DbQxScpi.js';
@@ -0,0 +1,67 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ type MCPToolStatus = 'pending' | 'running' | 'success' | 'error';
4
+ interface MCPToolCallData {
5
+ id: string;
6
+ name: string;
7
+ serverName?: string;
8
+ arguments: Record<string, unknown>;
9
+ result?: unknown;
10
+ error?: string;
11
+ status: MCPToolStatus;
12
+ startedAt?: Date;
13
+ completedAt?: Date;
14
+ }
15
+ interface MCPResource {
16
+ uri: string;
17
+ name: string;
18
+ mimeType?: string;
19
+ description?: string;
20
+ content?: string | Uint8Array;
21
+ }
22
+ interface MCPServerInfo {
23
+ name: string;
24
+ version?: string;
25
+ status: 'connected' | 'disconnected' | 'error';
26
+ tools: {
27
+ name: string;
28
+ description?: string;
29
+ }[];
30
+ resources: {
31
+ uri: string;
32
+ name: string;
33
+ }[];
34
+ lastPing?: Date;
35
+ }
36
+
37
+ type MCPToolCallProps = {
38
+ call: MCPToolCallData;
39
+ isExpanded?: boolean;
40
+ onToggleExpand?: () => void;
41
+ className?: string;
42
+ };
43
+ declare function MCPToolCall({ call, isExpanded, onToggleExpand, className }: MCPToolCallProps): react_jsx_runtime.JSX.Element;
44
+
45
+ type MCPResourceViewProps = {
46
+ resource: MCPResource;
47
+ className?: string;
48
+ };
49
+ declare function MCPResourceView({ resource, className }: MCPResourceViewProps): react_jsx_runtime.JSX.Element;
50
+
51
+ type MCPServerStatusProps = {
52
+ server: MCPServerInfo;
53
+ className?: string;
54
+ };
55
+ declare function MCPServerStatus({ server, className }: MCPServerStatusProps): react_jsx_runtime.JSX.Element;
56
+
57
+ type MCPApprovalDialogProps = {
58
+ call: MCPToolCallData;
59
+ riskLevel?: 'low' | 'medium' | 'high';
60
+ onApprove: () => void;
61
+ onDeny: () => void;
62
+ isOpen: boolean;
63
+ className?: string;
64
+ };
65
+ declare function MCPApprovalDialog({ call, riskLevel, onApprove, onDeny, isOpen, className, }: MCPApprovalDialogProps): react_jsx_runtime.JSX.Element | null;
66
+
67
+ export { MCPApprovalDialog as M, type MCPApprovalDialogProps as a, type MCPResource as b, MCPResourceView as c, type MCPResourceViewProps as d, type MCPServerInfo as e, MCPServerStatus as f, type MCPServerStatusProps as g, MCPToolCall as h, type MCPToolCallData as i, type MCPToolCallProps as j, type MCPToolStatus as k };
@@ -0,0 +1,67 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ type MCPToolStatus = 'pending' | 'running' | 'success' | 'error';
4
+ interface MCPToolCallData {
5
+ id: string;
6
+ name: string;
7
+ serverName?: string;
8
+ arguments: Record<string, unknown>;
9
+ result?: unknown;
10
+ error?: string;
11
+ status: MCPToolStatus;
12
+ startedAt?: Date;
13
+ completedAt?: Date;
14
+ }
15
+ interface MCPResource {
16
+ uri: string;
17
+ name: string;
18
+ mimeType?: string;
19
+ description?: string;
20
+ content?: string | Uint8Array;
21
+ }
22
+ interface MCPServerInfo {
23
+ name: string;
24
+ version?: string;
25
+ status: 'connected' | 'disconnected' | 'error';
26
+ tools: {
27
+ name: string;
28
+ description?: string;
29
+ }[];
30
+ resources: {
31
+ uri: string;
32
+ name: string;
33
+ }[];
34
+ lastPing?: Date;
35
+ }
36
+
37
+ type MCPToolCallProps = {
38
+ call: MCPToolCallData;
39
+ isExpanded?: boolean;
40
+ onToggleExpand?: () => void;
41
+ className?: string;
42
+ };
43
+ declare function MCPToolCall({ call, isExpanded, onToggleExpand, className }: MCPToolCallProps): react_jsx_runtime.JSX.Element;
44
+
45
+ type MCPResourceViewProps = {
46
+ resource: MCPResource;
47
+ className?: string;
48
+ };
49
+ declare function MCPResourceView({ resource, className }: MCPResourceViewProps): react_jsx_runtime.JSX.Element;
50
+
51
+ type MCPServerStatusProps = {
52
+ server: MCPServerInfo;
53
+ className?: string;
54
+ };
55
+ declare function MCPServerStatus({ server, className }: MCPServerStatusProps): react_jsx_runtime.JSX.Element;
56
+
57
+ type MCPApprovalDialogProps = {
58
+ call: MCPToolCallData;
59
+ riskLevel?: 'low' | 'medium' | 'high';
60
+ onApprove: () => void;
61
+ onDeny: () => void;
62
+ isOpen: boolean;
63
+ className?: string;
64
+ };
65
+ declare function MCPApprovalDialog({ call, riskLevel, onApprove, onDeny, isOpen, className, }: MCPApprovalDialogProps): react_jsx_runtime.JSX.Element | null;
66
+
67
+ export { MCPApprovalDialog as M, type MCPApprovalDialogProps as a, type MCPResource as b, MCPResourceView as c, type MCPResourceViewProps as d, type MCPServerInfo as e, MCPServerStatus as f, type MCPServerStatusProps as g, MCPToolCall as h, type MCPToolCallData as i, type MCPToolCallProps as j, type MCPToolStatus as k };