@multiclawcli/core 0.10.1 → 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 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?.filter(
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();
@@ -75,6 +75,7 @@ export declare class Orchestrator {
75
75
  * reader looking in the wrong place.
76
76
  */
77
77
  private selectAgents;
78
+ private resolveEffectiveDeps;
78
79
  private runStage;
79
80
  /**
80
81
  * Whether `agent` owns task decomposition.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@multiclawcli/core",
3
- "version": "0.10.1",
3
+ "version": "0.11.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",