@multiclawcli/core 0.10.0 → 0.11.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/index.js +28 -3
- package/dist/orchestrator/Orchestrator.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3252,13 +3252,38 @@ Address these findings within your assigned scope, preserve the complete task re
|
|
|
3252
3252
|
payload: { agentId: agent.id, agentName: agent.name, icon: agent.icon }
|
|
3253
3253
|
});
|
|
3254
3254
|
}
|
|
3255
|
+
const agentMap = new Map(this.config.agents.map((a) => [a.id, a]));
|
|
3255
3256
|
return this.config.agents.filter((a) => runSet.has(a.id) && a.id !== this.config.review?.reviewer).map((a) => ({
|
|
3256
3257
|
...a,
|
|
3257
|
-
dependsOn: a.dependsOn
|
|
3258
|
-
(dep) => !skippedIds.has(dep) && dep !== this.config.review?.reviewer
|
|
3259
|
-
)
|
|
3258
|
+
dependsOn: a.dependsOn !== void 0 ? this.resolveEffectiveDeps(a.dependsOn, skippedIds, agentMap) : void 0
|
|
3260
3259
|
}));
|
|
3261
3260
|
}
|
|
3261
|
+
// When an intermediate agent is skipped, replace it in dependsOn with its own
|
|
3262
|
+
// dependencies (recursively). This preserves topological ordering across gaps:
|
|
3263
|
+
// code-reviewer → tester (skip) → backend-developer becomes
|
|
3264
|
+
// code-reviewer → backend-developer, so the reviewer never runs before the code is written.
|
|
3265
|
+
resolveEffectiveDeps(deps, skippedIds, agentMap, visited = /* @__PURE__ */ new Set()) {
|
|
3266
|
+
const reviewerId = this.config.review?.reviewer;
|
|
3267
|
+
const result = /* @__PURE__ */ new Set();
|
|
3268
|
+
for (const id of deps) {
|
|
3269
|
+
if (id === reviewerId) continue;
|
|
3270
|
+
if (visited.has(id)) continue;
|
|
3271
|
+
if (!skippedIds.has(id)) {
|
|
3272
|
+
result.add(id);
|
|
3273
|
+
} else {
|
|
3274
|
+
visited.add(id);
|
|
3275
|
+
for (const transitive of this.resolveEffectiveDeps(
|
|
3276
|
+
agentMap.get(id)?.dependsOn ?? [],
|
|
3277
|
+
skippedIds,
|
|
3278
|
+
agentMap,
|
|
3279
|
+
visited
|
|
3280
|
+
)) {
|
|
3281
|
+
result.add(transitive);
|
|
3282
|
+
}
|
|
3283
|
+
}
|
|
3284
|
+
}
|
|
3285
|
+
return [...result];
|
|
3286
|
+
}
|
|
3262
3287
|
async runStage(agents2, signal) {
|
|
3263
3288
|
const { maxConcurrency } = this.config;
|
|
3264
3289
|
const results = /* @__PURE__ */ new Map();
|