@seastudio/sdk 3.0.0

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 (77) hide show
  1. package/README.md +108 -0
  2. package/bin/seastudio.js +3 -0
  3. package/dist/chunk-4ITOR5QE.js +901 -0
  4. package/dist/chunk-5QAINQWV.js +94 -0
  5. package/dist/chunk-6USQFZRH.js +291 -0
  6. package/dist/chunk-AGBZJGTY.cjs +1311 -0
  7. package/dist/chunk-ANWOL7SM.js +566 -0
  8. package/dist/chunk-BWG45ZWF.cjs +305 -0
  9. package/dist/chunk-CVF4QHS6.cjs +436 -0
  10. package/dist/chunk-DDVRUPMZ.js +1293 -0
  11. package/dist/chunk-DSOSHJH2.js +643 -0
  12. package/dist/chunk-FLATZQA2.js +174 -0
  13. package/dist/chunk-HJJTBVKQ.cjs +909 -0
  14. package/dist/chunk-ISI2OLPI.cjs +179 -0
  15. package/dist/chunk-MYURVLGP.cjs +165 -0
  16. package/dist/chunk-N33Y5NY7.cjs +105 -0
  17. package/dist/chunk-QD4KISXM.js +160 -0
  18. package/dist/chunk-SNGU4SHO.cjs +654 -0
  19. package/dist/chunk-TFOJLA2F.cjs +588 -0
  20. package/dist/chunk-Z7LV7DCO.js +429 -0
  21. package/dist/develop-tool/cli/index.cjs +1138 -0
  22. package/dist/develop-tool/cli/index.d.cts +1 -0
  23. package/dist/develop-tool/cli/index.d.ts +1 -0
  24. package/dist/develop-tool/cli/index.js +1127 -0
  25. package/dist/index.cjs +370 -0
  26. package/dist/index.d.cts +11 -0
  27. package/dist/index.d.ts +11 -0
  28. package/dist/index.js +9 -0
  29. package/dist/mcp/core/index.cjs +90 -0
  30. package/dist/mcp/core/index.d.cts +124 -0
  31. package/dist/mcp/core/index.d.ts +124 -0
  32. package/dist/mcp/core/index.js +1 -0
  33. package/dist/mcp/index.cjs +317 -0
  34. package/dist/mcp/index.d.cts +123 -0
  35. package/dist/mcp/index.d.ts +123 -0
  36. package/dist/mcp/index.js +8 -0
  37. package/dist/mcp/plugin-editor/index.cjs +47 -0
  38. package/dist/mcp/plugin-editor/index.d.cts +98 -0
  39. package/dist/mcp/plugin-editor/index.d.ts +98 -0
  40. package/dist/mcp/plugin-editor/index.js +2 -0
  41. package/dist/mcp/plugin-excel/index.cjs +31 -0
  42. package/dist/mcp/plugin-excel/index.d.cts +86 -0
  43. package/dist/mcp/plugin-excel/index.d.ts +86 -0
  44. package/dist/mcp/plugin-excel/index.js +2 -0
  45. package/dist/mcp/plugin-preview/index.cjs +23 -0
  46. package/dist/mcp/plugin-preview/index.d.cts +109 -0
  47. package/dist/mcp/plugin-preview/index.d.ts +109 -0
  48. package/dist/mcp/plugin-preview/index.js +2 -0
  49. package/dist/mcp/plugin-seaflow/index.cjs +35 -0
  50. package/dist/mcp/plugin-seaflow/index.d.cts +318 -0
  51. package/dist/mcp/plugin-seaflow/index.d.ts +318 -0
  52. package/dist/mcp/plugin-seaflow/index.js +2 -0
  53. package/dist/mcp/seastudio/index.cjs +75 -0
  54. package/dist/mcp/seastudio/index.d.cts +341 -0
  55. package/dist/mcp/seastudio/index.d.ts +341 -0
  56. package/dist/mcp/seastudio/index.js +2 -0
  57. package/dist/tools-LMW67LIY.js +2 -0
  58. package/dist/tools-TU7PBMDO.cjs +23 -0
  59. package/dist/types-Clgf5gBf.d.cts +107 -0
  60. package/dist/types-Clgf5gBf.d.ts +107 -0
  61. package/dist/ui/index.cjs +58 -0
  62. package/dist/ui/index.d.cts +142 -0
  63. package/dist/ui/index.d.ts +142 -0
  64. package/dist/ui/index.js +1 -0
  65. package/package.json +115 -0
  66. package/src/develop-tool/templates/plugin/README.md.tmpl +36 -0
  67. package/src/develop-tool/templates/plugin/frontend/index.html.tmpl +12 -0
  68. package/src/develop-tool/templates/plugin/frontend/package.json.tmpl +30 -0
  69. package/src/develop-tool/templates/plugin/frontend/postcss.config.js +6 -0
  70. package/src/develop-tool/templates/plugin/frontend/src/App.css +43 -0
  71. package/src/develop-tool/templates/plugin/frontend/src/App.tsx.tmpl +43 -0
  72. package/src/develop-tool/templates/plugin/frontend/src/main.tsx +10 -0
  73. package/src/develop-tool/templates/plugin/frontend/src/vite-env.d.ts +1 -0
  74. package/src/develop-tool/templates/plugin/frontend/tsconfig.json +20 -0
  75. package/src/develop-tool/templates/plugin/frontend/vite.config.ts +12 -0
  76. package/src/develop-tool/templates/plugin/seastudio.config.json.tmpl +14 -0
  77. package/src/ui/cosmos.css +407 -0
