@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,174 @@
1
+ import { getDefaultClient } from './chunk-ANWOL7SM.js';
2
+
3
+ // src/mcp/plugin-shell/tools.ts
4
+ function annotateTool(tool, annotations, outputSchema) {
5
+ return {
6
+ ...tool,
7
+ annotations,
8
+ ...outputSchema ? { outputSchema } : {}
9
+ };
10
+ }
11
+ var shellCommandEvidenceOutputSchema = {
12
+ type: "object",
13
+ properties: {
14
+ command: { type: "string" },
15
+ cwd: { type: "string" },
16
+ exitCode: { type: "number" },
17
+ stdout: { type: "string" },
18
+ stderr: { type: "string" },
19
+ error: { type: "string" },
20
+ durationMs: { type: "number" },
21
+ usedFallback: { type: "boolean" }
22
+ },
23
+ required: ["command", "exitCode", "stdout", "stderr", "durationMs", "usedFallback"]
24
+ };
25
+ var shellSessionSnapshotEvidenceOutputSchema = {
26
+ type: "object",
27
+ properties: {
28
+ projectPath: { type: "string" },
29
+ cwd: { type: "string" },
30
+ promptLabel: { type: "string" },
31
+ isRunning: { type: "boolean" },
32
+ lastExitCode: { type: "number" },
33
+ lastDurationMs: { type: "number" },
34
+ lastCommandAt: { type: "number" },
35
+ historyCount: { type: "number" },
36
+ entryCount: { type: "number" }
37
+ },
38
+ required: ["projectPath", "cwd", "promptLabel", "isRunning", "historyCount", "entryCount"]
39
+ };
40
+ var sessionTools = [
41
+ annotateTool({
42
+ name: "shell-get_session",
43
+ description: "\u83B7\u53D6\u5F53\u524D Shell \u4F1A\u8BDD\u5FEB\u7167\uFF0C\u5305\u62EC projectPath\u3001cwd\u3001\u8FD0\u884C\u72B6\u6001\u3001\u6700\u8FD1\u4E00\u6B21\u6267\u884C\u7ED3\u679C\u548C prompt \u4FE1\u606F\u3002",
44
+ inputSchema: {
45
+ type: "object",
46
+ properties: {}
47
+ }
48
+ }, {
49
+ operationKind: "read",
50
+ requiresExecutionEvidence: false,
51
+ rawDomain: "shell"
52
+ }, {
53
+ type: "object",
54
+ properties: {
55
+ projectPath: { type: "string" },
56
+ cwd: { type: "string" },
57
+ promptLabel: { type: "string" },
58
+ isRunning: { type: "boolean" },
59
+ lastExitCode: { type: "number" },
60
+ lastDurationMs: { type: "number" },
61
+ lastCommandAt: { type: "number" },
62
+ historyCount: { type: "number" },
63
+ entryCount: { type: "number" }
64
+ }
65
+ }),
66
+ annotateTool({
67
+ name: "shell-get_entries",
68
+ description: "\u8BFB\u53D6\u5F53\u524D Shell \u8F93\u51FA\u6D41\uFF0C\u7528\u4E8E\u7406\u89E3\u5386\u53F2\u547D\u4EE4\u3001stdout\u3001stderr \u548C meta \u4FE1\u606F\u3002",
69
+ inputSchema: {
70
+ type: "object",
71
+ properties: {
72
+ limit: {
73
+ type: "number",
74
+ description: "\u53EF\u9009\uFF0C\u8FD4\u56DE\u6700\u8FD1\u591A\u5C11\u6761\u8BB0\u5F55\uFF0C\u9ED8\u8BA4 200\u3002"
75
+ }
76
+ }
77
+ }
78
+ }, {
79
+ operationKind: "read",
80
+ requiresExecutionEvidence: false,
81
+ rawDomain: "shell"
82
+ }, {
83
+ type: "object",
84
+ properties: {
85
+ entries: {
86
+ type: "array",
87
+ items: {
88
+ type: "object",
89
+ properties: {
90
+ id: { type: "number" },
91
+ level: { type: "string" },
92
+ content: { type: "string" },
93
+ createdAt: { type: "number" }
94
+ }
95
+ }
96
+ }
97
+ }
98
+ })
99
+ ];
100
+ var commandTools = [
101
+ annotateTool({
102
+ name: "shell-run_command",
103
+ description: "\u5728\u5F53\u524D Shell \u4F1A\u8BDD\u4E0A\u4E0B\u6587\u4E2D\u6267\u884C\u547D\u4EE4\u3002\u652F\u6301 cwd / timeout\uFF0C\u547D\u4EE4\u7ED3\u679C\u4F1A\u5199\u5165 Shell \u8F93\u51FA\u6D41\u5E76\u8FD4\u56DE\u6267\u884C\u8BE6\u60C5\u3002",
104
+ inputSchema: {
105
+ type: "object",
106
+ properties: {
107
+ command: { type: "string", description: "\u8981\u6267\u884C\u7684\u547D\u4EE4" },
108
+ cwd: { type: "string", description: "\u53EF\u9009\uFF0C\u8986\u76D6\u5F53\u524D\u4F1A\u8BDD\u5DE5\u4F5C\u76EE\u5F55" },
109
+ timeout: { type: "number", description: "\u53EF\u9009\uFF0C\u8D85\u65F6\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09" }
110
+ },
111
+ required: ["command"]
112
+ }
113
+ }, {
114
+ operationKind: "system",
115
+ requiresExecutionEvidence: true,
116
+ rawDomain: "shell"
117
+ }, shellCommandEvidenceOutputSchema),
118
+ annotateTool({
119
+ name: "shell-set_cwd",
120
+ description: "\u8BBE\u7F6E\u5F53\u524D Shell \u4F1A\u8BDD\u7684\u5DE5\u4F5C\u76EE\u5F55\uFF0C\u4E0D\u6267\u884C\u547D\u4EE4\u3002\u7528\u4E8E\u663E\u5F0F\u5207\u6362\u4E0A\u4E0B\u6587\u76EE\u5F55\u3002",
121
+ inputSchema: {
122
+ type: "object",
123
+ properties: {
124
+ cwd: { type: "string", description: "\u76EE\u6807\u5DE5\u4F5C\u76EE\u5F55" }
125
+ },
126
+ required: ["cwd"]
127
+ }
128
+ }, {
129
+ operationKind: "mutate",
130
+ requiresExecutionEvidence: true,
131
+ rawDomain: "shell"
132
+ }, shellSessionSnapshotEvidenceOutputSchema),
133
+ annotateTool({
134
+ name: "shell-clear_output",
135
+ description: "\u6E05\u7A7A\u5F53\u524D Shell \u8F93\u51FA\u6D41\uFF0C\u4F46\u4FDD\u7559\u4F1A\u8BDD\u4E0A\u4E0B\u6587\u548C\u547D\u4EE4\u5386\u53F2\u3002",
136
+ inputSchema: {
137
+ type: "object",
138
+ properties: {}
139
+ }
140
+ }, {
141
+ operationKind: "mutate",
142
+ requiresExecutionEvidence: true,
143
+ rawDomain: "shell"
144
+ }, shellSessionSnapshotEvidenceOutputSchema),
145
+ annotateTool({
146
+ name: "shell-reset_session",
147
+ description: "\u91CD\u7F6E\u5F53\u524D Shell \u4F1A\u8BDD\uFF0Ccwd \u56DE\u5230 projectPath\uFF0C\u6E05\u7A7A\u8F93\u51FA\u548C\u6700\u8FD1\u4E00\u6B21\u6267\u884C\u72B6\u6001\u3002",
148
+ inputSchema: {
149
+ type: "object",
150
+ properties: {}
151
+ }
152
+ }, {
153
+ operationKind: "mutate",
154
+ requiresExecutionEvidence: true,
155
+ rawDomain: "shell"
156
+ }, shellSessionSnapshotEvidenceOutputSchema)
157
+ ];
158
+ var tools = [
159
+ ...sessionTools,
160
+ ...commandTools
161
+ ];
162
+ async function callTool(name, args = {}) {
163
+ return getDefaultClient().callTool(name, args);
164
+ }
165
+ var shellPlugin = {
166
+ getSession: () => callTool("shell-get_session", {}),
167
+ getEntries: (limit) => callTool("shell-get_entries", { limit }),
168
+ runCommand: (command, cwd, timeout) => callTool("shell-run_command", { command, cwd, timeout }),
169
+ setCwd: (cwd) => callTool("shell-set_cwd", { cwd }),
170
+ clearOutput: () => callTool("shell-clear_output", {}),
171
+ resetSession: () => callTool("shell-reset_session", {})
172
+ };
173
+
174
+ export { commandTools, sessionTools, shellPlugin, tools };