speccore 8.3.169 → 8.3.170
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/commands/execute.d.ts.map +1 -1
- package/dist/commands/execute.js +32 -0
- package/dist/commands/execute.js.map +1 -1
- package/dist/commands/iteration/split.d.ts.map +1 -1
- package/dist/commands/iteration/split.js +31 -2
- package/dist/commands/iteration/split.js.map +1 -1
- package/dist/commands/plan.d.ts.map +1 -1
- package/dist/commands/plan.js +31 -0
- package/dist/commands/plan.js.map +1 -1
- package/package.json +1 -1
|
@@ -454,13 +454,42 @@ async function iterationSplitCommand(options) {
|
|
|
454
454
|
}
|
|
455
455
|
catch { /* 忽略功能模块检测失败 */ }
|
|
456
456
|
// v8.3.166+: 输出 subagent 标记(task-decomposer)
|
|
457
|
+
// v8.3.169+: 尝试通过 Qoder SDK 直接调度子 Agent
|
|
458
|
+
const promptText = (0, prompt_builder_1.formatPrompt)(prompt) + featureBatchHint;
|
|
459
|
+
if (!process.stdout.isTTY) {
|
|
460
|
+
try {
|
|
461
|
+
const agentCtx = {
|
|
462
|
+
subagent: 'task-decomposer',
|
|
463
|
+
iteration: iter || '',
|
|
464
|
+
contextBudget: 12000,
|
|
465
|
+
contextType: 'full',
|
|
466
|
+
cwd: process.cwd(),
|
|
467
|
+
};
|
|
468
|
+
const dispatchResult = await (0, agent_adapter_1.dispatchSubagent)(agentCtx, promptText);
|
|
469
|
+
if (dispatchResult && dispatchResult.success) {
|
|
470
|
+
logger_1.logger.info(`[split] 子 Agent task-decomposer SDK 调度成功`);
|
|
471
|
+
process.stdout.write(`\n[SPECCORE_RESULT] 子 Agent task-decomposer 通过 Qoder SDK 完成执行\n`);
|
|
472
|
+
if (dispatchResult.filesChanged && dispatchResult.filesChanged.length > 0) {
|
|
473
|
+
process.stdout.write(`📄 文件变更: ${dispatchResult.filesChanged.join(', ')}\n`);
|
|
474
|
+
}
|
|
475
|
+
if (dispatchResult.content) {
|
|
476
|
+
process.stdout.write(`\n--- 执行结果 ---\n${dispatchResult.content.slice(0, 3000)}${dispatchResult.content.length > 3000 ? '\n... (截断)' : ''}\n`);
|
|
477
|
+
}
|
|
478
|
+
process.stdout.write(`\n> 请审查上述结果,确认后执行 speccore iteration split --response 写入任务\n`);
|
|
479
|
+
process.exitCode = 0;
|
|
480
|
+
return;
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
catch (e) {
|
|
484
|
+
logger_1.logger.debug(`[split] SDK 调度尝试失败: ${e.message},回退到 Prompt 模式`);
|
|
485
|
+
}
|
|
486
|
+
}
|
|
457
487
|
const output = [
|
|
458
488
|
`[SPECCORE_SUBAGENT: task-decomposer]`,
|
|
459
489
|
`[SPECCORE_CONTEXT_BUDGET: 12000]`,
|
|
460
490
|
`[SPECCORE_CONTEXT_TYPE: full]`,
|
|
461
491
|
``,
|
|
462
|
-
|
|
463
|
-
featureBatchHint,
|
|
492
|
+
promptText,
|
|
464
493
|
].join('\n');
|
|
465
494
|
process.stdout.write(output);
|
|
466
495
|
process.exitCode = 10;
|