@claude-flow/cli 3.0.0-alpha.156 → 3.0.0-alpha.157
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/src/commands/hooks.d.ts.map +1 -1
- package/dist/src/commands/hooks.js +22 -16
- package/dist/src/commands/hooks.js.map +1 -1
- package/dist/src/mcp-tools/agent-tools.js +7 -7
- package/dist/src/mcp-tools/analyze-tools.js +6 -6
- package/dist/src/mcp-tools/browser-tools.js +23 -23
- package/dist/src/mcp-tools/claims-tools.js +12 -12
- package/dist/src/mcp-tools/config-tools.js +6 -6
- package/dist/src/mcp-tools/coordination-tools.js +7 -7
- package/dist/src/mcp-tools/daa-tools.js +8 -8
- package/dist/src/mcp-tools/embeddings-tools.js +7 -7
- package/dist/src/mcp-tools/github-tools.js +5 -5
- package/dist/src/mcp-tools/hive-mind-tools.js +9 -9
- package/dist/src/mcp-tools/hooks-tools.js +44 -44
- package/dist/src/mcp-tools/memory-tools.js +6 -6
- package/dist/src/mcp-tools/neural-tools.js +6 -6
- package/dist/src/mcp-tools/performance-tools.js +6 -6
- package/dist/src/mcp-tools/progress-tools.js +4 -4
- package/dist/src/mcp-tools/session-tools.js +5 -5
- package/dist/src/mcp-tools/swarm-tools.js +4 -4
- package/dist/src/mcp-tools/system-tools.js +5 -5
- package/dist/src/mcp-tools/task-tools.js +6 -6
- package/dist/src/mcp-tools/terminal-tools.js +5 -5
- package/dist/src/mcp-tools/transfer-tools.js +11 -11
- package/dist/src/mcp-tools/workflow-tools.js +9 -9
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/commands/hooks.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAiC,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/commands/hooks.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAiC,MAAM,aAAa,CAAC;AAyjI1E,eAAO,MAAM,YAAY,EAAE,OAiG1B,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -139,9 +139,9 @@ const postEditCommand = {
|
|
|
139
139
|
{
|
|
140
140
|
name: 'success',
|
|
141
141
|
short: 's',
|
|
142
|
-
description: 'Whether the edit was successful
|
|
142
|
+
description: 'Whether the edit was successful',
|
|
143
143
|
type: 'boolean',
|
|
144
|
-
|
|
144
|
+
required: true
|
|
145
145
|
},
|
|
146
146
|
{
|
|
147
147
|
name: 'outcome',
|
|
@@ -167,8 +167,10 @@ const postEditCommand = {
|
|
|
167
167
|
output.printError('File path is required. Use --file or -f flag.');
|
|
168
168
|
return { success: false, exitCode: 1 };
|
|
169
169
|
}
|
|
170
|
-
|
|
171
|
-
|
|
170
|
+
if (success === undefined) {
|
|
171
|
+
output.printError('Success flag is required. Use --success true/false.');
|
|
172
|
+
return { success: false, exitCode: 1 };
|
|
173
|
+
}
|
|
172
174
|
output.printInfo(`Recording outcome for: ${output.highlight(filePath)}`);
|
|
173
175
|
try {
|
|
174
176
|
// Parse metrics if provided
|
|
@@ -185,7 +187,7 @@ const postEditCommand = {
|
|
|
185
187
|
// Call MCP tool for post-edit hook
|
|
186
188
|
const result = await callMCPTool('hooks/post-edit', {
|
|
187
189
|
filePath,
|
|
188
|
-
success
|
|
190
|
+
success,
|
|
189
191
|
outcome: ctx.flags.outcome,
|
|
190
192
|
metrics,
|
|
191
193
|
timestamp: Date.now(),
|
|
@@ -335,9 +337,9 @@ const postCommandCommand = {
|
|
|
335
337
|
{
|
|
336
338
|
name: 'success',
|
|
337
339
|
short: 's',
|
|
338
|
-
description: 'Whether the command succeeded
|
|
340
|
+
description: 'Whether the command succeeded',
|
|
339
341
|
type: 'boolean',
|
|
340
|
-
|
|
342
|
+
required: true
|
|
341
343
|
},
|
|
342
344
|
{
|
|
343
345
|
name: 'exit-code',
|
|
@@ -364,14 +366,16 @@ const postCommandCommand = {
|
|
|
364
366
|
output.printError('Command is required. Use --command or -c flag.');
|
|
365
367
|
return { success: false, exitCode: 1 };
|
|
366
368
|
}
|
|
367
|
-
|
|
368
|
-
|
|
369
|
+
if (success === undefined) {
|
|
370
|
+
output.printError('Success flag is required. Use --success true/false.');
|
|
371
|
+
return { success: false, exitCode: 1 };
|
|
372
|
+
}
|
|
369
373
|
output.printInfo(`Recording command outcome: ${output.highlight(command)}`);
|
|
370
374
|
try {
|
|
371
375
|
// Call MCP tool for post-command hook
|
|
372
376
|
const result = await callMCPTool('hooks/post-command', {
|
|
373
377
|
command,
|
|
374
|
-
success
|
|
378
|
+
success,
|
|
375
379
|
exitCode: ctx.flags.exitCode || 0,
|
|
376
380
|
duration: ctx.flags.duration,
|
|
377
381
|
timestamp: Date.now(),
|
|
@@ -1277,9 +1281,9 @@ const postTaskCommand = {
|
|
|
1277
1281
|
{
|
|
1278
1282
|
name: 'success',
|
|
1279
1283
|
short: 's',
|
|
1280
|
-
description: 'Whether the task succeeded
|
|
1284
|
+
description: 'Whether the task succeeded',
|
|
1281
1285
|
type: 'boolean',
|
|
1282
|
-
|
|
1286
|
+
required: true
|
|
1283
1287
|
},
|
|
1284
1288
|
{
|
|
1285
1289
|
name: 'quality',
|
|
@@ -1302,13 +1306,15 @@ const postTaskCommand = {
|
|
|
1302
1306
|
// Auto-generate task ID if not provided
|
|
1303
1307
|
const taskId = ctx.flags.taskId || `task_${Date.now()}_${Math.random().toString(36).slice(2, 8)}`;
|
|
1304
1308
|
const success = ctx.flags.success;
|
|
1305
|
-
|
|
1306
|
-
|
|
1309
|
+
if (success === undefined) {
|
|
1310
|
+
output.printError('Success flag is required. Use --success true/false.');
|
|
1311
|
+
return { success: false, exitCode: 1 };
|
|
1312
|
+
}
|
|
1307
1313
|
output.printInfo(`Recording outcome for task: ${output.highlight(taskId)}`);
|
|
1308
1314
|
try {
|
|
1309
1315
|
const result = await callMCPTool('hooks/post-task', {
|
|
1310
1316
|
taskId,
|
|
1311
|
-
success
|
|
1317
|
+
success,
|
|
1312
1318
|
quality: ctx.flags.quality,
|
|
1313
1319
|
agent: ctx.flags.agent,
|
|
1314
1320
|
timestamp: Date.now(),
|
|
@@ -1318,7 +1324,7 @@ const postTaskCommand = {
|
|
|
1318
1324
|
return { success: true, data: result };
|
|
1319
1325
|
}
|
|
1320
1326
|
output.writeln();
|
|
1321
|
-
output.printSuccess(`Task outcome recorded: ${
|
|
1327
|
+
output.printSuccess(`Task outcome recorded: ${success ? 'SUCCESS' : 'FAILED'}`);
|
|
1322
1328
|
output.writeln();
|
|
1323
1329
|
output.writeln(output.bold('Learning Updates'));
|
|
1324
1330
|
output.printTable({
|