neurastream 0.2.72 → 0.2.73

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neurastream",
3
- "version": "0.2.72",
3
+ "version": "0.2.73",
4
4
  "description": "Guardrails for running many AI coding agents at once: plan queue, blockers, call budgets, provider caps, scoring, merge-verified close.",
5
5
  "keywords": [
6
6
  "ai-agents",
@@ -1355,12 +1355,16 @@ function subRules(e: ToolEvent, input: Record<string, unknown>, paths: string[],
1355
1355
  for (const plan of plans) {
1356
1356
  const hit = paths.filter(p => !q.isOrchestrationPath(p, plans) && q.planCovers(plan, p, plans));
1357
1357
  if (!hit.length) continue;
1358
- if (plan.errors.length) return `plan ${plan.file} is invalid (${plan.errors.join("; ")}). Stop and report to Main.`;
1358
+ // An invalid plan stops code writes, not reads and not the repair of plan files: refusing those
1359
+ // too left a planner unable to fix the very errors the guard named (writes are checked before
1360
+ // the file is valid, so no valid text could ever land).
1361
+ const readOnly = cfg.guards.read_tools.includes(e.tool) || (cfg.guards.shell_tools.includes(e.tool) && !writes.length && !writesShellText(input, cfg));
1362
+ const planRepair = writes.length > 0 && writes.every(w => q.planAt(w, plans));
1363
+ if (plan.errors.length && !readOnly && !planRepair) return `plan ${plan.file} is invalid (${plan.errors.join("; ")}). Stop and report to Main.`;
1359
1364
  // P5c (plan 20261031_1207): reads and read-only shell calls skip the phase-0 blockers — a
1360
1365
  // failing blocker used to deny every read of a covered path and send the worker back blind.
1361
1366
  // The shell filter is the review lock's (writesShellText), so landing text keeps its blocker.
1362
- const readOnly = cfg.guards.read_tools.includes(e.tool) || (cfg.guards.shell_tools.includes(e.tool) && !writes.length && !writesShellText(input, cfg));
1363
- if (!readOnly) {
1367
+ if (!readOnly && !planRepair) {
1364
1368
  const why = runBlockers(plan, hit, e, cfg);
1365
1369
  if (why) return why;
1366
1370
  }