karajan-code 2.12.0 → 2.13.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/README.md CHANGED
@@ -23,7 +23,9 @@
23
23
 
24
24
  ---
25
25
 
26
- > **v2.12.0 released** — Quality-measurement release. Two new features land together: every `kj run` against a known plan now scores how faithfully the coder followed it (deterministic 0–100 **plan adherence** metric, four weighted components, rendered in `summary.md`), and a small **golden-tasks** regression suite (`todo-rest-api`, `npm-package-cli`, `react-counter-component`) catches output-quality drops between Karajan versions before npm publish. Plus the shrink-budget CI gate now exempts human-facing docs from its 200-LOC ceiling while keeping AI-rule files (CLAUDE.md, AGENTS.md, role prompts) capped. 3 PRs for plan adherence (#645–#647), 4 for golden tasks (#648, #650–#652), 1 for the CI policy (#649). 4522/4522 tests passing. Safe upgrade from 2.11.0.
26
+ > **v2.13.0 released** — HU Board hardening. Five PRs make the board resilient and self-healing after a dogfooding session uncovered four pathologies: a "Karajan needs an answer" prompt modal from days earlier blocking the entire UI, 18 zombi projects reappearing after every `kj board start`, the browser serving stale HTML/JS after a server restart, and the prompt modal showing a transparent background. Now: **tombstones** persist deletes across `fullScan` (`KJC-TSK-0380`), new endpoints `DELETE /api/prompts/:id`, `DELETE /api/plans/:planId`, `GET /api/tombstones`, `POST /api/tombstones/:type/:id/restore`; new command **`kj board cleanup`** sweeps ephemeral projects, orphan prompts and dangling session dirs in one pass; **`Cache-Control: no-store`** + `/api/version` polling auto-reloads the client when the server boot time changes; new **🧹 button** as manual escape hatch; CSS `--bg-secondary` finally declared so modals are opaque. 5 PRs (#654, #655, #656, #657, #658). 4522/4522 tests passing. Safe upgrade from 2.12.0.
27
+ >
28
+ > **v2.12.0** — Quality-measurement release. Two new features land together: every `kj run` against a known plan now scores how faithfully the coder followed it (deterministic 0–100 **plan adherence** metric, four weighted components, rendered in `summary.md`), and a small **golden-tasks** regression suite (`todo-rest-api`, `npm-package-cli`, `react-counter-component`) catches output-quality drops between Karajan versions before npm publish. Plus the shrink-budget CI gate now exempts human-facing docs from its 200-LOC ceiling while keeping AI-rule files (CLAUDE.md, AGENTS.md, role prompts) capped. 3 PRs for plan adherence (#645–#647), 4 for golden tasks (#648, #650–#652), 1 for the CI policy (#649). 4522/4522 tests passing. Safe upgrade from 2.11.0.
27
29
  >
28
30
  > **v2.11.0** — Dogfooding pass release. Two-day pass through a 10-level test plan surfaced and fixed a long tail of UX papercuts and three latent bugs that only show up on fresh `/tmp` repos: the `SonarStage` no longer loops on remoteless projects (was burning iterations until `max_iterations`-fallback-approval), the post-loop `commitAll` now tolerates the locale-specific "nothing to commit" race, the HU sub-pipeline branches off `master`/`HEAD` when the configured `main` doesn't exist, and `runFlow` now seals `session.status` at the boundary so `kj status` never shows zombi `running` runs again. Plus `hu-board` gains automatic ephemeral-project cleanup and an in-UI help modal for the five views. 14 PRs (#624–#637), 4452/4452 tests passing. Safe upgrade from 2.10.2.
29
31
  >
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "karajan-code",
3
- "version": "2.12.0",
3
+ "version": "2.13.0",
4
4
  "description": "Local multi-agent coding orchestrator with TDD, SonarQube, and code review pipeline",
5
5
  "type": "module",
6
6
  "license": "AGPL-3.0",
@@ -187,7 +187,7 @@ export function registerMeta(program, { pkgVersion }) {
187
187
 
188
188
  program
189
189
  .command("board [action]")
190
- .description("Manage HU Board (start|stop|status|open)")
190
+ .description("Manage HU Board (start|stop|status|open|cleanup)")
191
191
  .option("--port <number>", "Port (default: 4000)", "4000")
192
192
  .option("--bind <host>", "Bind host (default: 127.0.0.1; use 0.0.0.0 to expose on LAN — token auth auto-enforced)")
193
193
  .action(async (action = "start", opts) => {
@@ -340,8 +340,26 @@ export async function boardCommand({ action = "start", port = 4000, bind = "127.
340
340
  }
341
341
  return { ok: true, url };
342
342
  }
343
+ case "cleanup": {
344
+ const { initDb, closeDb, cleanupZombies } = await import("../../packages/hu-board/src/cleanup-zombies.js");
345
+ initDb();
346
+ try {
347
+ const dryRun = process.argv.includes("--dry-run");
348
+ const report = cleanupZombies({ dryRun });
349
+ const total = report.projects.length + report.prompts.length + report.sessions.length;
350
+ const prefix = dryRun ? "[dry-run] Would clean" : "Cleaned";
351
+ logger.info(`${prefix}: ${report.projects.length} projects, ${report.prompts.length} prompts, ${report.sessions.length} sessions (total ${total})`);
352
+ if (report.projects.length) logger.info(` projects: ${report.projects.join(", ")}`);
353
+ if (report.prompts.length) logger.info(` prompts: ${report.prompts.join(", ")}`);
354
+ if (report.sessions.length) logger.info(` sessions: ${report.sessions.join(", ")}`);
355
+ if (total === 0) logger.info(" Board is already clean.");
356
+ return { ok: true, ...report };
357
+ } finally {
358
+ closeDb();
359
+ }
360
+ }
343
361
  default:
344
- logger.error(`Unknown board action: ${action}. Use start|stop|status|open`);
362
+ logger.error(`Unknown board action: ${action}. Use start|stop|status|open|cleanup`);
345
363
  return { ok: false, error: `Unknown action: ${action}` };
346
364
  }
347
365
  }