@seastudio/sdk 3.0.2 → 3.0.4

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 (68) hide show
  1. package/README.md +14 -0
  2. package/bin/seastudio.js +0 -0
  3. package/dist/{chunk-TFOJLA2F.cjs → chunk-3I7UM66P.cjs} +9 -7
  4. package/dist/{chunk-SUF5BPSK.cjs → chunk-3IVOSJIO.cjs} +3 -3
  5. package/dist/chunk-AXT6ZLY2.js +98 -0
  6. package/dist/{chunk-XU5GEWWL.js → chunk-GPM5XGYM.js} +1 -1
  7. package/dist/chunk-PYYG6U4M.cjs +109 -0
  8. package/dist/{chunk-ANWOL7SM.js → chunk-TJ3CGHWJ.js} +9 -7
  9. package/dist/develop-tool/cli/index.cjs +79 -7
  10. package/dist/develop-tool/cli/index.js +79 -7
  11. package/dist/index.cjs +96 -246
  12. package/dist/index.d.cts +3 -8
  13. package/dist/index.d.ts +3 -8
  14. package/dist/index.js +3 -9
  15. package/dist/mcp/core/index.cjs +22 -22
  16. package/dist/mcp/core/index.d.cts +10 -7
  17. package/dist/mcp/core/index.d.ts +10 -7
  18. package/dist/mcp/core/index.js +1 -1
  19. package/dist/mcp/index.cjs +49 -199
  20. package/dist/mcp/index.d.cts +13 -84
  21. package/dist/mcp/index.d.ts +13 -84
  22. package/dist/mcp/index.js +3 -9
  23. package/dist/mcp/seastudio/index.cjs +19 -19
  24. package/dist/mcp/seastudio/index.d.cts +1 -1
  25. package/dist/mcp/seastudio/index.d.ts +1 -1
  26. package/dist/mcp/seastudio/index.js +2 -2
  27. package/dist/{types-B1Zqr-0Q.d.cts → types-CUFTi2bZ.d.cts} +10 -1
  28. package/dist/{types-B1Zqr-0Q.d.ts → types-CUFTi2bZ.d.ts} +10 -1
  29. package/package.json +2 -22
  30. package/src/develop-tool/templates/plugin/frontend/package.json.tmpl +2 -2
  31. package/src/develop-tool/templates/plugin/frontend/src/main.tsx +3 -0
  32. package/src/develop-tool/templates/plugin/frontend/src/mcp-entry.ts.tmpl +12 -0
  33. package/dist/chunk-4ITOR5QE.js +0 -901
  34. package/dist/chunk-CVF4QHS6.cjs +0 -436
  35. package/dist/chunk-DSOSHJH2.js +0 -643
  36. package/dist/chunk-FLATZQA2.js +0 -174
  37. package/dist/chunk-G66KY35N.js +0 -334
  38. package/dist/chunk-HJJTBVKQ.cjs +0 -909
  39. package/dist/chunk-ISI2OLPI.cjs +0 -179
  40. package/dist/chunk-MYURVLGP.cjs +0 -165
  41. package/dist/chunk-ORBVHAAS.cjs +0 -341
  42. package/dist/chunk-QD4KISXM.js +0 -160
  43. package/dist/chunk-S2UIBWKA.js +0 -99
  44. package/dist/chunk-SNGU4SHO.cjs +0 -654
  45. package/dist/chunk-XIPL7VSP.cjs +0 -110
  46. package/dist/chunk-Z7LV7DCO.js +0 -429
  47. package/dist/mcp/plugin-editor/index.cjs +0 -47
  48. package/dist/mcp/plugin-editor/index.d.cts +0 -98
  49. package/dist/mcp/plugin-editor/index.d.ts +0 -98
  50. package/dist/mcp/plugin-editor/index.js +0 -2
  51. package/dist/mcp/plugin-excel/index.cjs +0 -31
  52. package/dist/mcp/plugin-excel/index.d.cts +0 -86
  53. package/dist/mcp/plugin-excel/index.d.ts +0 -86
  54. package/dist/mcp/plugin-excel/index.js +0 -2
  55. package/dist/mcp/plugin-preview/index.cjs +0 -23
  56. package/dist/mcp/plugin-preview/index.d.cts +0 -109
  57. package/dist/mcp/plugin-preview/index.d.ts +0 -109
  58. package/dist/mcp/plugin-preview/index.js +0 -2
  59. package/dist/mcp/plugin-seaflow/index.cjs +0 -35
  60. package/dist/mcp/plugin-seaflow/index.d.cts +0 -318
  61. package/dist/mcp/plugin-seaflow/index.d.ts +0 -318
  62. package/dist/mcp/plugin-seaflow/index.js +0 -2
  63. package/dist/mcp/plugin-word/index.cjs +0 -31
  64. package/dist/mcp/plugin-word/index.d.cts +0 -86
  65. package/dist/mcp/plugin-word/index.d.ts +0 -86
  66. package/dist/mcp/plugin-word/index.js +0 -2
  67. package/dist/tools-LMW67LIY.js +0 -2
  68. package/dist/tools-TU7PBMDO.cjs +0 -23
