planpong 0.5.0 → 0.5.2

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.
@@ -1,12 +1,48 @@
1
1
  #!/usr/bin/env node
2
+ import { readFileSync } from "node:fs";
3
+ import { fileURLToPath } from "node:url";
4
+ import { dirname, join } from "node:path";
2
5
  import { Command } from "commander";
3
6
  import { registerPlanCommand } from "../src/cli/commands/plan.js";
4
7
  import { registerReviewCommand } from "../src/cli/commands/review.js";
8
+ // Read version from the installed package.json so `planpong --version`
9
+ // always reflects the actual installed version. Hardcoding it here
10
+ // drifts every time we cut a release.
11
+ //
12
+ // Resolution differs between compiled (`dist/bin/planpong.js` — package
13
+ // root is two levels up) and dev mode (`bin/planpong.ts` via tsx —
14
+ // package root is one level up). Walk up until we find a package.json
15
+ // whose `name` is "planpong".
16
+ function readPackageVersion() {
17
+ try {
18
+ let here = dirname(fileURLToPath(import.meta.url));
19
+ for (let i = 0; i < 5; i++) {
20
+ const candidate = join(here, "package.json");
21
+ try {
22
+ const pkg = JSON.parse(readFileSync(candidate, "utf-8"));
23
+ if (pkg.name === "planpong" && typeof pkg.version === "string") {
24
+ return pkg.version;
25
+ }
26
+ }
27
+ catch {
28
+ // candidate doesn't exist or isn't readable — keep walking up
29
+ }
30
+ const parent = dirname(here);
31
+ if (parent === here)
32
+ break;
33
+ here = parent;
34
+ }
35
+ }
36
+ catch {
37
+ // fall through to fallback
38
+ }
39
+ return "0.0.0";
40
+ }
5
41
  const program = new Command();
6
42
  program
7
43
  .name("planpong")
8
44
  .description("Multi-model plan review CLI — orchestrates AI agents for adversarial plan refinement")
9
- .version("0.1.0");
45
+ .version(readPackageVersion());
10
46
  registerPlanCommand(program);
11
47
  registerReviewCommand(program);
12
48
  program.parse();
@@ -1 +1 @@
1
- {"version":3,"file":"planpong.js","sourceRoot":"","sources":["../../bin/planpong.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAA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CAAC,YAAY,CAAC,SAAS,EAAE,OAAO,CAAC,CAGtD,CAAC;gBACF,IAAI,GAAG,CAAC,IAAI,KAAK,UAAU,IAAI,OAAO,GAAG,CAAC,OAAO,KAAK,QAAQ,EAAE,CAAC;oBAC/D,OAAO,GAAG,CAAC,OAAO,CAAC;gBACrB,CAAC;YACH,CAAC;YAAC,MAAM,CAAC;gBACP,8DAA8D;YAChE,CAAC;YACD,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;YAC7B,IAAI,MAAM,KAAK,IAAI;gBAAE,MAAM;YAC3B,IAAI,GAAG,MAAM,CAAC;QAChB,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,2BAA2B;IAC7B,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,UAAU,CAAC;KAChB,WAAW,CACV,sFAAsF,CACvF;KACA,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC;AAEjC,mBAAmB,CAAC,OAAO,CAAC,CAAC;AAC7B,qBAAqB,CAAC,OAAO,CAAC,CAAC;AAE/B,OAAO,CAAC,KAAK,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "planpong",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "description": "Multi-model adversarial plan review — orchestrates AI agents to critique and refine implementation plans",
5
5
  "type": "module",
6
6
  "bin": {