@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,109 @@
1
+ import { k as MCPToolResult, g as MCPTool } from '../../types-Clgf5gBf.cjs';
2
+
3
+ /**
4
+ * Preview Plugin MCP Tools
5
+ *
6
+ * 专用于图片、视频、音频等媒体文件的预览工具。
7
+ * 代码 / Markdown / 纯文本由 codeEditor 插件处理,不应走 preview。
8
+ */
9
+
10
+ type PreviewRootId = 'workspace';
11
+ declare const coreTools: MCPTool[];
12
+ declare const enhancedTools: MCPTool[];
13
+ declare const tools: MCPTool[];
14
+ declare const preview: {
15
+ get: (path: string, options?: {
16
+ rootId?: PreviewRootId;
17
+ }) => Promise<MCPToolResult>;
18
+ resolveCapability: (path: string, options?: {
19
+ rootId?: PreviewRootId;
20
+ }) => Promise<MCPToolResult>;
21
+ getMetadata: (path: string, options?: {
22
+ rootId?: PreviewRootId;
23
+ }) => Promise<MCPToolResult>;
24
+ getThumbnail: (path: string, options?: {
25
+ rootId?: PreviewRootId;
26
+ width?: number;
27
+ height?: number;
28
+ }) => Promise<MCPToolResult>;
29
+ file: (path: string, options?: {
30
+ rootId?: PreviewRootId;
31
+ }) => Promise<MCPToolResult>;
32
+ batch: (paths: string[], options?: {
33
+ rootId?: PreviewRootId;
34
+ }) => Promise<MCPToolResult>;
35
+ batchGet: (paths: string[], options?: {
36
+ rootId?: PreviewRootId;
37
+ includeThumbnail?: boolean;
38
+ thumbnailSize?: number;
39
+ }) => Promise<MCPToolResult>;
40
+ extractText: (path: string, options?: {
41
+ rootId?: PreviewRootId;
42
+ }) => Promise<MCPToolResult>;
43
+ compareVersions: (leftPath: string, rightPath: string, options?: {
44
+ leftRootId?: PreviewRootId;
45
+ rightRootId?: PreviewRootId;
46
+ }) => Promise<MCPToolResult>;
47
+ };
48
+ type PreviewMode = 'direct' | 'converted' | 'metadata_only';
49
+ type RenderKind = 'text' | 'code' | 'image' | 'pdf' | 'audio' | 'video' | 'office' | 'markdown' | 'html' | 'unknown';
50
+ interface PreviewCapability {
51
+ mode: PreviewMode;
52
+ renderKind: RenderKind;
53
+ editable?: boolean;
54
+ }
55
+ interface PreviewMetadata {
56
+ name: string;
57
+ path: string;
58
+ extension?: string;
59
+ mimeType?: string;
60
+ size?: number;
61
+ }
62
+ interface PreviewGetResponse {
63
+ capability: PreviewCapability;
64
+ metadata: PreviewMetadata;
65
+ payload?: {
66
+ text?: string;
67
+ url?: string;
68
+ html?: string;
69
+ };
70
+ }
71
+ interface PreviewThumbnail {
72
+ url: string;
73
+ width?: number;
74
+ height?: number;
75
+ }
76
+ interface PreviewBatchItem {
77
+ path: string;
78
+ success: boolean;
79
+ result?: PreviewGetResponse;
80
+ error?: string;
81
+ }
82
+ interface PreviewBatchResult {
83
+ total: number;
84
+ succeeded: number;
85
+ failed: number;
86
+ items: PreviewBatchItem[];
87
+ }
88
+ interface PreviewBatchEntry {
89
+ path: string;
90
+ capability?: PreviewCapability;
91
+ metadata?: PreviewMetadata;
92
+ thumbnailUrl?: string;
93
+ thumbnailMimeType?: string;
94
+ error?: string;
95
+ }
96
+ interface PreviewBatchGetResponse {
97
+ entries: PreviewBatchEntry[];
98
+ total: number;
99
+ successCount: number;
100
+ failedCount: number;
101
+ }
102
+ interface PreviewCompareVersionsResult {
103
+ leftPath: string;
104
+ rightPath: string;
105
+ changed: boolean;
106
+ summary: string;
107
+ }
108
+
109
+ export { type PreviewBatchEntry, type PreviewBatchGetResponse, type PreviewBatchItem, type PreviewBatchResult, type PreviewCapability, type PreviewCompareVersionsResult, type PreviewGetResponse, type PreviewMetadata, type PreviewMode, type PreviewThumbnail, type RenderKind, coreTools, enhancedTools, preview, tools };
@@ -0,0 +1,109 @@
1
+ import { k as MCPToolResult, g as MCPTool } from '../../types-Clgf5gBf.js';
2
+
3
+ /**
4
+ * Preview Plugin MCP Tools
5
+ *
6
+ * 专用于图片、视频、音频等媒体文件的预览工具。
7
+ * 代码 / Markdown / 纯文本由 codeEditor 插件处理,不应走 preview。
8
+ */
9
+
10
+ type PreviewRootId = 'workspace';
11
+ declare const coreTools: MCPTool[];
12
+ declare const enhancedTools: MCPTool[];
13
+ declare const tools: MCPTool[];
14
+ declare const preview: {
15
+ get: (path: string, options?: {
16
+ rootId?: PreviewRootId;
17
+ }) => Promise<MCPToolResult>;
18
+ resolveCapability: (path: string, options?: {
19
+ rootId?: PreviewRootId;
20
+ }) => Promise<MCPToolResult>;
21
+ getMetadata: (path: string, options?: {
22
+ rootId?: PreviewRootId;
23
+ }) => Promise<MCPToolResult>;
24
+ getThumbnail: (path: string, options?: {
25
+ rootId?: PreviewRootId;
26
+ width?: number;
27
+ height?: number;
28
+ }) => Promise<MCPToolResult>;
29
+ file: (path: string, options?: {
30
+ rootId?: PreviewRootId;
31
+ }) => Promise<MCPToolResult>;
32
+ batch: (paths: string[], options?: {
33
+ rootId?: PreviewRootId;
34
+ }) => Promise<MCPToolResult>;
35
+ batchGet: (paths: string[], options?: {
36
+ rootId?: PreviewRootId;
37
+ includeThumbnail?: boolean;
38
+ thumbnailSize?: number;
39
+ }) => Promise<MCPToolResult>;
40
+ extractText: (path: string, options?: {
41
+ rootId?: PreviewRootId;
42
+ }) => Promise<MCPToolResult>;
43
+ compareVersions: (leftPath: string, rightPath: string, options?: {
44
+ leftRootId?: PreviewRootId;
45
+ rightRootId?: PreviewRootId;
46
+ }) => Promise<MCPToolResult>;
47
+ };
48
+ type PreviewMode = 'direct' | 'converted' | 'metadata_only';
49
+ type RenderKind = 'text' | 'code' | 'image' | 'pdf' | 'audio' | 'video' | 'office' | 'markdown' | 'html' | 'unknown';
50
+ interface PreviewCapability {
51
+ mode: PreviewMode;
52
+ renderKind: RenderKind;
53
+ editable?: boolean;
54
+ }
55
+ interface PreviewMetadata {
56
+ name: string;
57
+ path: string;
58
+ extension?: string;
59
+ mimeType?: string;
60
+ size?: number;
61
+ }
62
+ interface PreviewGetResponse {
63
+ capability: PreviewCapability;
64
+ metadata: PreviewMetadata;
65
+ payload?: {
66
+ text?: string;
67
+ url?: string;
68
+ html?: string;
69
+ };
70
+ }
71
+ interface PreviewThumbnail {
72
+ url: string;
73
+ width?: number;
74
+ height?: number;
75
+ }
76
+ interface PreviewBatchItem {
77
+ path: string;
78
+ success: boolean;
79
+ result?: PreviewGetResponse;
80
+ error?: string;
81
+ }
82
+ interface PreviewBatchResult {
83
+ total: number;
84
+ succeeded: number;
85
+ failed: number;
86
+ items: PreviewBatchItem[];
87
+ }
88
+ interface PreviewBatchEntry {
89
+ path: string;
90
+ capability?: PreviewCapability;
91
+ metadata?: PreviewMetadata;
92
+ thumbnailUrl?: string;
93
+ thumbnailMimeType?: string;
94
+ error?: string;
95
+ }
96
+ interface PreviewBatchGetResponse {
97
+ entries: PreviewBatchEntry[];
98
+ total: number;
99
+ successCount: number;
100
+ failedCount: number;
101
+ }
102
+ interface PreviewCompareVersionsResult {
103
+ leftPath: string;
104
+ rightPath: string;
105
+ changed: boolean;
106
+ summary: string;
107
+ }
108
+
109
+ export { type PreviewBatchEntry, type PreviewBatchGetResponse, type PreviewBatchItem, type PreviewBatchResult, type PreviewCapability, type PreviewCompareVersionsResult, type PreviewGetResponse, type PreviewMetadata, type PreviewMode, type PreviewThumbnail, type RenderKind, coreTools, enhancedTools, preview, tools };
@@ -0,0 +1,2 @@
1
+ export { coreTools, enhancedTools, preview, tools } from '../../chunk-QD4KISXM.js';
2
+ import '../../chunk-ANWOL7SM.js';
@@ -0,0 +1,35 @@
1
+ 'use strict';
2
+
3
+ var chunkHJJTBVKQ_cjs = require('../../chunk-HJJTBVKQ.cjs');
4
+ require('../../chunk-TFOJLA2F.cjs');
5
+
6
+
7
+
8
+ Object.defineProperty(exports, "allTools", {
9
+ enumerable: true,
10
+ get: function () { return chunkHJJTBVKQ_cjs.allTools; }
11
+ });
12
+ Object.defineProperty(exports, "canvasAuthTools", {
13
+ enumerable: true,
14
+ get: function () { return chunkHJJTBVKQ_cjs.canvasAuthTools; }
15
+ });
16
+ Object.defineProperty(exports, "canvasContextTools", {
17
+ enumerable: true,
18
+ get: function () { return chunkHJJTBVKQ_cjs.canvasContextTools; }
19
+ });
20
+ Object.defineProperty(exports, "canvasExecutionTools", {
21
+ enumerable: true,
22
+ get: function () { return chunkHJJTBVKQ_cjs.canvasExecutionTools; }
23
+ });
24
+ Object.defineProperty(exports, "canvasExtendedTools", {
25
+ enumerable: true,
26
+ get: function () { return chunkHJJTBVKQ_cjs.canvasExtendedTools; }
27
+ });
28
+ Object.defineProperty(exports, "seaflow", {
29
+ enumerable: true,
30
+ get: function () { return chunkHJJTBVKQ_cjs.seaflow; }
31
+ });
32
+ Object.defineProperty(exports, "tools", {
33
+ enumerable: true,
34
+ get: function () { return chunkHJJTBVKQ_cjs.tools; }
35
+ });
@@ -0,0 +1,318 @@
1
+ import { k as MCPToolResult, g as MCPTool } from '../../types-Clgf5gBf.cjs';
2
+
3
+ /**
4
+ * SeaFlow Plugin MCP Tools
5
+ *
6
+ * SeaFlow 插件提供的 MCP Tools(B 类插件,画布执行与编排)
7
+ */
8
+
9
+ declare const canvasContextTools: MCPTool[];
10
+ declare const canvasExecutionTools: MCPTool[];
11
+ declare const canvasAuthTools: MCPTool[];
12
+ declare const canvasExtendedTools: MCPTool[];
13
+ declare const tools: MCPTool[];
14
+ declare const allTools: MCPTool[];
15
+ declare const seaflow: {
16
+ getSnapshot: (graphId?: string) => Promise<MCPToolResult>;
17
+ getWorkflowContext: () => Promise<MCPToolResult>;
18
+ clearCanvas: () => Promise<MCPToolResult>;
19
+ listNodeTypes: (options?: {
20
+ includeBasic?: boolean;
21
+ includeAliases?: boolean;
22
+ includeCapabilities?: boolean;
23
+ includeSchemas?: boolean;
24
+ executableOnly?: boolean;
25
+ typeIds?: string[];
26
+ }) => Promise<MCPToolResult>;
27
+ batchApply: (operations: Array<Record<string, unknown>>, options: {
28
+ requestId: string;
29
+ idempotencyKey: string;
30
+ baseVersion: number;
31
+ }) => Promise<MCPToolResult>;
32
+ validateNode: (nodeId: string, strict?: boolean) => Promise<MCPToolResult>;
33
+ getNodeOutputs: (nodeId: string) => Promise<MCPToolResult>;
34
+ getNode: (nodeId: string) => Promise<MCPToolResult>;
35
+ listEdges: (options?: {
36
+ nodeId?: string;
37
+ direction?: "in" | "out" | "both";
38
+ }) => Promise<MCPToolResult>;
39
+ executeNode: (nodeId: string, target?: "seaart" | "staging") => Promise<MCPToolResult>;
40
+ executeGraph: (graphId?: string, target?: "seaart" | "staging", source?: "auto" | "remote" | "local") => Promise<MCPToolResult>;
41
+ openWorkflow: (workflowId: string, options?: {
42
+ target?: "seaart" | "staging";
43
+ source?: "auto" | "remote" | "local";
44
+ syncActiveGraph?: boolean;
45
+ }) => Promise<MCPToolResult>;
46
+ saveWorkflow: (options?: {
47
+ workflowId?: string;
48
+ name?: string;
49
+ target?: "seaart" | "staging";
50
+ persistLocal?: boolean;
51
+ persistRemote?: boolean;
52
+ includeViewport?: boolean;
53
+ isCanvas?: boolean;
54
+ versionId?: string;
55
+ }) => Promise<MCPToolResult>;
56
+ cancelTask: (taskId: string) => Promise<MCPToolResult>;
57
+ getTaskState: (taskId: string) => Promise<MCPToolResult>;
58
+ listTasks: (options?: {
59
+ status?: CanvasTaskStatus;
60
+ nodeId?: string;
61
+ }) => Promise<MCPToolResult>;
62
+ waitTaskResult: (taskId: string, options?: {
63
+ timeoutMs?: number;
64
+ pollIntervalMs?: number;
65
+ includeEvents?: boolean;
66
+ }) => Promise<MCPToolResult>;
67
+ reconnectTask: (options?: {
68
+ taskId?: string;
69
+ nodeId?: string;
70
+ target?: "seaart" | "staging";
71
+ timeoutMs?: number;
72
+ includeEvents?: boolean;
73
+ }) => Promise<MCPToolResult>;
74
+ getExecutionAuth: () => Promise<MCPToolResult>;
75
+ setExecutionAuth: (target: "seaart" | "staging", token: string, persistMode?: "memory" | "session" | "local") => Promise<MCPToolResult>;
76
+ upsertImageNode: (input: {
77
+ nodeId?: string;
78
+ label?: string;
79
+ prompt: string;
80
+ negativePrompt?: string;
81
+ model?: string;
82
+ mode?: string;
83
+ resolution?: string;
84
+ aspectRatio?: string;
85
+ seed?: number;
86
+ nIter?: number;
87
+ width?: number;
88
+ height?: number;
89
+ }) => Promise<MCPToolResult>;
90
+ upsertTextNode: (input: {
91
+ nodeId?: string;
92
+ label?: string;
93
+ prompt: string;
94
+ model?: string;
95
+ negativePrompt?: string;
96
+ systemPrompt?: string;
97
+ modalMode?: "text" | "image_to_text" | "video_to_text";
98
+ maxTokens?: number;
99
+ temperature?: number;
100
+ topP?: number;
101
+ }) => Promise<MCPToolResult>;
102
+ connectNodes: (input: {
103
+ sourceNodeId: string;
104
+ targetNodeId: string;
105
+ sourceField?: string;
106
+ targetField?: string;
107
+ sourceHandle?: string;
108
+ targetHandle?: string;
109
+ edgeType?: string;
110
+ }) => Promise<MCPToolResult>;
111
+ executeNodeAndWait: (nodeId: string, options?: {
112
+ target?: "seaart" | "staging";
113
+ timeoutMs?: number;
114
+ pollIntervalMs?: number;
115
+ includeEvents?: boolean;
116
+ }) => Promise<MCPToolResult>;
117
+ generateImageFromPrompt: (input: {
118
+ nodeId?: string;
119
+ label?: string;
120
+ prompt: string;
121
+ negativePrompt?: string;
122
+ model?: string;
123
+ mode?: string;
124
+ resolution?: string;
125
+ aspectRatio?: string;
126
+ seed?: number;
127
+ nIter?: number;
128
+ width?: number;
129
+ height?: number;
130
+ target?: "seaart" | "staging";
131
+ timeoutMs?: number;
132
+ pollIntervalMs?: number;
133
+ }) => Promise<MCPToolResult>;
134
+ };
135
+ type CanvasTaskStatus = 'accepted' | 'queued' | 'running' | 'completed' | 'failed' | 'error' | 'canceled';
136
+ interface CanvasBatchApplyResult {
137
+ accepted: boolean;
138
+ nextVersion?: number;
139
+ appliedCount?: number;
140
+ conflicts?: Array<{
141
+ code: string;
142
+ message: string;
143
+ operationIndex?: number;
144
+ }>;
145
+ }
146
+ interface CanvasWorkflowContextResult {
147
+ activeWorkflowId: string;
148
+ graphId: string;
149
+ version: number;
150
+ nodeCount: number;
151
+ edgeCount: number;
152
+ viewport?: {
153
+ x: number;
154
+ y: number;
155
+ zoom: number;
156
+ };
157
+ autosaveStorageKey?: string;
158
+ target?: string;
159
+ updatedAt?: number;
160
+ }
161
+ interface CanvasClearCanvasResult {
162
+ accepted: boolean;
163
+ graphId?: string;
164
+ clearedNodeCount?: number;
165
+ clearedEdgeCount?: number;
166
+ viewport?: {
167
+ x: number;
168
+ y: number;
169
+ zoom: number;
170
+ };
171
+ updatedAt?: number;
172
+ }
173
+ interface CanvasWorkflowOpenResult {
174
+ accepted: boolean;
175
+ workflowId?: string;
176
+ source?: 'remote' | 'local';
177
+ nodeCount?: number;
178
+ edgeCount?: number;
179
+ name?: string;
180
+ viewport?: {
181
+ x: number;
182
+ y: number;
183
+ zoom: number;
184
+ };
185
+ reason?: string;
186
+ }
187
+ interface CanvasWorkflowSaveResult {
188
+ accepted: boolean;
189
+ workflowId?: string;
190
+ localSaved?: boolean;
191
+ remoteSaved?: boolean;
192
+ remoteError?: string;
193
+ nodeCount?: number;
194
+ edgeCount?: number;
195
+ viewport?: {
196
+ x: number;
197
+ y: number;
198
+ zoom: number;
199
+ };
200
+ updatedAt?: string;
201
+ reason?: string;
202
+ }
203
+ interface CanvasExecutionTaskState {
204
+ taskId: string;
205
+ target?: string;
206
+ status: CanvasTaskStatus;
207
+ progress?: number;
208
+ message?: string;
209
+ updatedAt?: number;
210
+ }
211
+ type CanvasExecutionAuthState = 'READY' | 'MISSING' | 'INVALID';
212
+ type CanvasExecutionPersistMode = 'memory' | 'session' | 'local';
213
+ interface CanvasExecutionAuthSnapshot {
214
+ currentTarget: string;
215
+ persistMode: CanvasExecutionPersistMode;
216
+ authStateByTarget: Record<string, CanvasExecutionAuthState>;
217
+ hasTokenByTarget: Record<string, boolean>;
218
+ updatedAt?: number;
219
+ }
220
+ interface CanvasRuntimeDirective {
221
+ kind: 'call_tool' | 'await_tool_result' | 'finalize' | 'fail';
222
+ toolName?: string;
223
+ input?: Record<string, unknown>;
224
+ finalText?: string;
225
+ reason?: string;
226
+ code?: string;
227
+ }
228
+ interface CanvasTaskWaitResult {
229
+ accepted: boolean;
230
+ taskId: string;
231
+ target?: string;
232
+ status: CanvasTaskStatus;
233
+ progress?: number;
234
+ message?: string;
235
+ terminal: boolean;
236
+ result?: Record<string, unknown>;
237
+ outputs?: Record<string, unknown>;
238
+ eventsProcessed?: number;
239
+ updatedAt?: number;
240
+ runtimeDirective?: CanvasRuntimeDirective;
241
+ }
242
+ interface CanvasTaskReconnectItem {
243
+ accepted: boolean;
244
+ taskId?: string;
245
+ target?: string;
246
+ status?: CanvasTaskStatus;
247
+ progress?: number;
248
+ message?: string;
249
+ terminal?: boolean;
250
+ outputs?: Record<string, unknown>;
251
+ result?: Record<string, unknown>;
252
+ eventsProcessed?: number;
253
+ updatedAt?: number;
254
+ reason?: string;
255
+ }
256
+ interface CanvasTaskReconnectResult {
257
+ accepted: boolean;
258
+ total: number;
259
+ acceptedCount: number;
260
+ terminalCount: number;
261
+ items: CanvasTaskReconnectItem[];
262
+ updatedAt?: number;
263
+ reason?: string;
264
+ }
265
+ interface CanvasNodeValidationResult {
266
+ nodeId: string;
267
+ nodeType?: string;
268
+ valid: boolean;
269
+ errors: string[];
270
+ warnings?: string[];
271
+ }
272
+ interface CanvasNodeOutputsResult {
273
+ nodeId: string;
274
+ outputs: Record<string, unknown>;
275
+ selectedOutputUrlIndex?: number;
276
+ updatedAt?: number;
277
+ }
278
+ interface CanvasNodeDetailResult {
279
+ nodeId: string;
280
+ nodeType: string;
281
+ position?: Record<string, unknown>;
282
+ selected?: boolean;
283
+ label?: string;
284
+ inputs: Record<string, unknown>;
285
+ runtime: Record<string, unknown>;
286
+ outputs: Record<string, unknown>;
287
+ updatedAt?: number;
288
+ }
289
+ interface CanvasEdgeListItem {
290
+ id: string;
291
+ source: string;
292
+ sourceHandle?: string;
293
+ target: string;
294
+ targetHandle?: string;
295
+ type?: string;
296
+ }
297
+ interface CanvasEdgeListResult {
298
+ total: number;
299
+ items: CanvasEdgeListItem[];
300
+ updatedAt?: number;
301
+ }
302
+ interface CanvasTaskListItem {
303
+ taskId: string;
304
+ nodeId?: string;
305
+ nodeType?: string;
306
+ target?: string;
307
+ status: CanvasTaskStatus;
308
+ progress?: number;
309
+ message?: string;
310
+ updatedAt?: number;
311
+ }
312
+ interface CanvasTaskListResult {
313
+ total: number;
314
+ items: CanvasTaskListItem[];
315
+ updatedAt?: number;
316
+ }
317
+
318
+ export { type CanvasBatchApplyResult, type CanvasClearCanvasResult, type CanvasEdgeListItem, type CanvasEdgeListResult, type CanvasExecutionAuthSnapshot, type CanvasExecutionAuthState, type CanvasExecutionPersistMode, type CanvasExecutionTaskState, type CanvasNodeDetailResult, type CanvasNodeOutputsResult, type CanvasNodeValidationResult, type CanvasRuntimeDirective, type CanvasTaskListItem, type CanvasTaskListResult, type CanvasTaskReconnectItem, type CanvasTaskReconnectResult, type CanvasTaskStatus, type CanvasTaskWaitResult, type CanvasWorkflowContextResult, type CanvasWorkflowOpenResult, type CanvasWorkflowSaveResult, allTools, canvasAuthTools, canvasContextTools, canvasExecutionTools, canvasExtendedTools, seaflow, tools };