@@ -0,0 +1,23 @@
1
+ 'use strict';
2
+
3
+ var chunkISI2OLPI_cjs = require('./chunk-ISI2OLPI.cjs');
4
+ require('./chunk-TFOJLA2F.cjs');
5
+
6
+
7
+
8
+ Object.defineProperty(exports, "commandTools", {
9
+ enumerable: true,
10
+ get: function () { return chunkISI2OLPI_cjs.commandTools; }
11
+ });
12
+ Object.defineProperty(exports, "sessionTools", {
13
+ enumerable: true,
14
+ get: function () { return chunkISI2OLPI_cjs.sessionTools; }
15
+ });
16
+ Object.defineProperty(exports, "shellPlugin", {
17
+ enumerable: true,
18
+ get: function () { return chunkISI2OLPI_cjs.shellPlugin; }
19
+ });
20
+ Object.defineProperty(exports, "tools", {
21
+ enumerable: true,
22
+ get: function () { return chunkISI2OLPI_cjs.tools; }
23
+ });
@@ -0,0 +1,107 @@
1
+ /**
2
+ * MCP Core Types
3
+ *
4
+ * JSON-RPC 2.0 + MCP 协议类型定义
5
+ */
6
+ interface JSONRPCRequest {
7
+ jsonrpc: '2.0';
8
+ id: string | number;
9
+ method: string;
10
+ params?: Record<string, unknown>;
11
+ }
12
+ interface JSONRPCResponse {
13
+ jsonrpc: '2.0';
14
+ id: string | number;
15
+ result?: unknown;
16
+ error?: JSONRPCError;
17
+ }
18
+ interface JSONRPCError {
19
+ code: number;
20
+ message: string;
21
+ data?: unknown;
22
+ }
23
+ interface JSONRPCNotification {
24
+ jsonrpc: '2.0';
25
+ method: string;
26
+ params?: Record<string, unknown>;
27
+ }
28
+ type JSONRPCMessage = JSONRPCRequest | JSONRPCResponse | JSONRPCNotification;
29
+ interface MCPToolInputSchema {
30
+ type?: 'object' | 'array' | 'string' | 'number' | 'integer' | 'boolean' | 'null';
31
+ description?: string;
32
+ properties?: Record<string, MCPToolInputSchema>;
33
+ items?: MCPToolInputSchema | MCPToolInputSchema[];
34
+ required?: string[];
35
+ enum?: Array<string | number | boolean | null>;
36
+ oneOf?: MCPToolInputSchema[];
37
+ anyOf?: MCPToolInputSchema[];
38
+ allOf?: MCPToolInputSchema[];
39
+ additionalProperties?: boolean | MCPToolInputSchema;
40
+ default?: unknown;
41
+ [key: string]: unknown;
42
+ }
43
+ interface MCPToolAnnotations {
44
+ operationKind?: 'read' | 'mutate' | 'system' | 'workflow';
45
+ requiresExecutionEvidence?: boolean;
46
+ rawDomain?: 'workspace' | 'filesystem' | 'editor' | 'seaflow' | 'asset' | 'git' | 'preview' | 'shell' | 'excel';
47
+ hostForwarding?: {
48
+ timeoutMs?: number;
49
+ };
50
+ [key: string]: unknown;
51
+ }
52
+ interface MCPTool {
53
+ name: string;
54
+ description: string;
55
+ inputSchema: MCPToolInputSchema;
56
+ outputSchema?: MCPToolInputSchema;
57
+ annotations?: MCPToolAnnotations;
58
+ }
59
+ interface MCPToolResult {
60
+ content: Array<{
61
+ type: 'text' | 'image' | 'resource';
62
+ text?: string;
63
+ data?: string;
64
+ mimeType?: string;
65
+ }>;
66
+ structuredContent?: unknown;
67
+ metadata?: Record<string, unknown>;
68
+ isError?: boolean;
69
+ }
70
+ interface MCPToolCallRequest {
71
+ name: string;
72
+ arguments: Record<string, unknown>;
73
+ }
74
+ type MCPMethod = 'tools/list' | 'tools/call' | 'roots/list' | 'initialize' | 'ping' | 'notifications/subscribe' | 'notifications/unsubscribe' | 'notifications/publish';
75
+ type NotificationHandler = (params: Record<string, unknown>) => void;
76
+ interface SubscribeParams {
77
+ topics: string[];
78
+ }
79
+ interface PublishParams {
80
+ topic: string;
81
+ data: Record<string, unknown>;
82
+ }
83
+ declare function isNotification(message: JSONRPCMessage): message is JSONRPCNotification;
84
+ interface FileItem {
85
+ name: string;
86
+ path: string;
87
+ type: 'file' | 'directory';
88
+ size?: number;
89
+ modifiedTime?: number;
90
+ children?: FileItem[];
91
+ }
92
+ interface FileNode {
93
+ name: string;
94
+ path?: string;
95
+ type: 'file' | 'directory';
96
+ children?: FileNode[];
97
+ }
98
+ interface MCPMessageEnvelope {
99
+ type: 'mcp';
100
+ payload: JSONRPCMessage;
101
+ }
102
+ declare function isMCPMessage(data: unknown): data is MCPMessageEnvelope;
103
+ declare function createRequest(method: string, params?: Record<string, unknown>): JSONRPCRequest;
104
+ declare function createResponse(id: string | number, result?: unknown, error?: JSONRPCError): JSONRPCResponse;
105
+ declare function createNotification(method: string, params?: Record<string, unknown>): JSONRPCNotification;
106
+
107
+ export { type FileItem as F, type JSONRPCError as J, type MCPMessageEnvelope as M, type NotificationHandler as N, type PublishParams as P, type SubscribeParams as S, type FileNode as a, type JSONRPCMessage as b, type JSONRPCNotification as c, type JSONRPCRequest as d, type JSONRPCResponse as e, type MCPMethod as f, type MCPTool as g, type MCPToolAnnotations as h, type MCPToolCallRequest as i, type MCPToolInputSchema as j, type MCPToolResult as k, createNotification as l, createRequest as m, createResponse as n, isMCPMessage as o, isNotification as p };
@@ -0,0 +1,107 @@
1
+ /**
2
+ * MCP Core Types
3
+ *
4
+ * JSON-RPC 2.0 + MCP 协议类型定义
5
+ */
6
+ interface JSONRPCRequest {
7
+ jsonrpc: '2.0';
8
+ id: string | number;
9
+ method: string;
10
+ params?: Record<string, unknown>;
11
+ }
12
+ interface JSONRPCResponse {
13
+ jsonrpc: '2.0';
14
+ id: string | number;
15
+ result?: unknown;
16
+ error?: JSONRPCError;
17
+ }
18
+ interface JSONRPCError {
19
+ code: number;
20
+ message: string;
21
+ data?: unknown;
22
+ }
23
+ interface JSONRPCNotification {
24
+ jsonrpc: '2.0';
25
+ method: string;
26
+ params?: Record<string, unknown>;
27
+ }
28
+ type JSONRPCMessage = JSONRPCRequest | JSONRPCResponse | JSONRPCNotification;
29
+ interface MCPToolInputSchema {
30
+ type?: 'object' | 'array' | 'string' | 'number' | 'integer' | 'boolean' | 'null';
31
+ description?: string;
32
+ properties?: Record<string, MCPToolInputSchema>;
33
+ items?: MCPToolInputSchema | MCPToolInputSchema[];
34
+ required?: string[];
35
+ enum?: Array<string | number | boolean | null>;
36
+ oneOf?: MCPToolInputSchema[];
37
+ anyOf?: MCPToolInputSchema[];
38
+ allOf?: MCPToolInputSchema[];
39
+ additionalProperties?: boolean | MCPToolInputSchema;
40
+ default?: unknown;
41
+ [key: string]: unknown;
42
+ }
43
+ interface MCPToolAnnotations {
44
+ operationKind?: 'read' | 'mutate' | 'system' | 'workflow';
45
+ requiresExecutionEvidence?: boolean;
46
+ rawDomain?: 'workspace' | 'filesystem' | 'editor' | 'seaflow' | 'asset' | 'git' | 'preview' | 'shell' | 'excel';
47
+ hostForwarding?: {
48
+ timeoutMs?: number;
49
+ };
50
+ [key: string]: unknown;
51
+ }
52
+ interface MCPTool {
53
+ name: string;
54
+ description: string;
55
+ inputSchema: MCPToolInputSchema;
56
+ outputSchema?: MCPToolInputSchema;
57
+ annotations?: MCPToolAnnotations;
58
+ }
59
+ interface MCPToolResult {
60
+ content: Array<{
61
+ type: 'text' | 'image' | 'resource';
62
+ text?: string;
63
+ data?: string;
64
+ mimeType?: string;
65
+ }>;
66
+ structuredContent?: unknown;
67
+ metadata?: Record<string, unknown>;
68
+ isError?: boolean;
69
+ }
70
+ interface MCPToolCallRequest {
71
+ name: string;
72
+ arguments: Record<string, unknown>;
73
+ }
74
+ type MCPMethod = 'tools/list' | 'tools/call' | 'roots/list' | 'initialize' | 'ping' | 'notifications/subscribe' | 'notifications/unsubscribe' | 'notifications/publish';
75
+ type NotificationHandler = (params: Record<string, unknown>) => void;
76
+ interface SubscribeParams {
77
+ topics: string[];
78
+ }
79
+ interface PublishParams {
80
+ topic: string;
81
+ data: Record<string, unknown>;
82
+ }
83
+ declare function isNotification(message: JSONRPCMessage): message is JSONRPCNotification;
84
+ interface FileItem {
85
+ name: string;
86
+ path: string;
87
+ type: 'file' | 'directory';
88
+ size?: number;
89
+ modifiedTime?: number;
90
+ children?: FileItem[];
91
+ }
92
+ interface FileNode {
93
+ name: string;
94
+ path?: string;
95
+ type: 'file' | 'directory';
96
+ children?: FileNode[];
97
+ }
98
+ interface MCPMessageEnvelope {
99
+ type: 'mcp';
100
+ payload: JSONRPCMessage;
101
+ }
102
+ declare function isMCPMessage(data: unknown): data is MCPMessageEnvelope;
103
+ declare function createRequest(method: string, params?: Record<string, unknown>): JSONRPCRequest;
104
+ declare function createResponse(id: string | number, result?: unknown, error?: JSONRPCError): JSONRPCResponse;
105
+ declare function createNotification(method: string, params?: Record<string, unknown>): JSONRPCNotification;
106
+
107
+ export { type FileItem as F, type JSONRPCError as J, type MCPMessageEnvelope as M, type NotificationHandler as N, type PublishParams as P, type SubscribeParams as S, type FileNode as a, type JSONRPCMessage as b, type JSONRPCNotification as c, type JSONRPCRequest as d, type JSONRPCResponse as e, type MCPMethod as f, type MCPTool as g, type MCPToolAnnotations as h, type MCPToolCallRequest as i, type MCPToolInputSchema as j, type MCPToolResult as k, createNotification as l, createRequest as m, createResponse as n, isMCPMessage as o, isNotification as p };
@@ -0,0 +1,58 @@
1
+ 'use strict';
2
+
3
+ var chunkBWG45ZWF_cjs = require('../chunk-BWG45ZWF.cjs');
4
+
5
+
6
+
7
+ Object.defineProperty(exports, "DialogBody", {
8
+ enumerable: true,
9
+ get: function () { return chunkBWG45ZWF_cjs.DialogBody; }
10
+ });
11
+ Object.defineProperty(exports, "DialogButton", {
12
+ enumerable: true,
13
+ get: function () { return chunkBWG45ZWF_cjs.DialogButton; }
14
+ });
15
+ Object.defineProperty(exports, "DialogContainer", {
16
+ enumerable: true,
17
+ get: function () { return chunkBWG45ZWF_cjs.DialogContainer; }
18
+ });
19
+ Object.defineProperty(exports, "DialogFooter", {
20
+ enumerable: true,
21
+ get: function () { return chunkBWG45ZWF_cjs.DialogFooter; }
22
+ });
23
+ Object.defineProperty(exports, "DialogHeader", {
24
+ enumerable: true,
25
+ get: function () { return chunkBWG45ZWF_cjs.DialogHeader; }
26
+ });
27
+ Object.defineProperty(exports, "DialogOverlay", {
28
+ enumerable: true,
29
+ get: function () { return chunkBWG45ZWF_cjs.DialogOverlay; }
30
+ });
31
+ Object.defineProperty(exports, "MenuContainer", {
32
+ enumerable: true,
33
+ get: function () { return chunkBWG45ZWF_cjs.MenuContainer; }
34
+ });
35
+ Object.defineProperty(exports, "MenuEmpty", {
36
+ enumerable: true,
37
+ get: function () { return chunkBWG45ZWF_cjs.MenuEmpty; }
38
+ });
39
+ Object.defineProperty(exports, "MenuItem", {
40
+ enumerable: true,
41
+ get: function () { return chunkBWG45ZWF_cjs.MenuItem; }
42
+ });
43
+ Object.defineProperty(exports, "MenuSeparator", {
44
+ enumerable: true,
45
+ get: function () { return chunkBWG45ZWF_cjs.MenuSeparator; }
46
+ });
47
+ Object.defineProperty(exports, "Tab", {
48
+ enumerable: true,
49
+ get: function () { return chunkBWG45ZWF_cjs.Tab; }
50
+ });
51
+ Object.defineProperty(exports, "cn", {
52
+ enumerable: true,
53
+ get: function () { return chunkBWG45ZWF_cjs.cn; }
54
+ });
55
+ Object.defineProperty(exports, "showHostContextMenu", {
56
+ enumerable: true,
57
+ get: function () { return chunkBWG45ZWF_cjs.showHostContextMenu; }
58
+ });
@@ -0,0 +1,142 @@
1
+ import React from 'react';
2
+ import { ClassValue } from 'clsx';
3
+
4
+ /**
5
+ * Tab - 通用标签组件
6
+ *
7
+ * 标准标签样式,用于 ProjectTabs、PluginTabs、AgentPanel 等
8
+ */
9
+
10
+ interface TabProps {
11
+ isActive: boolean;
12
+ onClick: () => void;
13
+ onClose?: () => void;
14
+ icon?: React.ReactNode;
15
+ title?: string;
16
+ className?: string;
17
+ disabled?: boolean;
18
+ }
19
+ declare function Tab({ isActive, onClick, onClose, icon, title, className, disabled, }: TabProps): React.ReactElement;
20
+
21
+ /**
22
+ * Menu - 统一菜单组件
23
+ *
24
+ * 用于右键菜单、下拉菜单等场景
25
+ * 提供一致的样式和交互体验
26
+ */
27
+
28
+ interface MenuContainerProps {
29
+ children: React.ReactNode;
30
+ className?: string;
31
+ }
32
+ interface MenuItemProps {
33
+ label: string;
34
+ icon?: React.ReactNode;
35
+ shortcut?: string;
36
+ disabled?: boolean;
37
+ danger?: boolean;
38
+ onClick: () => void;
39
+ className?: string;
40
+ }
41
+ interface MenuSeparatorProps {
42
+ className?: string;
43
+ }
44
+ interface MenuEmptyProps {
45
+ children: React.ReactNode;
46
+ className?: string;
47
+ }
48
+ /**
49
+ * 菜单容器
50
+ */
51
+ declare function MenuContainer({ children, className, }: MenuContainerProps): React.ReactElement;
52
+ /**
53
+ * 菜单项
54
+ */
55
+ declare function MenuItem({ label, icon, shortcut, disabled, danger, onClick, className, }: MenuItemProps): React.ReactElement;
56
+ /**
57
+ * 菜单分隔线
58
+ */
59
+ declare function MenuSeparator({ className, }: MenuSeparatorProps): React.ReactElement;
60
+ /**
61
+ * 菜单空状态
62
+ */
63
+ declare function MenuEmpty({ children, className, }: MenuEmptyProps): React.ReactElement;
64
+
65
+ interface HostContextMenuItem {
66
+ id: string;
67
+ label: string;
68
+ disabled?: boolean;
69
+ separator?: boolean;
70
+ danger?: boolean;
71
+ }
72
+ interface HostContextMenuResult {
73
+ supported: boolean;
74
+ selectedId: string | null;
75
+ }
76
+ declare function showHostContextMenu(x: number, y: number, items: HostContextMenuItem[]): Promise<HostContextMenuResult>;
77
+
78
+ /**
79
+ * Dialog - 统一弹窗组件
80
+ *
81
+ * 用于确认弹窗、模态弹窗等场景
82
+ * 提供一致的样式和交互体验
83
+ */
84
+
85
+ interface DialogOverlayProps {
86
+ children: React.ReactNode;
87
+ onClose?: () => void;
88
+ className?: string;
89
+ }
90
+ interface DialogContainerProps {
91
+ children: React.ReactNode;
92
+ width?: 'sm' | 'md' | 'lg' | number;
93
+ className?: string;
94
+ }
95
+ interface DialogHeaderProps {
96
+ title: string;
97
+ onClose?: () => void;
98
+ className?: string;
99
+ }
100
+ interface DialogBodyProps {
101
+ children: React.ReactNode;
102
+ className?: string;
103
+ }
104
+ interface DialogFooterProps {
105
+ children: React.ReactNode;
106
+ className?: string;
107
+ }
108
+ interface DialogButtonProps {
109
+ children: React.ReactNode;
110
+ variant?: 'primary' | 'secondary' | 'danger';
111
+ disabled?: boolean;
112
+ onClick: () => void;
113
+ className?: string;
114
+ }
115
+ /**
116
+ * 弹窗背景遮罩
117
+ */
118
+ declare function DialogOverlay({ children, onClose, className, }: DialogOverlayProps): React.ReactElement;
119
+ /**
120
+ * 弹窗容器
121
+ */
122
+ declare function DialogContainer({ children, width, className, }: DialogContainerProps): React.ReactElement;
123
+ /**
124
+ * 弹窗标题栏
125
+ */
126
+ declare function DialogHeader({ title, onClose, className, }: DialogHeaderProps): React.ReactElement;
127
+ /**
128
+ * 弹窗内容区
129
+ */
130
+ declare function DialogBody({ children, className, }: DialogBodyProps): React.ReactElement;
131
+ /**
132
+ * 弹窗底部按钮区
133
+ */
134
+ declare function DialogFooter({ children, className, }: DialogFooterProps): React.ReactElement;
135
+ /**
136
+ * 弹窗按钮
137
+ */
138
+ declare function DialogButton({ children, variant, disabled, onClick, className, }: DialogButtonProps): React.ReactElement;
139
+
140
+ declare function cn(...inputs: ClassValue[]): string;
141
+
142
+ export { DialogBody, type DialogBodyProps, DialogButton, type DialogButtonProps, DialogContainer, type DialogContainerProps, DialogFooter, type DialogFooterProps, DialogHeader, type DialogHeaderProps, DialogOverlay, type DialogOverlayProps, type HostContextMenuItem, type HostContextMenuResult, MenuContainer, type MenuContainerProps, MenuEmpty, type MenuEmptyProps, MenuItem, type MenuItemProps, MenuSeparator, type MenuSeparatorProps, Tab, type TabProps, cn, showHostContextMenu };
@@ -0,0 +1,142 @@
1
+ import React from 'react';
2
+ import { ClassValue } from 'clsx';
3
+
4
+ /**
5
+ * Tab - 通用标签组件
6
+ *
7
+ * 标准标签样式,用于 ProjectTabs、PluginTabs、AgentPanel 等
8
+ */
9
+
10
+ interface TabProps {
11
+ isActive: boolean;
12
+ onClick: () => void;
13
+ onClose?: () => void;
14
+ icon?: React.ReactNode;
15
+ title?: string;
16
+ className?: string;
17
+ disabled?: boolean;
18
+ }
19
+ declare function Tab({ isActive, onClick, onClose, icon, title, className, disabled, }: TabProps): React.ReactElement;
20
+
21
+ /**
22
+ * Menu - 统一菜单组件
23
+ *
24
+ * 用于右键菜单、下拉菜单等场景
25
+ * 提供一致的样式和交互体验
26
+ */
27
+
28
+ interface MenuContainerProps {
29
+ children: React.ReactNode;
30
+ className?: string;
31
+ }
32
+ interface MenuItemProps {
33
+ label: string;
34
+ icon?: React.ReactNode;
35
+ shortcut?: string;
36
+ disabled?: boolean;
37
+ danger?: boolean;
38
+ onClick: () => void;
39
+ className?: string;
40
+ }
41
+ interface MenuSeparatorProps {
42
+ className?: string;
43
+ }
44
+ interface MenuEmptyProps {
45
+ children: React.ReactNode;
46
+ className?: string;
47
+ }
48
+ /**
49
+ * 菜单容器
50
+ */
51
+ declare function MenuContainer({ children, className, }: MenuContainerProps): React.ReactElement;
52
+ /**
53
+ * 菜单项
54
+ */
55
+ declare function MenuItem({ label, icon, shortcut, disabled, danger, onClick, className, }: MenuItemProps): React.ReactElement;
56
+ /**
57
+ * 菜单分隔线
58
+ */
59
+ declare function MenuSeparator({ className, }: MenuSeparatorProps): React.ReactElement;
60
+ /**
61
+ * 菜单空状态
62
+ */
63
+ declare function MenuEmpty({ children, className, }: MenuEmptyProps): React.ReactElement;
64
+
65
+ interface HostContextMenuItem {
66
+ id: string;
67
+ label: string;
68
+ disabled?: boolean;
69
+ separator?: boolean;
70
+ danger?: boolean;
71
+ }
72
+ interface HostContextMenuResult {
73
+ supported: boolean;
74
+ selectedId: string | null;
75
+ }
76
+ declare function showHostContextMenu(x: number, y: number, items: HostContextMenuItem[]): Promise<HostContextMenuResult>;
77
+
78
+ /**
79
+ * Dialog - 统一弹窗组件
80
+ *
81
+ * 用于确认弹窗、模态弹窗等场景
82
+ * 提供一致的样式和交互体验
83
+ */
84
+
85
+ interface DialogOverlayProps {
86
+ children: React.ReactNode;
87
+ onClose?: () => void;
88
+ className?: string;
89
+ }
90
+ interface DialogContainerProps {
91
+ children: React.ReactNode;
92
+ width?: 'sm' | 'md' | 'lg' | number;
93
+ className?: string;
94
+ }
95
+ interface DialogHeaderProps {
96
+ title: string;
97
+ onClose?: () => void;
98
+ className?: string;
99
+ }
100
+ interface DialogBodyProps {
101
+ children: React.ReactNode;
102
+ className?: string;
103
+ }
104
+ interface DialogFooterProps {
105
+ children: React.ReactNode;
106
+ className?: string;
107
+ }
108
+ interface DialogButtonProps {
109
+ children: React.ReactNode;
110
+ variant?: 'primary' | 'secondary' | 'danger';
111
+ disabled?: boolean;
112
+ onClick: () => void;
113
+ className?: string;
114
+ }
115
+ /**
116
+ * 弹窗背景遮罩
117
+ */
118
+ declare function DialogOverlay({ children, onClose, className, }: DialogOverlayProps): React.ReactElement;
119
+ /**
120
+ * 弹窗容器
121
+ */
122
+ declare function DialogContainer({ children, width, className, }: DialogContainerProps): React.ReactElement;
123
+ /**
124
+ * 弹窗标题栏
125
+ */
126
+ declare function DialogHeader({ title, onClose, className, }: DialogHeaderProps): React.ReactElement;
127
+ /**
128
+ * 弹窗内容区
129
+ */
130
+ declare function DialogBody({ children, className, }: DialogBodyProps): React.ReactElement;
131
+ /**
132
+ * 弹窗底部按钮区
133
+ */
134
+ declare function DialogFooter({ children, className, }: DialogFooterProps): React.ReactElement;
135
+ /**
136
+ * 弹窗按钮
137
+ */
138
+ declare function DialogButton({ children, variant, disabled, onClick, className, }: DialogButtonProps): React.ReactElement;
139
+
140
+ declare function cn(...inputs: ClassValue[]): string;
141
+
142
+ export { DialogBody, type DialogBodyProps, DialogButton, type DialogButtonProps, DialogContainer, type DialogContainerProps, DialogFooter, type DialogFooterProps, DialogHeader, type DialogHeaderProps, DialogOverlay, type DialogOverlayProps, type HostContextMenuItem, type HostContextMenuResult, MenuContainer, type MenuContainerProps, MenuEmpty, type MenuEmptyProps, MenuItem, type MenuItemProps, MenuSeparator, type MenuSeparatorProps, Tab, type TabProps, cn, showHostContextMenu };
@@ -0,0 +1 @@
1
+ export { DialogBody, DialogButton, DialogContainer, DialogFooter, DialogHeader, DialogOverlay, MenuContainer, MenuEmpty, MenuItem, MenuSeparator, Tab, cn, showHostContextMenu } from '../chunk-6USQFZRH.js';
package/package.json ADDED
@@ -0,0 +1,115 @@
1
+ {
2
+ "name": "@seastudio/sdk",
3
+ "version": "3.0.0",
4
+ "description": "SeaStudio SDK - UI 组件 + MCP 信息交换中心 + CLI 工具",
5
+ "main": "dist/index.cjs",
6
+ "module": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "type": "module",
9
+ "bin": {
10
+ "seastudio": "bin/seastudio.js"
11
+ },
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/index.d.ts",
15
+ "import": "./dist/index.js",
16
+ "require": "./dist/index.cjs"
17
+ },
18
+ "./ui": {
19
+ "types": "./dist/ui/index.d.ts",
20
+ "import": "./dist/ui/index.js",
21
+ "require": "./dist/ui/index.cjs"
22
+ },
23
+ "./mcp": {
24
+ "types": "./dist/mcp/index.d.ts",
25
+ "import": "./dist/mcp/index.js",
26
+ "require": "./dist/mcp/index.cjs"
27
+ },
28
+ "./mcp/core": {
29
+ "types": "./dist/mcp/core/index.d.ts",
30
+ "import": "./dist/mcp/core/index.js",
31
+ "require": "./dist/mcp/core/index.cjs"
32
+ },
33
+ "./mcp/seastudio": {
34
+ "types": "./dist/mcp/seastudio/index.d.ts",
35
+ "import": "./dist/mcp/seastudio/index.js",
36
+ "require": "./dist/mcp/seastudio/index.cjs"
37
+ },
38
+ "./mcp/plugin-editor": {
39
+ "types": "./dist/mcp/plugin-editor/index.d.ts",
40
+ "import": "./dist/mcp/plugin-editor/index.js",
41
+ "require": "./dist/mcp/plugin-editor/index.cjs"
42
+ },
43
+ "./mcp/plugin-preview": {
44
+ "types": "./dist/mcp/plugin-preview/index.d.ts",
45
+ "import": "./dist/mcp/plugin-preview/index.js",
46
+ "require": "./dist/mcp/plugin-preview/index.cjs"
47
+ },
48
+ "./mcp/plugin-seaflow": {
49
+ "types": "./dist/mcp/plugin-seaflow/index.d.ts",
50
+ "import": "./dist/mcp/plugin-seaflow/index.js",
51
+ "require": "./dist/mcp/plugin-seaflow/index.cjs"
52
+ },
53
+ "./ui/cosmos.css": "./src/ui/cosmos.css",
54
+ "./styles/cosmos.css": "./src/ui/cosmos.css",
55
+ "./mcp/plugin-excel": {
56
+ "types": "./dist/mcp/plugin-excel/index.d.ts",
57
+ "import": "./dist/mcp/plugin-excel/index.js",
58
+ "require": "./dist/mcp/plugin-excel/index.cjs"
59
+ }
60
+ },
61
+ "files": [
62
+ "bin",
63
+ "dist",
64
+ "src/ui/cosmos.css",
65
+ "src/develop-tool/templates"
66
+ ],
67
+ "scripts": {
68
+ "build": "tsup && node -e \"const fs=require('fs');const f='dist/develop-tool/cli/index.js';const c=fs.readFileSync(f,'utf8');if(!c.startsWith('#!')){fs.writeFileSync(f,'#!/usr/bin/env node\\n'+c)}\"",
69
+ "dev": "tsup --watch",
70
+ "prepublishOnly": "npm run build"
71
+ },
72
+ "dependencies": {
73
+ "archiver": "^7.0.1",
74
+ "chalk": "^5.6.2",
75
+ "clsx": "^2.1.0",
76
+ "commander": "^14.0.3",
77
+ "inquirer": "^13.3.0",
78
+ "lucide-react": "^0.469.0",
79
+ "ora": "^9.3.0",
80
+ "tailwind-merge": "^2.2.0",
81
+ "tar": "^7.4.3",
82
+ "unzipper": "^0.12.3"
83
+ },
84
+ "peerDependencies": {
85
+ "react": ">=18.0.0",
86
+ "react-dom": ">=18.0.0"
87
+ },
88
+ "devDependencies": {
89
+ "@types/archiver": "^7.0.0",
90
+ "@types/inquirer": "^9.0.9",
91
+ "@types/react": "^18.2.0",
92
+ "@types/unzipper": "^0.10.10",
93
+ "tailwindcss": "^4.2.1",
94
+ "tsup": "^8.0.0",
95
+ "typescript": "^5.3.0"
96
+ },
97
+ "keywords": [
98
+ "seastudio",
99
+ "sdk",
100
+ "mcp",
101
+ "ui-components"
102
+ ],
103
+ "license": "MIT",
104
+ "publishConfig": {
105
+ "access": "public"
106
+ },
107
+ "repository": {
108
+ "type": "git",
109
+ "url": "git+https://gitlab.internal.ops.haiyiai.tech/seastudio/seastudio-sdk.git"
110
+ },
111
+ "homepage": "https://gitlab.internal.ops.haiyiai.tech/seastudio/seastudio-sdk",
112
+ "bugs": {
113
+ "url": "https://gitlab.internal.ops.haiyiai.tech/seastudio/seastudio-sdk/-/issues"
114
+ }
115
+ }