@seastudio/sdk 3.0.5 → 3.2.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 (31) hide show
  1. package/README.md +8 -0
  2. package/dist/{chunk-E33WZ4UI.cjs → chunk-B4SSXXGO.cjs} +4 -4
  3. package/dist/{chunk-IBRD7E5X.js → chunk-JECBSAOI.js} +1 -1
  4. package/dist/{chunk-7I3A4U6V.cjs → chunk-UISZZGNC.cjs} +15 -1
  5. package/dist/{chunk-4QK6VMIM.js → chunk-ZP2QGNBN.js} +15 -1
  6. package/dist/index.cjs +24 -24
  7. package/dist/index.js +2 -2
  8. package/dist/mcp/index.cjs +24 -24
  9. package/dist/mcp/index.js +2 -2
  10. package/dist/mcp/seastudio/index.cjs +24 -24
  11. package/dist/mcp/seastudio/index.d.cts +49 -1
  12. package/dist/mcp/seastudio/index.d.ts +49 -1
  13. package/dist/mcp/seastudio/index.js +1 -1
  14. package/package.json +5 -20
  15. package/bin/seastudio.js +0 -3
  16. package/dist/develop-tool/cli/index.cjs +0 -1210
  17. package/dist/develop-tool/cli/index.d.cts +0 -1
  18. package/dist/develop-tool/cli/index.d.ts +0 -1
  19. package/dist/develop-tool/cli/index.js +0 -1199
  20. package/src/develop-tool/templates/plugin/README.md.tmpl +0 -36
  21. package/src/develop-tool/templates/plugin/frontend/index.html.tmpl +0 -12
  22. package/src/develop-tool/templates/plugin/frontend/package.json.tmpl +0 -30
  23. package/src/develop-tool/templates/plugin/frontend/postcss.config.js +0 -6
  24. package/src/develop-tool/templates/plugin/frontend/src/App.css +0 -43
  25. package/src/develop-tool/templates/plugin/frontend/src/App.tsx.tmpl +0 -43
  26. package/src/develop-tool/templates/plugin/frontend/src/main.tsx +0 -13
  27. package/src/develop-tool/templates/plugin/frontend/src/mcp-entry.ts.tmpl +0 -12
  28. package/src/develop-tool/templates/plugin/frontend/src/vite-env.d.ts +0 -1
  29. package/src/develop-tool/templates/plugin/frontend/tsconfig.json +0 -20
  30. package/src/develop-tool/templates/plugin/frontend/vite.config.ts +0 -12
  31. package/src/develop-tool/templates/plugin/seastudio.config.json.tmpl +0 -14
