@synergenius/flow-weaver 0.20.7 → 0.21.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.
- package/dist/api/command-runner.d.ts +13 -0
- package/dist/api/command-runner.js +217 -0
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.js +1 -0
- package/dist/cli/flow-weaver.mjs +24064 -38374
- package/dist/cli/index.js +0 -60
- package/dist/doc-metadata/extractors/cli-commands.js +37 -56
- package/dist/doc-metadata/extractors/mcp-tools.d.ts +1 -1
- package/dist/doc-metadata/extractors/mcp-tools.js +1 -213
- package/dist/doc-metadata/types.d.ts +2 -0
- package/dist/generated-version.d.ts +1 -1
- package/dist/generated-version.js +1 -1
- package/dist/mcp/index.d.ts +1 -5
- package/dist/mcp/index.js +0 -4
- package/dist/mcp/server.js +3 -55
- package/dist/mcp/types.d.ts +0 -50
- package/dist/mcp/types.js +1 -7
- package/dist/mcp/workflow-executor.js +23 -1
- package/dist/parser.js +5 -1
- package/package.json +1 -2
- package/dist/cli/commands/listen.d.ts +0 -16
- package/dist/cli/commands/listen.js +0 -39
- package/dist/cli/commands/tunnel.d.ts +0 -19
- package/dist/cli/commands/tunnel.js +0 -119
- package/dist/cli/commands/ui.d.ts +0 -16
- package/dist/cli/commands/ui.js +0 -130
- package/dist/cli/tunnel/dispatch.d.ts +0 -18
- package/dist/cli/tunnel/dispatch.js +0 -36
- package/dist/cli/tunnel/file-lock.d.ts +0 -9
- package/dist/cli/tunnel/file-lock.js +0 -36
- package/dist/cli/tunnel/handlers/ast-ops.d.ts +0 -10
- package/dist/cli/tunnel/handlers/ast-ops.js +0 -252
- package/dist/cli/tunnel/handlers/execution.d.ts +0 -7
- package/dist/cli/tunnel/handlers/execution.js +0 -89
- package/dist/cli/tunnel/handlers/file-ops.d.ts +0 -7
- package/dist/cli/tunnel/handlers/file-ops.js +0 -204
- package/dist/cli/tunnel/handlers/mutations.d.ts +0 -7
- package/dist/cli/tunnel/handlers/mutations.js +0 -285
- package/dist/cli/tunnel/handlers/stubs.d.ts +0 -7
- package/dist/cli/tunnel/handlers/stubs.js +0 -143
- package/dist/cli/tunnel/handlers/templates.d.ts +0 -7
- package/dist/cli/tunnel/handlers/templates.js +0 -123
- package/dist/cli/tunnel/path-resolver.d.ts +0 -17
- package/dist/cli/tunnel/path-resolver.js +0 -54
- package/dist/defaults.d.ts +0 -3
- package/dist/defaults.js +0 -3
- package/dist/mcp/editor-connection.d.ts +0 -52
- package/dist/mcp/editor-connection.js +0 -142
- package/dist/mcp/event-buffer.d.ts +0 -62
- package/dist/mcp/event-buffer.js +0 -150
- package/dist/mcp/resources.d.ts +0 -14
- package/dist/mcp/resources.js +0 -55
- package/dist/mcp/tools-editor.d.ts +0 -5
- package/dist/mcp/tools-editor.js +0 -283
package/dist/cli/index.js
CHANGED
|
@@ -22,10 +22,7 @@ import { doctorCommand } from './commands/doctor.js';
|
|
|
22
22
|
import { initCommand } from './commands/init.js';
|
|
23
23
|
import { watchCommand } from './commands/watch.js';
|
|
24
24
|
import { devCommand } from './commands/dev.js';
|
|
25
|
-
import { listenCommand } from './commands/listen.js';
|
|
26
|
-
import { tunnelCommand } from './commands/tunnel.js';
|
|
27
25
|
import { mcpServerCommand } from '../mcp/server.js';
|
|
28
|
-
import { uiFocusNode, uiAddNode, uiOpenWorkflow, uiGetState, uiBatch } from './commands/ui.js';
|
|
29
26
|
import { grammarCommand } from './commands/grammar.js';
|
|
30
27
|
import { runCommand } from './commands/run.js';
|
|
31
28
|
import { serveCommand } from './commands/serve.js';
|
|
@@ -44,7 +41,6 @@ import { marketInitCommand, marketPackCommand, marketPublishCommand, marketInsta
|
|
|
44
41
|
import { mcpSetupCommand } from './commands/mcp-setup.js';
|
|
45
42
|
import { logger } from './utils/logger.js';
|
|
46
43
|
import { getErrorMessage } from '../utils/error-utils.js';
|
|
47
|
-
import { DEFAULT_SERVER_URL } from '../defaults.js';
|
|
48
44
|
const version = typeof __CLI_VERSION__ !== 'undefined' ? __CLI_VERSION__ : '0.0.0-dev';
|
|
49
45
|
const program = new Command();
|
|
50
46
|
program
|
|
@@ -250,29 +246,10 @@ program
|
|
|
250
246
|
.action(wrapAction(async (input, options) => {
|
|
251
247
|
await devCommand(input, options);
|
|
252
248
|
}));
|
|
253
|
-
// Listen command
|
|
254
|
-
program
|
|
255
|
-
.command('listen')
|
|
256
|
-
.description('Connect to Studio and stream integration events as JSON lines')
|
|
257
|
-
.option('-s, --server <url>', 'Studio URL', DEFAULT_SERVER_URL)
|
|
258
|
-
.action(wrapAction(async (options) => {
|
|
259
|
-
await listenCommand(options);
|
|
260
|
-
}));
|
|
261
|
-
// Tunnel command
|
|
262
|
-
program
|
|
263
|
-
.command('tunnel')
|
|
264
|
-
.description('Connect cloud Studio to your local project directory')
|
|
265
|
-
.requiredOption('-k, --key <apiKey>', 'API key for cloud authentication (fw_xxxx)')
|
|
266
|
-
.option('-c, --cloud <url>', 'Cloud server URL', 'https://flowweaver.dev')
|
|
267
|
-
.option('-d, --dir <path>', 'Project directory', process.cwd())
|
|
268
|
-
.action(wrapAction(async (options) => {
|
|
269
|
-
await tunnelCommand(options);
|
|
270
|
-
}));
|
|
271
249
|
// MCP server command
|
|
272
250
|
program
|
|
273
251
|
.command('mcp-server')
|
|
274
252
|
.description('Start MCP server for Claude Code integration')
|
|
275
|
-
.option('-s, --server <url>', 'Studio URL', DEFAULT_SERVER_URL)
|
|
276
253
|
.option('--stdio', 'Run in MCP stdio mode (skip interactive registration)')
|
|
277
254
|
.action(wrapAction(async (options) => {
|
|
278
255
|
await mcpServerCommand(options);
|
|
@@ -287,43 +264,6 @@ program
|
|
|
287
264
|
.action(wrapAction(async (options) => {
|
|
288
265
|
await mcpSetupCommand(options);
|
|
289
266
|
}));
|
|
290
|
-
// UI command group (send commands to Studio)
|
|
291
|
-
const uiCmd = program.command('ui').description('Send commands to Studio');
|
|
292
|
-
uiCmd
|
|
293
|
-
.command('focus-node <nodeId>')
|
|
294
|
-
.description('Select and center a node in Studio')
|
|
295
|
-
.option('-s, --server <url>', 'Studio URL', DEFAULT_SERVER_URL)
|
|
296
|
-
.action(wrapAction(async (nodeId, options) => {
|
|
297
|
-
await uiFocusNode(nodeId, options);
|
|
298
|
-
}));
|
|
299
|
-
uiCmd
|
|
300
|
-
.command('add-node <nodeTypeName>')
|
|
301
|
-
.description('Add a node at viewport center')
|
|
302
|
-
.option('-s, --server <url>', 'Studio URL', DEFAULT_SERVER_URL)
|
|
303
|
-
.action(wrapAction(async (nodeTypeName, options) => {
|
|
304
|
-
await uiAddNode(nodeTypeName, options);
|
|
305
|
-
}));
|
|
306
|
-
uiCmd
|
|
307
|
-
.command('open-workflow <filePath>')
|
|
308
|
-
.description('Open a workflow file in Studio')
|
|
309
|
-
.option('-s, --server <url>', 'Studio URL', DEFAULT_SERVER_URL)
|
|
310
|
-
.action(wrapAction(async (filePath, options) => {
|
|
311
|
-
await uiOpenWorkflow(filePath, options);
|
|
312
|
-
}));
|
|
313
|
-
uiCmd
|
|
314
|
-
.command('get-state')
|
|
315
|
-
.description('Return current workflow state from Studio')
|
|
316
|
-
.option('-s, --server <url>', 'Studio URL', DEFAULT_SERVER_URL)
|
|
317
|
-
.action(wrapAction(async (options) => {
|
|
318
|
-
await uiGetState(options);
|
|
319
|
-
}));
|
|
320
|
-
uiCmd
|
|
321
|
-
.command('batch <json>')
|
|
322
|
-
.description('Execute a batch of commands with auto-snapshot rollback')
|
|
323
|
-
.option('-s, --server <url>', 'Studio URL', DEFAULT_SERVER_URL)
|
|
324
|
-
.action(wrapAction(async (json, options) => {
|
|
325
|
-
await uiBatch(json, options);
|
|
326
|
-
}));
|
|
327
267
|
// Create command (with subcommands)
|
|
328
268
|
const createCmd = program.command('create').description('Create workflows or nodes from templates');
|
|
329
269
|
createCmd
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
* Template lists are generated from the actual template registries.
|
|
7
7
|
*/
|
|
8
8
|
import { workflowTemplates, nodeTemplates } from '../../cli/templates/index.js';
|
|
9
|
-
import { DEFAULT_SERVER_URL } from '../../defaults.js';
|
|
10
9
|
/**
|
|
11
10
|
* CLI command definitions - single source of truth for CLI documentation
|
|
12
11
|
*/
|
|
@@ -16,6 +15,7 @@ export const CLI_COMMANDS = [
|
|
|
16
15
|
name: 'compile',
|
|
17
16
|
syntax: 'flow-weaver compile <file> [options]',
|
|
18
17
|
description: 'Compile workflow source file',
|
|
18
|
+
botCompatible: true,
|
|
19
19
|
options: [
|
|
20
20
|
{ flags: '-o, --output', arg: '<path>', description: 'Output file or directory' },
|
|
21
21
|
{ flags: '-p, --production', description: 'Production build (no debug events)' },
|
|
@@ -31,6 +31,7 @@ export const CLI_COMMANDS = [
|
|
|
31
31
|
name: 'validate',
|
|
32
32
|
syntax: 'flow-weaver validate <file> [options]',
|
|
33
33
|
description: 'Validate workflow without compiling',
|
|
34
|
+
botCompatible: true,
|
|
34
35
|
options: [
|
|
35
36
|
{ flags: '-w, --workflow-name', arg: '<name>', description: 'Target specific workflow' },
|
|
36
37
|
{ flags: '--json', description: 'Output as JSON', exclusive: 'output-mode' },
|
|
@@ -43,6 +44,7 @@ export const CLI_COMMANDS = [
|
|
|
43
44
|
name: 'describe',
|
|
44
45
|
syntax: 'flow-weaver describe <file> [options]',
|
|
45
46
|
description: 'Output workflow structure in LLM-friendly formats (JSON, text, mermaid)',
|
|
47
|
+
botCompatible: true,
|
|
46
48
|
options: [
|
|
47
49
|
{ flags: '-f, --format', arg: 'json|text|mermaid|paths', description: 'Output format (paths: enumerate all Start-to-Exit paths via DFS)' },
|
|
48
50
|
{ flags: '-w, --workflow-name', arg: '<name>', description: 'Target workflow' },
|
|
@@ -54,6 +56,7 @@ export const CLI_COMMANDS = [
|
|
|
54
56
|
name: 'run',
|
|
55
57
|
syntax: 'flow-weaver run <file> [options]',
|
|
56
58
|
description: 'Execute a workflow file directly',
|
|
59
|
+
botCompatible: true,
|
|
57
60
|
options: [
|
|
58
61
|
{ flags: '-w, --workflow', arg: '<name>', description: 'Specific workflow to run' },
|
|
59
62
|
{ flags: '--params', arg: '<json>', description: 'Input parameters as JSON string', exclusive: 'params' },
|
|
@@ -83,6 +86,7 @@ export const CLI_COMMANDS = [
|
|
|
83
86
|
name: 'create workflow',
|
|
84
87
|
syntax: 'flow-weaver create workflow <template> <file> [options]',
|
|
85
88
|
description: 'Create new workflow from template',
|
|
89
|
+
botCompatible: true,
|
|
86
90
|
group: 'create',
|
|
87
91
|
positionalChoices: {
|
|
88
92
|
template: workflowTemplates.map(t => ({ id: t.id, label: t.id })),
|
|
@@ -104,6 +108,7 @@ export const CLI_COMMANDS = [
|
|
|
104
108
|
name: 'create node',
|
|
105
109
|
syntax: 'flow-weaver create node <name> <file> [options]',
|
|
106
110
|
description: 'Create a node type from template',
|
|
111
|
+
botCompatible: true,
|
|
107
112
|
group: 'create',
|
|
108
113
|
options: [
|
|
109
114
|
{ flags: '-t, --template', arg: nodeTemplates.map(t => t.id).join('|'), description: 'Node template to use', defaultValue: 'processor' },
|
|
@@ -116,6 +121,7 @@ export const CLI_COMMANDS = [
|
|
|
116
121
|
name: 'templates',
|
|
117
122
|
syntax: 'flow-weaver templates [--json]',
|
|
118
123
|
description: `List available workflow templates (${workflowTemplates.length} total)`,
|
|
124
|
+
botCompatible: true,
|
|
119
125
|
listStyle: 'definition',
|
|
120
126
|
options: [
|
|
121
127
|
{ flags: '--json', description: 'Output as JSON' },
|
|
@@ -135,6 +141,7 @@ export const CLI_COMMANDS = [
|
|
|
135
141
|
name: 'pattern list',
|
|
136
142
|
syntax: 'flow-weaver pattern list <path> [--json]',
|
|
137
143
|
description: 'List patterns in file or directory',
|
|
144
|
+
botCompatible: true,
|
|
138
145
|
group: 'pattern',
|
|
139
146
|
options: [
|
|
140
147
|
{ flags: '--json', description: 'Output as JSON' },
|
|
@@ -144,6 +151,7 @@ export const CLI_COMMANDS = [
|
|
|
144
151
|
name: 'pattern apply',
|
|
145
152
|
syntax: 'flow-weaver pattern apply <pattern-file> <target-file> [options]',
|
|
146
153
|
description: 'Apply a pattern to a workflow file',
|
|
154
|
+
botCompatible: true,
|
|
147
155
|
group: 'pattern',
|
|
148
156
|
options: [
|
|
149
157
|
{ flags: '-p, --preview', description: 'Preview changes without writing' },
|
|
@@ -155,6 +163,7 @@ export const CLI_COMMANDS = [
|
|
|
155
163
|
name: 'pattern extract',
|
|
156
164
|
syntax: 'flow-weaver pattern extract <source-file> --nodes <ids> -o <file> [options]',
|
|
157
165
|
description: 'Extract nodes as reusable pattern',
|
|
166
|
+
botCompatible: true,
|
|
158
167
|
group: 'pattern',
|
|
159
168
|
options: [
|
|
160
169
|
{ flags: '--nodes', arg: '<ids>', description: 'Comma-separated list of node IDs to extract', required: true },
|
|
@@ -196,15 +205,40 @@ export const CLI_COMMANDS = [
|
|
|
196
205
|
name: 'doctor',
|
|
197
206
|
syntax: 'flow-weaver doctor [--json]',
|
|
198
207
|
description: 'Check project environment and configuration. Validates Node.js version, TypeScript, package installation, and tsconfig.json settings.',
|
|
208
|
+
botCompatible: true,
|
|
199
209
|
options: [
|
|
200
210
|
{ flags: '--json', description: 'Output results as JSON' },
|
|
201
211
|
],
|
|
202
212
|
},
|
|
213
|
+
// ── Context ─────────────────────────────────────────────────────
|
|
214
|
+
{
|
|
215
|
+
name: 'context',
|
|
216
|
+
syntax: 'flow-weaver context [preset] [options]',
|
|
217
|
+
description: 'Generate LLM context bundle from documentation and grammar',
|
|
218
|
+
botCompatible: true,
|
|
219
|
+
options: [
|
|
220
|
+
{ flags: '--profile', arg: 'standalone|assistant', description: 'Output profile', defaultValue: 'standalone' },
|
|
221
|
+
{ flags: '--topics', arg: '<slugs>', description: 'Comma-separated topic slugs (overrides preset)' },
|
|
222
|
+
{ flags: '--add', arg: '<slugs>', description: 'Extra topic slugs to add to preset' },
|
|
223
|
+
{ flags: '--no-grammar', description: 'Omit EBNF grammar section' },
|
|
224
|
+
{ flags: '-o, --output', arg: '<path>', description: 'Write to file instead of stdout' },
|
|
225
|
+
{ flags: '--list', description: 'List available presets and exit' },
|
|
226
|
+
],
|
|
227
|
+
positionalChoices: {
|
|
228
|
+
preset: [
|
|
229
|
+
{ id: 'core', label: 'core' },
|
|
230
|
+
{ id: 'authoring', label: 'authoring' },
|
|
231
|
+
{ id: 'ops', label: 'ops' },
|
|
232
|
+
{ id: 'full', label: 'full' },
|
|
233
|
+
],
|
|
234
|
+
},
|
|
235
|
+
},
|
|
203
236
|
// ── Export & generation ────────────────────────────────────────
|
|
204
237
|
{
|
|
205
238
|
name: 'export',
|
|
206
239
|
syntax: 'flow-weaver export <file> -t <target> -o <path> [options]',
|
|
207
240
|
description: 'Export workflow as serverless function',
|
|
241
|
+
botCompatible: true,
|
|
208
242
|
options: [
|
|
209
243
|
{ flags: '-t, --target', arg: '<target>', description: 'Target platform (provided by installed packs)', required: true },
|
|
210
244
|
{ flags: '-o, --output', arg: '<path>', description: 'Output directory', required: true },
|
|
@@ -220,6 +254,7 @@ export const CLI_COMMANDS = [
|
|
|
220
254
|
name: 'diff',
|
|
221
255
|
syntax: 'flow-weaver diff <file1> <file2> [options]',
|
|
222
256
|
description: 'Semantic diff between two workflow files',
|
|
257
|
+
botCompatible: true,
|
|
223
258
|
options: [
|
|
224
259
|
{ flags: '-f, --format', arg: 'text|json|compact', description: 'Output format', defaultValue: 'text' },
|
|
225
260
|
{ flags: '-w, --workflow-name', arg: '<name>', description: 'Specific workflow to compare' },
|
|
@@ -249,69 +284,14 @@ export const CLI_COMMANDS = [
|
|
|
249
284
|
],
|
|
250
285
|
},
|
|
251
286
|
// ── Integration commands ───────────────────────────────────────
|
|
252
|
-
{
|
|
253
|
-
name: 'listen',
|
|
254
|
-
syntax: 'flow-weaver listen [options]',
|
|
255
|
-
description: 'Connect to the editor and stream integration events as JSON lines',
|
|
256
|
-
options: [
|
|
257
|
-
{ flags: '-s, --server', arg: '<url>', description: 'Editor URL', defaultValue: DEFAULT_SERVER_URL },
|
|
258
|
-
],
|
|
259
|
-
},
|
|
260
287
|
{
|
|
261
288
|
name: 'mcp-server',
|
|
262
289
|
syntax: 'flow-weaver mcp-server [options]',
|
|
263
290
|
description: 'Start MCP server for Claude Code integration',
|
|
264
291
|
options: [
|
|
265
|
-
{ flags: '-s, --server', arg: '<url>', description: 'Editor URL', defaultValue: DEFAULT_SERVER_URL },
|
|
266
292
|
{ flags: '--stdio', description: 'Run in MCP stdio mode (skip interactive registration)' },
|
|
267
293
|
],
|
|
268
294
|
},
|
|
269
|
-
// ── UI subcommands ─────────────────────────────────────────────
|
|
270
|
-
{
|
|
271
|
-
name: 'ui focus-node',
|
|
272
|
-
syntax: 'flow-weaver ui focus-node <nodeId> [options]',
|
|
273
|
-
description: 'Select and center a node in the editor',
|
|
274
|
-
group: 'ui',
|
|
275
|
-
options: [
|
|
276
|
-
{ flags: '-s, --server', arg: '<url>', description: 'Editor URL', defaultValue: DEFAULT_SERVER_URL },
|
|
277
|
-
],
|
|
278
|
-
},
|
|
279
|
-
{
|
|
280
|
-
name: 'ui add-node',
|
|
281
|
-
syntax: 'flow-weaver ui add-node <nodeTypeName> [options]',
|
|
282
|
-
description: 'Add a node at viewport center',
|
|
283
|
-
group: 'ui',
|
|
284
|
-
options: [
|
|
285
|
-
{ flags: '-s, --server', arg: '<url>', description: 'Editor URL', defaultValue: DEFAULT_SERVER_URL },
|
|
286
|
-
],
|
|
287
|
-
},
|
|
288
|
-
{
|
|
289
|
-
name: 'ui open-workflow',
|
|
290
|
-
syntax: 'flow-weaver ui open-workflow <filePath> [options]',
|
|
291
|
-
description: 'Open a workflow file in the editor',
|
|
292
|
-
group: 'ui',
|
|
293
|
-
options: [
|
|
294
|
-
{ flags: '-s, --server', arg: '<url>', description: 'Editor URL', defaultValue: DEFAULT_SERVER_URL },
|
|
295
|
-
],
|
|
296
|
-
},
|
|
297
|
-
{
|
|
298
|
-
name: 'ui get-state',
|
|
299
|
-
syntax: 'flow-weaver ui get-state [options]',
|
|
300
|
-
description: 'Return current workflow state from the editor',
|
|
301
|
-
group: 'ui',
|
|
302
|
-
options: [
|
|
303
|
-
{ flags: '-s, --server', arg: '<url>', description: 'Editor URL', defaultValue: DEFAULT_SERVER_URL },
|
|
304
|
-
],
|
|
305
|
-
},
|
|
306
|
-
{
|
|
307
|
-
name: 'ui batch',
|
|
308
|
-
syntax: 'flow-weaver ui batch <json> [options]',
|
|
309
|
-
description: 'Execute a batch of commands with auto-snapshot rollback',
|
|
310
|
-
group: 'ui',
|
|
311
|
-
options: [
|
|
312
|
-
{ flags: '-s, --server', arg: '<url>', description: 'Editor URL', defaultValue: DEFAULT_SERVER_URL },
|
|
313
|
-
],
|
|
314
|
-
},
|
|
315
295
|
// ── Plugin subcommands ─────────────────────────────────────────
|
|
316
296
|
{
|
|
317
297
|
name: 'plugin init',
|
|
@@ -330,6 +310,7 @@ export const CLI_COMMANDS = [
|
|
|
330
310
|
name: 'migrate',
|
|
331
311
|
syntax: 'flow-weaver migrate <glob> [options]',
|
|
332
312
|
description: 'Migrate workflow files to current syntax via parse → regenerate round-trip',
|
|
313
|
+
botCompatible: true,
|
|
333
314
|
options: [
|
|
334
315
|
{ flags: '--dry-run', description: 'Preview changes without writing files' },
|
|
335
316
|
{ flags: '--diff', description: 'Show semantic diff before/after' },
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Extractor for MCP tool documentation
|
|
3
3
|
*
|
|
4
4
|
* This defines all MCP tools with their descriptions and parameters.
|
|
5
|
-
* The data is extracted from the tool registration files (tools-query.ts, tools-template.ts, tools-pattern.ts, tools-
|
|
5
|
+
* The data is extracted from the tool registration files (tools-query.ts, tools-template.ts, tools-pattern.ts, tools-export.ts).
|
|
6
6
|
*/
|
|
7
7
|
import type { TMcpToolDoc } from '../types.js';
|
|
8
8
|
/**
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Extractor for MCP tool documentation
|
|
3
3
|
*
|
|
4
4
|
* This defines all MCP tools with their descriptions and parameters.
|
|
5
|
-
* The data is extracted from the tool registration files (tools-query.ts, tools-template.ts, tools-pattern.ts, tools-
|
|
5
|
+
* The data is extracted from the tool registration files (tools-query.ts, tools-template.ts, tools-pattern.ts, tools-export.ts).
|
|
6
6
|
*/
|
|
7
7
|
/**
|
|
8
8
|
* MCP tool definitions - single source of truth for tool documentation
|
|
@@ -410,218 +410,6 @@ export const MCP_TOOLS = [
|
|
|
410
410
|
},
|
|
411
411
|
],
|
|
412
412
|
},
|
|
413
|
-
// Editor tools (tools-editor.ts)
|
|
414
|
-
{
|
|
415
|
-
name: 'fw_get_state',
|
|
416
|
-
description: 'Get the current editor/workflow state from Flow Weaver.',
|
|
417
|
-
category: 'editor',
|
|
418
|
-
params: [],
|
|
419
|
-
},
|
|
420
|
-
{
|
|
421
|
-
name: 'fw_check_events',
|
|
422
|
-
description: 'Get buffered editor events. Returns and clears the event buffer unless peek=true.',
|
|
423
|
-
category: 'editor',
|
|
424
|
-
params: [
|
|
425
|
-
{
|
|
426
|
-
name: 'peek',
|
|
427
|
-
type: 'boolean',
|
|
428
|
-
description: 'If true, return events without clearing the buffer',
|
|
429
|
-
required: false,
|
|
430
|
-
},
|
|
431
|
-
],
|
|
432
|
-
},
|
|
433
|
-
{
|
|
434
|
-
name: 'fw_configure_events',
|
|
435
|
-
description: 'Configure event include/exclude filters, dedup window, and buffer size. Returns the active config after applying updates.',
|
|
436
|
-
category: 'editor',
|
|
437
|
-
params: [
|
|
438
|
-
{
|
|
439
|
-
name: 'include',
|
|
440
|
-
type: 'array',
|
|
441
|
-
description: 'Event types to include',
|
|
442
|
-
required: false,
|
|
443
|
-
},
|
|
444
|
-
{
|
|
445
|
-
name: 'exclude',
|
|
446
|
-
type: 'array',
|
|
447
|
-
description: 'Event types to exclude',
|
|
448
|
-
required: false,
|
|
449
|
-
},
|
|
450
|
-
{
|
|
451
|
-
name: 'dedupeWindowMs',
|
|
452
|
-
type: 'number',
|
|
453
|
-
description: 'Deduplication window in milliseconds',
|
|
454
|
-
required: false,
|
|
455
|
-
},
|
|
456
|
-
{
|
|
457
|
-
name: 'maxBufferSize',
|
|
458
|
-
type: 'number',
|
|
459
|
-
description: 'Maximum event buffer size',
|
|
460
|
-
required: false,
|
|
461
|
-
},
|
|
462
|
-
],
|
|
463
|
-
},
|
|
464
|
-
{
|
|
465
|
-
name: 'fw_focus_node',
|
|
466
|
-
description: 'Select and center a node in the Flow Weaver editor.',
|
|
467
|
-
category: 'editor',
|
|
468
|
-
params: [
|
|
469
|
-
{
|
|
470
|
-
name: 'nodeId',
|
|
471
|
-
type: 'string',
|
|
472
|
-
description: 'ID of the node to focus',
|
|
473
|
-
required: true,
|
|
474
|
-
},
|
|
475
|
-
],
|
|
476
|
-
},
|
|
477
|
-
{
|
|
478
|
-
name: 'fw_add_node',
|
|
479
|
-
description: 'Add a new node to the workflow in the Flow Weaver editor.',
|
|
480
|
-
category: 'editor',
|
|
481
|
-
params: [
|
|
482
|
-
{
|
|
483
|
-
name: 'nodeTypeName',
|
|
484
|
-
type: 'string',
|
|
485
|
-
description: 'Name of the node type to add',
|
|
486
|
-
required: true,
|
|
487
|
-
},
|
|
488
|
-
{
|
|
489
|
-
name: 'nodeTypeDefinition',
|
|
490
|
-
type: 'object',
|
|
491
|
-
description: 'Optional node type definition if creating a new type',
|
|
492
|
-
required: false,
|
|
493
|
-
},
|
|
494
|
-
],
|
|
495
|
-
},
|
|
496
|
-
{
|
|
497
|
-
name: 'fw_remove_node',
|
|
498
|
-
description: 'Remove a node and its connections from the workflow.',
|
|
499
|
-
category: 'editor',
|
|
500
|
-
params: [
|
|
501
|
-
{
|
|
502
|
-
name: 'nodeName',
|
|
503
|
-
type: 'string',
|
|
504
|
-
description: 'Name of the node to remove',
|
|
505
|
-
required: true,
|
|
506
|
-
},
|
|
507
|
-
],
|
|
508
|
-
},
|
|
509
|
-
{
|
|
510
|
-
name: 'fw_connect',
|
|
511
|
-
description: 'Add or remove a connection between ports.',
|
|
512
|
-
category: 'editor',
|
|
513
|
-
params: [
|
|
514
|
-
{
|
|
515
|
-
name: 'action',
|
|
516
|
-
type: 'string',
|
|
517
|
-
description: 'Whether to add or remove the connection',
|
|
518
|
-
required: true,
|
|
519
|
-
enum: ['add', 'remove'],
|
|
520
|
-
},
|
|
521
|
-
{
|
|
522
|
-
name: 'connection',
|
|
523
|
-
type: 'object',
|
|
524
|
-
description: 'Connection details: { sourceNode, sourcePort, targetNode, targetPort }',
|
|
525
|
-
required: true,
|
|
526
|
-
},
|
|
527
|
-
],
|
|
528
|
-
},
|
|
529
|
-
{
|
|
530
|
-
name: 'fw_open_workflow',
|
|
531
|
-
description: 'Open a workflow file in the Flow Weaver editor.',
|
|
532
|
-
category: 'editor',
|
|
533
|
-
params: [
|
|
534
|
-
{
|
|
535
|
-
name: 'filePath',
|
|
536
|
-
type: 'string',
|
|
537
|
-
description: 'Path to the workflow file to open',
|
|
538
|
-
required: true,
|
|
539
|
-
},
|
|
540
|
-
],
|
|
541
|
-
},
|
|
542
|
-
{
|
|
543
|
-
name: 'fw_send_command',
|
|
544
|
-
description: 'Send a generic command to the Flow Weaver editor.',
|
|
545
|
-
category: 'editor',
|
|
546
|
-
params: [
|
|
547
|
-
{
|
|
548
|
-
name: 'action',
|
|
549
|
-
type: 'string',
|
|
550
|
-
description: 'Command action name',
|
|
551
|
-
required: true,
|
|
552
|
-
},
|
|
553
|
-
{
|
|
554
|
-
name: 'params',
|
|
555
|
-
type: 'object',
|
|
556
|
-
description: 'Optional command parameters',
|
|
557
|
-
required: false,
|
|
558
|
-
},
|
|
559
|
-
],
|
|
560
|
-
},
|
|
561
|
-
{
|
|
562
|
-
name: 'fw_batch',
|
|
563
|
-
description: 'Execute a batch of commands with auto-snapshot rollback support.',
|
|
564
|
-
category: 'editor',
|
|
565
|
-
params: [
|
|
566
|
-
{
|
|
567
|
-
name: 'commands',
|
|
568
|
-
type: 'array',
|
|
569
|
-
description: 'Array of commands to execute. Each command has { action, params? }.',
|
|
570
|
-
required: true,
|
|
571
|
-
},
|
|
572
|
-
],
|
|
573
|
-
},
|
|
574
|
-
{
|
|
575
|
-
name: 'fw_undo_redo',
|
|
576
|
-
description: 'Undo or redo the last workflow change.',
|
|
577
|
-
category: 'editor',
|
|
578
|
-
params: [
|
|
579
|
-
{
|
|
580
|
-
name: 'action',
|
|
581
|
-
type: 'string',
|
|
582
|
-
description: 'Whether to undo or redo',
|
|
583
|
-
required: true,
|
|
584
|
-
enum: ['undo', 'redo'],
|
|
585
|
-
},
|
|
586
|
-
],
|
|
587
|
-
},
|
|
588
|
-
{
|
|
589
|
-
name: 'fw_execute_workflow',
|
|
590
|
-
description: 'Run the current workflow with optional parameters and return the result.',
|
|
591
|
-
category: 'editor',
|
|
592
|
-
params: [
|
|
593
|
-
{
|
|
594
|
-
name: 'filePath',
|
|
595
|
-
type: 'string',
|
|
596
|
-
description: 'Path to workflow file (uses current if omitted)',
|
|
597
|
-
required: false,
|
|
598
|
-
},
|
|
599
|
-
{
|
|
600
|
-
name: 'workflowName',
|
|
601
|
-
type: 'string',
|
|
602
|
-
description: 'Specific workflow name',
|
|
603
|
-
required: false,
|
|
604
|
-
},
|
|
605
|
-
{
|
|
606
|
-
name: 'params',
|
|
607
|
-
type: 'object',
|
|
608
|
-
description: 'Input parameters for the workflow',
|
|
609
|
-
required: false,
|
|
610
|
-
},
|
|
611
|
-
{
|
|
612
|
-
name: 'includeTrace',
|
|
613
|
-
type: 'boolean',
|
|
614
|
-
description: 'Include execution trace events',
|
|
615
|
-
required: false,
|
|
616
|
-
},
|
|
617
|
-
],
|
|
618
|
-
},
|
|
619
|
-
{
|
|
620
|
-
name: 'fw_get_workflow_details',
|
|
621
|
-
description: 'Get full workflow structure including nodes, connections, types, and positions.',
|
|
622
|
-
category: 'editor',
|
|
623
|
-
params: [],
|
|
624
|
-
},
|
|
625
413
|
// Export tools (tools-export.ts)
|
|
626
414
|
{
|
|
627
415
|
name: 'fw_export',
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.21.0";
|
|
2
2
|
//# sourceMappingURL=generated-version.d.ts.map
|
package/dist/mcp/index.d.ts
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
export type { McpServerOptions, RegistrationDeps,
|
|
2
|
-
export { EventBuffer } from './event-buffer.js';
|
|
3
|
-
export { EditorConnection } from './editor-connection.js';
|
|
1
|
+
export type { McpServerOptions, RegistrationDeps, } from './types.js';
|
|
4
2
|
export { offerClaudeRegistration } from './auto-registration.js';
|
|
5
3
|
export { makeToolResult, makeErrorResult } from './response-utils.js';
|
|
6
|
-
export { registerEditorTools } from './tools-editor.js';
|
|
7
4
|
export { registerQueryTools } from './tools-query.js';
|
|
8
5
|
export { registerTemplateTools } from './tools-template.js';
|
|
9
6
|
export { registerPatternTools } from './tools-pattern.js';
|
|
10
7
|
export { registerDebugTools } from './tools-debug.js';
|
|
11
|
-
export { registerResources } from './resources.js';
|
|
12
8
|
export { registerPrompts } from './prompts.js';
|
|
13
9
|
export { startMcpServer, mcpServerCommand } from './server.js';
|
|
14
10
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/mcp/index.js
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
export { EventBuffer } from './event-buffer.js';
|
|
2
|
-
export { EditorConnection } from './editor-connection.js';
|
|
3
1
|
export { offerClaudeRegistration } from './auto-registration.js';
|
|
4
2
|
export { makeToolResult, makeErrorResult } from './response-utils.js';
|
|
5
|
-
export { registerEditorTools } from './tools-editor.js';
|
|
6
3
|
export { registerQueryTools } from './tools-query.js';
|
|
7
4
|
export { registerTemplateTools } from './tools-template.js';
|
|
8
5
|
export { registerPatternTools } from './tools-pattern.js';
|
|
9
6
|
export { registerDebugTools } from './tools-debug.js';
|
|
10
|
-
export { registerResources } from './resources.js';
|
|
11
7
|
export { registerPrompts } from './prompts.js';
|
|
12
8
|
export { startMcpServer, mcpServerCommand } from './server.js';
|
|
13
9
|
//# sourceMappingURL=index.js.map
|