@@ -1,179 +0,0 @@
1
- 'use strict';
2
-
3
- var chunkTFOJLA2F_cjs = require('./chunk-TFOJLA2F.cjs');
4
-
5
- // src/mcp/plugin-shell/tools.ts
6
- function annotateTool(tool, annotations, outputSchema) {
7
- return {
8
- ...tool,
9
- annotations,
10
- ...outputSchema ? { outputSchema } : {}
11
- };
12
- }
13
- var shellCommandEvidenceOutputSchema = {
14
- type: "object",
15
- properties: {
16
- command: { type: "string" },
17
- cwd: { type: "string" },
18
- exitCode: { type: "number" },
19
- stdout: { type: "string" },
20
- stderr: { type: "string" },
21
- error: { type: "string" },
22
- durationMs: { type: "number" },
23
- usedFallback: { type: "boolean" }
24
- },
25
- required: ["command", "exitCode", "stdout", "stderr", "durationMs", "usedFallback"]
26
- };
27
- var shellSessionSnapshotEvidenceOutputSchema = {
28
- type: "object",
29
- properties: {
30
- projectPath: { type: "string" },
31
- cwd: { type: "string" },
32
- promptLabel: { type: "string" },
33
- isRunning: { type: "boolean" },
34
- lastExitCode: { type: "number" },
35
- lastDurationMs: { type: "number" },
36
- lastCommandAt: { type: "number" },
37
- historyCount: { type: "number" },
38
- entryCount: { type: "number" }
39
- },
40
- required: ["projectPath", "cwd", "promptLabel", "isRunning", "historyCount", "entryCount"]
41
- };
42
- var sessionTools = [
43
- annotateTool({
44
- name: "shell-get_session",
45
- 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",
46
- inputSchema: {
47
- type: "object",
48
- properties: {}
49
- }
50
- }, {
51
- operationKind: "read",
52
- requiresExecutionEvidence: false,
53
- rawDomain: "shell"
54
- }, {
55
- type: "object",
56
- properties: {
57
- projectPath: { type: "string" },
58
- cwd: { type: "string" },
59
- promptLabel: { type: "string" },
60
- isRunning: { type: "boolean" },
61
- lastExitCode: { type: "number" },
62
- lastDurationMs: { type: "number" },
63
- lastCommandAt: { type: "number" },
64
- historyCount: { type: "number" },
65
- entryCount: { type: "number" }
66
- }
67
- }),
68
- annotateTool({
69
- name: "shell-get_entries",
70
- 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",
71
- inputSchema: {
72
- type: "object",
73
- properties: {
74
- limit: {
75
- type: "number",
76
- description: "\u53EF\u9009\uFF0C\u8FD4\u56DE\u6700\u8FD1\u591A\u5C11\u6761\u8BB0\u5F55\uFF0C\u9ED8\u8BA4 200\u3002"
77
- }
78
- }
79
- }
80
- }, {
81
- operationKind: "read",
82
- requiresExecutionEvidence: false,
83
- rawDomain: "shell"
84
- }, {
85
- type: "object",
86
- properties: {
87
- entries: {
88
- type: "array",
89
- items: {
90
- type: "object",
91
- properties: {
92
- id: { type: "number" },
93
- level: { type: "string" },
94
- content: { type: "string" },
95
- createdAt: { type: "number" }
96
- }
97
- }
98
- }
99
- }
100
- })
101
- ];
102
- var commandTools = [
103
- annotateTool({
104
- name: "shell-run_command",
105
- 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",
106
- inputSchema: {
107
- type: "object",
108
- properties: {
109
- command: { type: "string", description: "\u8981\u6267\u884C\u7684\u547D\u4EE4" },
110
- cwd: { type: "string", description: "\u53EF\u9009\uFF0C\u8986\u76D6\u5F53\u524D\u4F1A\u8BDD\u5DE5\u4F5C\u76EE\u5F55" },
111
- timeout: { type: "number", description: "\u53EF\u9009\uFF0C\u8D85\u65F6\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09" }
112
- },
113
- required: ["command"]
114
- }
115
- }, {
116
- operationKind: "system",
117
- requiresExecutionEvidence: true,
118
- rawDomain: "shell"
119
- }, shellCommandEvidenceOutputSchema),
120
- annotateTool({
121
- name: "shell-set_cwd",
122
- 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",
123
- inputSchema: {
124
- type: "object",
125
- properties: {
126
- cwd: { type: "string", description: "\u76EE\u6807\u5DE5\u4F5C\u76EE\u5F55" }
127
- },
128
- required: ["cwd"]
129
- }
130
- }, {
131
- operationKind: "mutate",
132
- requiresExecutionEvidence: true,
133
- rawDomain: "shell"
134
- }, shellSessionSnapshotEvidenceOutputSchema),
135
- annotateTool({
136
- name: "shell-clear_output",
137
- description: "\u6E05\u7A7A\u5F53\u524D Shell \u8F93\u51FA\u6D41\uFF0C\u4F46\u4FDD\u7559\u4F1A\u8BDD\u4E0A\u4E0B\u6587\u548C\u547D\u4EE4\u5386\u53F2\u3002",
138
- inputSchema: {
139
- type: "object",
140
- properties: {}
141
- }
142
- }, {
143
- operationKind: "mutate",
144
- requiresExecutionEvidence: true,
145
- rawDomain: "shell"
146
- }, shellSessionSnapshotEvidenceOutputSchema),
147
- annotateTool({
148
- name: "shell-reset_session",
149
- 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",
150
- inputSchema: {
151
- type: "object",
152
- properties: {}
153
- }
154
- }, {
155
- operationKind: "mutate",
156
- requiresExecutionEvidence: true,
157
- rawDomain: "shell"
158
- }, shellSessionSnapshotEvidenceOutputSchema)
159
- ];
160
- var tools = [
161
- ...sessionTools,
162
- ...commandTools
163
- ];
164
- async function callTool(name, args = {}) {
165
- return chunkTFOJLA2F_cjs.getDefaultClient().callTool(name, args);
166
- }
167
- var shellPlugin = {
168
- getSession: () => callTool("shell-get_session", {}),
169
- getEntries: (limit) => callTool("shell-get_entries", { limit }),
170
- runCommand: (command, cwd, timeout) => callTool("shell-run_command", { command, cwd, timeout }),
171
- setCwd: (cwd) => callTool("shell-set_cwd", { cwd }),
172
- clearOutput: () => callTool("shell-clear_output", {}),
173
- resetSession: () => callTool("shell-reset_session", {})
174
- };
175
-
176
- exports.commandTools = commandTools;
177
- exports.sessionTools = sessionTools;
178
- exports.shellPlugin = shellPlugin;
179
- exports.tools = tools;
@@ -1,165 +0,0 @@
1
- 'use strict';
2
-
3
- var chunkTFOJLA2F_cjs = require('./chunk-TFOJLA2F.cjs');
4
-
5
- // src/mcp/plugin-preview/tools.ts
6
- var coreTools = [
7
- {
8
- name: "preview-get",
9
- description: "\u83B7\u53D6\u5A92\u4F53\u6587\u4EF6\uFF08\u56FE\u7247/\u89C6\u9891/\u97F3\u9891\uFF09\u7684\u9884\u89C8\u7ED3\u679C\uFF0C\u5305\u542B\u5143\u6570\u636E\u4E0E\u53EF\u6E32\u67D3 URL\u3002\u4E0D\u8981\u5BF9\u4EE3\u7801\u6216\u6587\u672C\u6587\u4EF6\u4F7F\u7528\u6B64\u5DE5\u5177\u3002",
10
- inputSchema: {
11
- type: "object",
12
- properties: {
13
- path: { type: "string", description: "\u5A92\u4F53\u6587\u4EF6\u8DEF\u5F84\uFF08\u56FE\u7247/\u89C6\u9891/\u97F3\u9891\uFF09" },
14
- rootId: { type: "string", enum: ["workspace"], description: "\u6587\u4EF6\u6839\uFF08\u9ED8\u8BA4 workspace\uFF09" }
15
- },
16
- required: ["path"]
17
- }
18
- },
19
- {
20
- name: "preview-resolve_capability",
21
- description: "\u68C0\u67E5\u6587\u4EF6\u662F\u5426\u4E3A\u53EF\u9884\u89C8\u7684\u5A92\u4F53\u7C7B\u578B\uFF08\u56FE\u7247/\u89C6\u9891/\u97F3\u9891\uFF09\uFF0C\u8FD4\u56DE\u5143\u6570\u636E",
22
- inputSchema: {
23
- type: "object",
24
- properties: {
25
- path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84" },
26
- rootId: { type: "string", enum: ["workspace"], description: "\u6587\u4EF6\u6839\uFF08\u9ED8\u8BA4 workspace\uFF09" }
27
- },
28
- required: ["path"]
29
- }
30
- },
31
- {
32
- name: "preview-get_metadata",
33
- description: "\u83B7\u53D6\u5A92\u4F53\u6587\u4EF6\u7684\u5143\u6570\u636E\uFF08MIME \u7C7B\u578B\u3001\u5927\u5C0F\u3001\u6269\u5C55\u540D\u7B49\uFF09",
34
- inputSchema: {
35
- type: "object",
36
- properties: {
37
- path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84" },
38
- rootId: { type: "string", enum: ["workspace"], description: "\u6587\u4EF6\u6839\uFF08\u9ED8\u8BA4 workspace\uFF09" }
39
- },
40
- required: ["path"]
41
- }
42
- },
43
- {
44
- name: "preview-get_thumbnail",
45
- description: "\u83B7\u53D6\u56FE\u7247\u6587\u4EF6\u7684\u7F29\u7565\u56FE URL\u3002\u4EC5\u5BF9\u56FE\u7247\u7C7B\u578B\u6709\u6548\u3002",
46
- inputSchema: {
47
- type: "object",
48
- properties: {
49
- path: { type: "string", description: "\u56FE\u7247\u6587\u4EF6\u8DEF\u5F84" },
50
- rootId: { type: "string", enum: ["workspace"], description: "\u6587\u4EF6\u6839\uFF08\u9ED8\u8BA4 workspace\uFF09" },
51
- width: { type: "number", description: "\u7F29\u7565\u56FE\u5BBD\u5EA6\uFF08\u53EF\u9009\uFF09" },
52
- height: { type: "number", description: "\u7F29\u7565\u56FE\u9AD8\u5EA6\uFF08\u53EF\u9009\uFF09" }
53
- },
54
- required: ["path"]
55
- }
56
- }
57
- ];
58
- var enhancedTools = [
59
- {
60
- name: "preview-file",
61
- description: "\u83B7\u53D6\u5355\u4E2A\u5A92\u4F53\u6587\u4EF6\uFF08\u56FE\u7247/\u89C6\u9891/\u97F3\u9891\uFF09\u7684\u6807\u51C6\u5316\u9884\u89C8\u7ED3\u679C",
62
- inputSchema: {
63
- type: "object",
64
- properties: {
65
- path: { type: "string", description: "\u5A92\u4F53\u6587\u4EF6\u8DEF\u5F84" },
66
- rootId: { type: "string", enum: ["workspace"], description: "\u6587\u4EF6\u6839\uFF08\u9ED8\u8BA4 workspace\uFF09" }
67
- },
68
- required: ["path"]
69
- }
70
- },
71
- {
72
- name: "preview-batch",
73
- description: "\u6279\u91CF\u83B7\u53D6\u591A\u4E2A\u5A92\u4F53\u6587\u4EF6\u7684\u5143\u6570\u636E",
74
- inputSchema: {
75
- type: "object",
76
- properties: {
77
- paths: {
78
- type: "array",
79
- description: "\u5A92\u4F53\u6587\u4EF6\u8DEF\u5F84\u5217\u8868",
80
- items: { type: "string" }
81
- },
82
- rootId: { type: "string", enum: ["workspace"], description: "\u6587\u4EF6\u6839\uFF08\u9ED8\u8BA4 workspace\uFF09" }
83
- },
84
- required: ["paths"]
85
- }
86
- },
87
- {
88
- name: "preview-batch_get",
89
- description: "\u6279\u91CF\u83B7\u53D6\u5A92\u4F53\u6587\u4EF6\u7684\u9884\u89C8\u80FD\u529B\u3001\u5143\u6570\u636E\u4E0E\u53EF\u9009\u7F29\u7565\u56FE",
90
- inputSchema: {
91
- type: "object",
92
- properties: {
93
- paths: {
94
- type: "array",
95
- description: "\u5A92\u4F53\u6587\u4EF6\u8DEF\u5F84\u5217\u8868",
96
- items: { type: "string" }
97
- },
98
- rootId: { type: "string", enum: ["workspace"], description: "\u6587\u4EF6\u6839\uFF08\u9ED8\u8BA4 workspace\uFF09" },
99
- includeThumbnail: { type: "boolean", description: "\u662F\u5426\u8FD4\u56DE\u7F29\u7565\u56FE\uFF08\u53EF\u9009\uFF09" },
100
- thumbnailSize: { type: "number", description: "\u7F29\u7565\u56FE\u5C3A\u5BF8\uFF08\u53EF\u9009\uFF09" }
101
- },
102
- required: ["paths"]
103
- }
104
- },
105
- {
106
- name: "preview-extract_text",
107
- description: "\u63D0\u53D6\u5A92\u4F53\u6587\u4EF6\u7684\u63CF\u8FF0\u6027\u5143\u6570\u636E\u6458\u8981\uFF08MIME\u3001\u5C3A\u5BF8\u3001\u65F6\u957F\u7B49\uFF09",
108
- inputSchema: {
109
- type: "object",
110
- properties: {
111
- path: { type: "string", description: "\u5A92\u4F53\u6587\u4EF6\u8DEF\u5F84" },
112
- rootId: { type: "string", enum: ["workspace"], description: "\u6587\u4EF6\u6839\uFF08\u9ED8\u8BA4 workspace\uFF09" }
113
- },
114
- required: ["path"]
115
- }
116
- },
117
- {
118
- name: "preview-compare_versions",
119
- description: "\u5BF9\u6BD4\u4E24\u4E2A\u5A92\u4F53\u6587\u4EF6\u7248\u672C\u7684\u5143\u6570\u636E\u5DEE\u5F02",
120
- inputSchema: {
121
- type: "object",
122
- properties: {
123
- leftPath: { type: "string", description: "\u5DE6\u4FA7\u6587\u4EF6\u8DEF\u5F84" },
124
- leftRootId: { type: "string", enum: ["workspace"], description: "\u5DE6\u4FA7\u6587\u4EF6\u6839\uFF08\u9ED8\u8BA4 workspace\uFF09" },
125
- rightPath: { type: "string", description: "\u53F3\u4FA7\u6587\u4EF6\u8DEF\u5F84" },
126
- rightRootId: { type: "string", enum: ["workspace"], description: "\u53F3\u4FA7\u6587\u4EF6\u6839\uFF08\u9ED8\u8BA4 workspace\uFF09" }
127
- },
128
- required: ["leftPath", "rightPath"]
129
- }
130
- }
131
- ];
132
- var tools = [
133
- ...coreTools,
134
- ...enhancedTools
135
- ];
136
- async function callTool(name, args = {}) {
137
- return chunkTFOJLA2F_cjs.getDefaultClient().callTool(name, args);
138
- }
139
- function withRootId(args, rootId) {
140
- return rootId ? { ...args, rootId } : args;
141
- }
142
- var preview = {
143
- get: (path, options) => callTool("preview-get", withRootId({ path }, options?.rootId)),
144
- resolveCapability: (path, options) => callTool("preview-resolve_capability", withRootId({ path }, options?.rootId)),
145
- getMetadata: (path, options) => callTool("preview-get_metadata", withRootId({ path }, options?.rootId)),
146
- getThumbnail: (path, options) => callTool("preview-get_thumbnail", withRootId({ path, width: options?.width, height: options?.height }, options?.rootId)),
147
- file: (path, options) => callTool("preview-file", withRootId({ path }, options?.rootId)),
148
- batch: (paths, options) => callTool("preview-batch", withRootId({ paths }, options?.rootId)),
149
- batchGet: (paths, options) => callTool(
150
- "preview-batch_get",
151
- withRootId({ paths, includeThumbnail: options?.includeThumbnail, thumbnailSize: options?.thumbnailSize }, options?.rootId)
152
- ),
153
- extractText: (path, options) => callTool("preview-extract_text", withRootId({ path }, options?.rootId)),
154
- compareVersions: (leftPath, rightPath, options) => callTool("preview-compare_versions", {
155
- leftPath,
156
- rightPath,
157
- ...options?.leftRootId ? { leftRootId: options.leftRootId } : {},
158
- ...options?.rightRootId ? { rightRootId: options.rightRootId } : {}
159
- })
160
- };
161
-
162
- exports.coreTools = coreTools;
163
- exports.enhancedTools = enhancedTools;
164
- exports.preview = preview;
165
- exports.tools = tools;