@@ -1,36 +0,0 @@
1
- # {{pluginName}}
2
-
3
- SeaStudio 第三方插件
4
-
5
- ## 开发
6
-
7
- ```bash
8
- cd frontend
9
- npm install
10
- npm run dev
11
- ```
12
-
13
- ## 构建
14
-
15
- ```bash
16
- cd frontend
17
- npm run build
18
- ```
19
-
20
- ## 打包
21
-
22
- ```bash
23
- seastudio pack
24
- ```
25
-
26
- 打包后会生成 `{{protocolHost}}.seaplugin` 文件。
27
-
28
- ## 安装
29
-
30
- 1. 打开 SeaStudio
31
- 2. 设置 → 插件管理 → 添加插件
32
- 3. 选择 `.seaplugin` 文件
33
-
34
- ## 许可证
35
-
36
- MIT
@@ -1,12 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="zh-CN">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <title>{{pluginName}}</title>
7
- </head>
8
- <body>
9
- <div id="root"></div>
10
- <script type="module" src="/src/main.tsx"></script>
11
- </body>
12
- </html>
@@ -1,30 +0,0 @@
1
- {
2
- "name": "{{pluginId}}-frontend",
3
- "private": true,
4
- "version": "1.0.0",
5
- "type": "module",
6
- "scripts": {
7
- "dev": "vite",
8
- "build": "tsc && vite build && npx seastudio generate-mcp-manifest",
9
- "preview": "vite preview",
10
- "pack": "cd .. && npx seastudio pack"
11
- },
12
- "dependencies": {
13
- "react": "^19.0.0",
14
- "react-dom": "^19.0.0",
15
- "lucide-react": "^0.400.0",
16
- "@seastudio/sdk": "^3.0.3"
17
- },
18
- "devDependencies": {
19
- "@tailwindcss/postcss": "^4.0.0",
20
- "@tailwindcss/vite": "^4.0.0",
21
- "@types/react": "^19.0.0",
22
- "@types/react-dom": "^19.0.0",
23
- "@vitejs/plugin-react": "^4.3.0",
24
- "autoprefixer": "^10.4.0",
25
- "postcss": "^8.5.0",
26
- "tailwindcss": "^4.0.0",
27
- "typescript": "^5.4.0",
28
- "vite": "^6.0.0"
29
- }
30
- }
@@ -1,6 +0,0 @@
1
- export default {
2
- plugins: {
3
- '@tailwindcss/postcss': {},
4
- autoprefixer: {},
5
- },
6
- };
@@ -1,43 +0,0 @@
1
- @import 'tailwindcss';
2
-
3
- :root {
4
- --background: 20 14% 4%;
5
- --foreground: 0 0% 95%;
6
- --muted: 0 0% 15%;
7
- --muted-foreground: 0 0% 64%;
8
- --border: 0 0% 14%;
9
- --primary: 0 0% 98%;
10
- --primary-foreground: 0 0% 9%;
11
- }
12
-
13
- * {
14
- margin: 0;
15
- padding: 0;
16
- box-sizing: border-box;
17
- }
18
-
19
- body {
20
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
21
- background-color: hsl(var(--background));
22
- color: hsl(var(--foreground));
23
- }
24
-
25
- .bg-background {
26
- background-color: hsl(var(--background));
27
- }
28
-
29
- .text-foreground {
30
- color: hsl(var(--foreground));
31
- }
32
-
33
- .bg-muted\/50 {
34
- background-color: hsl(var(--muted) / 0.5);
35
- }
36
-
37
- .text-muted-foreground {
38
- color: hsl(var(--muted-foreground));
39
- }
40
-
41
- .border-border {
42
- border-color: hsl(var(--border));
43
- }
@@ -1,43 +0,0 @@
1
- import { useState, useEffect } from 'react';
2
- import { callHostTool } from '@seastudio/sdk';
3
-
4
- function App() {
5
- const [projectPath, setProjectPath] = useState<string>('');
6
- const [loading, setLoading] = useState(true);
7
-
8
- useEffect(() => {
9
- callHostTool('seastudio-project_get_path', {})
10
- .then((result) => {
11
- if (result.content?.[0]?.text) {
12
- const data = JSON.parse(result.content[0].text);
13
- setProjectPath(data.path || '');
14
- }
15
- })
16
- .catch(console.error)
17
- .finally(() => setLoading(false));
18
- }, []);
19
-
20
- return (
21
- <div className="min-h-screen bg-background text-foreground p-6">
22
- <h1 className="text-2xl font-bold mb-4">{{pluginName}}</h1>
23
-
24
- <div className="space-y-4">
25
- <div className="p-4 rounded-lg bg-muted/50 border border-border">
26
- <h2 className="text-sm font-medium text-muted-foreground mb-2">当前项目</h2>
27
- <p className="text-sm">
28
- {loading ? '加载中...' : projectPath || '未打开项目'}
29
- </p>
30
- </div>
31
-
32
- <div className="p-4 rounded-lg bg-muted/50 border border-border">
33
- <h2 className="text-sm font-medium text-muted-foreground mb-2">开始开发</h2>
34
- <p className="text-sm text-muted-foreground">
35
- 编辑此文件 (src/App.tsx) 开始构建你的插件。
36
- </p>
37
- </div>
38
- </div>
39
- </div>
40
- );
41
- }
42
-
43
- export default App;
@@ -1,13 +0,0 @@
1
- import { StrictMode } from 'react';
2
- import { createRoot } from 'react-dom/client';
3
- import App from './App';
4
- import './App.css';
5
- import { initPluginMCPServer } from './mcp-entry';
6
-
7
- initPluginMCPServer();
8
-
9
- createRoot(document.getElementById('root')!).render(
10
- <StrictMode>
11
- <App />
12
- </StrictMode>
13
- );
@@ -1,12 +0,0 @@
1
- import type { MCPServer, MCPTool, PluginMCPManifest } from '@seastudio/sdk/mcp/core'
2
-
3
- export const mcpTools: MCPTool[] = []
4
-
5
- export const pluginMcpManifest: PluginMCPManifest = {
6
- schemaVersion: 1,
7
- tools: mcpTools,
8
- }
9
-
10
- export function initPluginMCPServer(_server?: MCPServer): void {
11
- // 在这里初始化并注册插件自己的 MCP tools handlers。
12
- }
@@ -1 +0,0 @@
1
- /// <reference types="vite/client" />
@@ -1,20 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2020",
4
- "useDefineForClassFields": true,
5
- "lib": ["ES2020", "DOM", "DOM.Iterable"],
6
- "module": "ESNext",
7
- "skipLibCheck": true,
8
- "moduleResolution": "bundler",
9
- "allowImportingTsExtensions": true,
10
- "resolveJsonModule": true,
11
- "isolatedModules": true,
12
- "noEmit": true,
13
- "jsx": "react-jsx",
14
- "strict": true,
15
- "noUnusedLocals": true,
16
- "noUnusedParameters": true,
17
- "noFallthroughCasesInSwitch": true
18
- },
19
- "include": ["src"]
20
- }
@@ -1,12 +0,0 @@
1
- import { defineConfig } from 'vite';
2
- import react from '@vitejs/plugin-react';
3
- import tailwindcss from '@tailwindcss/vite';
4
-
5
- export default defineConfig({
6
- plugins: [react(), tailwindcss()],
7
- base: './',
8
- build: {
9
- outDir: 'dist',
10
- emptyOutDir: true,
11
- },
12
- });
@@ -1,14 +0,0 @@
1
- {
2
- "type": "plugin",
3
- "id": "{{pluginId}}",
4
- "name": "{{pluginName}}",
5
- "version": "1.0.0",
6
- "category": "{{category}}",
7
- "protocolHost": "{{protocolHost}}",
8
- "frontendDir": "frontend",
9
- "tab": {
10
- "id": "{{protocolHost}}",
11
- "title": "{{pluginName}}"
12
- },
13
- "mcpTools": []
14
- }