@loompad/cli 1.2.2 → 1.2.4

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.
Files changed (49) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/README.md +10 -0
  3. package/dist/cli/index.js +59 -7
  4. package/dist/cli/index.js.map +1 -1
  5. package/dist/core/crew.d.ts +16 -1
  6. package/dist/core/crew.js +26 -2
  7. package/dist/core/crew.js.map +1 -1
  8. package/dist/core/orchestra.d.ts +36 -0
  9. package/dist/core/orchestra.js +154 -82
  10. package/dist/core/orchestra.js.map +1 -1
  11. package/dist/core/team-hub.d.ts +2 -1
  12. package/dist/core/team-hub.js +1 -1
  13. package/dist/core/team-hub.js.map +1 -1
  14. package/dist/core/team-leases.d.ts +7 -0
  15. package/dist/core/team-leases.js +19 -0
  16. package/dist/core/team-leases.js.map +1 -1
  17. package/dist/daemon/client.d.ts +12 -1
  18. package/dist/daemon/client.js +5 -2
  19. package/dist/daemon/client.js.map +1 -1
  20. package/dist/daemon/routes/brain.js +2 -2
  21. package/dist/daemon/routes/brain.js.map +1 -1
  22. package/dist/daemon/routes/orchestra.js +1 -0
  23. package/dist/daemon/routes/orchestra.js.map +1 -1
  24. package/dist/daemon/routes/project-team.js +17 -0
  25. package/dist/daemon/routes/project-team.js.map +1 -1
  26. package/dist/daemon/runner.d.ts +11 -0
  27. package/dist/daemon/runner.js +111 -5
  28. package/dist/daemon/runner.js.map +1 -1
  29. package/dist/daemon/runtime/briefings.js +12 -1
  30. package/dist/daemon/runtime/briefings.js.map +1 -1
  31. package/dist/daemon/runtime.d.ts +9 -2
  32. package/dist/daemon/runtime.js +8 -4
  33. package/dist/daemon/runtime.js.map +1 -1
  34. package/dist/daemon/team-coordinator.d.ts +27 -3
  35. package/dist/daemon/team-coordinator.js +54 -2
  36. package/dist/daemon/team-coordinator.js.map +1 -1
  37. package/dist/daemon/team.d.ts +42 -1
  38. package/dist/daemon/team.js +92 -1
  39. package/dist/daemon/team.js.map +1 -1
  40. package/dist/hub/supabase-client.d.ts +4 -2
  41. package/dist/hub/supabase-client.js +21 -12
  42. package/dist/hub/supabase-client.js.map +1 -1
  43. package/dist/web/app.css +12 -0
  44. package/dist/web/app.js +140 -28
  45. package/dist/web/app.js.map +3 -3
  46. package/docs/release-notes/v1.2.3.md +29 -0
  47. package/docs/release-notes/v1.2.4.md +13 -0
  48. package/docs/teams.md +31 -0
  49. package/package.json +1 -1
@@ -474,6 +474,7 @@ export class ProjectRuntime {
474
474
  projectId: info.id,
475
475
  projectName: info.name,
476
476
  projectDir: info.dir,
477
+ worktreeDir: () => this.config.orchestra?.worktreeDir,
477
478
  crews: () => this.config.crews ?? [],
478
479
  saveCrews: (crews) => {
479
480
  if (crews.length)
@@ -2570,9 +2571,9 @@ export class ProjectRuntime {
2570
2571
  * ("test_reach.py" became "testreach.py") and briefings carried them on.
2571
2572
  * Rebuild each from the review finding (kept intact) and the planner's own
2572
2573
  * reply, still in the chat — the note exactly as written (#318). Returns
2573
- * how many memories were mended.
2574
+ * how many memories were mended, and each change; `dryRun` only reports (#326).
2574
2575
  */
2575
- repairDecisions() {
2576
+ repairDecisions(opts = {}) {
2576
2577
  const findings = [];
2577
2578
  const chats = new Map(); // finding id → the review's chat
2578
2579
  for (const e of this.log.list({ kinds: ["review"] })) {
@@ -2584,6 +2585,7 @@ export class ProjectRuntime {
2584
2585
  }
2585
2586
  }
2586
2587
  let repaired = 0, checked = 0;
2588
+ const changes = [];
2587
2589
  for (const m of this.brain.all()) {
2588
2590
  if (m.kind !== "decision" || !m.text.startsWith("Review finding accepted ("))
2589
2591
  continue;
@@ -2605,10 +2607,12 @@ export class ProjectRuntime {
2605
2607
  const fixed = decisionText(f, note);
2606
2608
  if (fixed === m.text)
2607
2609
  continue;
2608
- this.brain.update(m.id, { text: fixed }, "loom");
2610
+ changes.push({ id: m.id, before: m.text, after: fixed });
2611
+ if (!opts.dryRun)
2612
+ this.brain.update(m.id, { text: fixed }, "loom");
2609
2613
  repaired++;
2610
2614
  }
2611
- return { repaired, checked };
2615
+ return { repaired, checked, changes };
2612
2616
  }
2613
2617
  /** Resolves once the agent isn't mid-turn (or after `maxMs`, when the send gets the adapter's own answer). */
2614
2618
  async whenIdle(agentId, maxMs = 20 * 60_000) {