@magnusekdahl/parallix 1.3.2 → 1.3.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 (50) hide show
  1. package/docs/agents.md +1 -1
  2. package/docs/use-cases.md +1 -1
  3. package/lib/agents/agents.js +20 -3
  4. package/lib/agents/agents.ts +14 -3
  5. package/lib/agents/mistral-telemetry.js +122 -23
  6. package/lib/agents/mistral-telemetry.ts +141 -26
  7. package/lib/agents/mistral.js +128 -14
  8. package/lib/agents/mistral.ts +145 -5
  9. package/lib/commands/active.js +69 -39
  10. package/lib/commands/active.ts +97 -60
  11. package/lib/commands/config.ts +3 -3
  12. package/lib/commands/coverage-gate.ts +1 -1
  13. package/lib/commands/draft.js +1 -1
  14. package/lib/commands/draft.ts +1 -1
  15. package/lib/commands/handoff.js +13 -8
  16. package/lib/commands/handoff.ts +24 -18
  17. package/lib/commands/rebase.js +1 -1
  18. package/lib/commands/rebase.ts +2 -2
  19. package/lib/commands/repair-handoff.js +141 -20
  20. package/lib/commands/repair-handoff.ts +185 -45
  21. package/lib/commands/resolve-conflict.js +1 -1
  22. package/lib/commands/resolve-conflict.ts +2 -2
  23. package/lib/commands/stats-backfill.ts +10 -10
  24. package/lib/commands/stats.js +38 -11
  25. package/lib/commands/stats.ts +40 -96
  26. package/lib/core/fmt.ts +2 -2
  27. package/lib/core/git.ts +2 -2
  28. package/lib/core/gitignore.ts +2 -2
  29. package/lib/core/mission-utils.js +2 -2
  30. package/lib/core/mission-utils.ts +2 -2
  31. package/lib/core/persistent-data-migration.ts +2 -2
  32. package/lib/core/spawn-tee.ts +1 -1
  33. package/lib/core/state-map.ts +2 -2
  34. package/lib/core/storage.ts +1 -1
  35. package/lib/core/verification.ts +1 -1
  36. package/lib/review/rebase.ts +12 -12
  37. package/lib/review/review-artifacts.ts +35 -35
  38. package/lib/review/review-commands.ts +40 -40
  39. package/lib/review/review-events.ts +12 -12
  40. package/lib/review/review-loop.js +236 -7
  41. package/lib/review/review-loop.ts +338 -22
  42. package/lib/review/review-polling.ts +6 -6
  43. package/lib/review/review-prompts.js +8 -4
  44. package/lib/review/review-prompts.ts +12 -8
  45. package/lib/review/review-state.js +1 -1
  46. package/lib/review/review-state.ts +2 -2
  47. package/package.json +3 -2
  48. package/prompts/review-verbose.md +1 -1
  49. package/prompts/review.md +1 -1
  50. package/px.js +8 -4
@@ -271,7 +271,7 @@ class ReviewState {
271
271
  const payload = this.toJSON();
272
272
  fs.writeFileSync(statePath, JSON.stringify(payload, null, 2) + '\n', 'utf8');
273
273
  const relPath = path.relative(worktree, statePath);
274
- const result = gitFn(['-C', worktree, 'add', relPath]);
274
+ const _result = gitFn(['-C', worktree, 'add', relPath]);
275
275
  const msg = `review-state(${this.slug}): round ${this.round} (${this.phase}) [${this.reviewer} -> ${this.implementer}]${this.disposition ? ` disposition=${this.disposition}` : ''}`;
276
276
  const commitResult = gitFn(['-C', worktree, 'commit', '-m', msg]);
277
277
  if (commitResult.status !== 0) {
@@ -64,7 +64,7 @@ export function readReviewState(slug: string, rootDir = process.cwd()): ReviewSt
64
64
  export function resolveReviewIdentity(
65
65
  slug: string,
66
66
  rootDir = process.cwd(),
67
- options: { readReviewStateFn?: (s: string, r: string) => ReviewState | null } = {}
67
+ options: { readReviewStateFn?: (_s: string, _r: string) => ReviewState | null } = {}
68
68
  ): {
69
69
  identityUser: string | null;
70
70
  commentIdentityUser: string | null;
@@ -287,7 +287,7 @@ export class ReviewState {
287
287
  fs.writeFileSync(statePath, JSON.stringify(payload, null, 2) + '\n', 'utf8');
288
288
 
289
289
  const relPath = path.relative(worktree, statePath);
290
- const result = gitFn(['-C', worktree, 'add', relPath]);
290
+ const _result = gitFn(['-C', worktree, 'add', relPath]);
291
291
  const msg = `review-state(${this.slug}): round ${this.round} (${this.phase}) [${this.reviewer} -> ${this.implementer}]${this.disposition ? ` disposition=${this.disposition}` : ''}`;
292
292
  const commitResult = gitFn(['-C', worktree, 'commit', '-m', msg]);
293
293
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magnusekdahl/parallix",
3
- "version": "1.3.2",
3
+ "version": "1.3.4",
4
4
  "description": "AI mission workflow toolkit with a px CLI — local-first, human-in-the-loop multi-agent development",
5
5
  "license": "AGPL-3.0-or-later",
6
6
  "private": false,
@@ -48,7 +48,7 @@
48
48
  ],
49
49
  "scripts": {
50
50
  "build": "tsc",
51
- "build:cjs": "tsc --rootDir . --outDir . --module CommonJS --moduleResolution Node --esModuleInterop",
51
+ "build:cjs": "tsc --rootDir . --outDir . --module CommonJS --moduleResolution Node --esModuleInterop && { head -1 px.js | grep -q '^#!' || sed -i '1i#!/usr/bin/env node' px.js; } && chmod +x px.js",
52
52
  "prepublishOnly": "npm run build:cjs",
53
53
  "pretest": "npm run build:cjs",
54
54
  "test": "FORCE_COLOR=0 node --test test/*.test.js",
@@ -61,6 +61,7 @@
61
61
  "@typescript-eslint/parser": "^8.62.1",
62
62
  "eslint": "^9.39.4",
63
63
  "sonarqube-scanner": "^4.0.1",
64
+ "tsx": "^4.22.4",
64
65
  "typescript": "^5.4.0"
65
66
  }
66
67
  }
@@ -9,7 +9,7 @@ Requested review focus: `{{focus}}`.
9
9
  Use the existing review entrypoint for your family if the runtime supports it: `{{review_entrypoint}}`.
10
10
 
11
11
  Requirements:
12
- - {{repo_line}}review the full mission diff using `git diff {{primaryBranch}}..HEAD`
12
+ - {{repo_line}}review the full mission diff using `git diff {{reviewBaseline}}..HEAD`
13
13
  - check the final checkpoint document (e.g. `CHECKPOINT_FINAL.md`) for the goal-check table
14
14
  - if workflow state, prompts, or PR history look inconsistent, report that inconsistency as a review finding; do not switch into implementer behavior, generate checkpoints, or write act-on-review artifacts
15
15
  - write findings markdown to `{{artifactDir}}/{{slug}}-review-findings.md`
package/prompts/review.md CHANGED
@@ -7,7 +7,7 @@ Load before reviewing:
7
7
  - `AGENTS.md`
8
8
  - locked mission at `{{missionPath}}`
9
9
  - final checkpoint document, if present
10
- - diff: `git diff {{primaryBranch}}..HEAD`
10
+ - diff: `git diff {{reviewBaseline}}..HEAD`
11
11
 
12
12
  Minimum loop contract:
13
13
  - Load the locked mission at `{{missionPath}}` and `AGENTS.md` before reviewing.
package/px.js CHANGED
@@ -51,10 +51,11 @@ function resolveRuntimePath() {
51
51
  if (typeof __filename === 'string' && __filename) {
52
52
  return __filename;
53
53
  }
54
- if (typeof process.argv[1] === 'string' && node_path_1.default.isAbsolute(process.argv[1])) {
55
- return process.argv[1];
54
+ const arg1 = typeof process.argv[1] === 'string' ? process.argv[1] : '';
55
+ if (arg1.endsWith('/px.ts') || arg1.endsWith('/px.js')) {
56
+ return arg1;
56
57
  }
57
- return node_path_1.default.resolve(process.cwd(), 'px.js');
58
+ return node_path_1.default.resolve(process.cwd(), 'px.ts');
58
59
  }
59
60
  const runtimePath = resolveRuntimePath();
60
61
  const _require = (0, node_module_1.createRequire)(runtimePath);
@@ -259,6 +260,9 @@ async function run(argv = process.argv.slice(2), options = {}) {
259
260
  process.chdir(previousCwd);
260
261
  }
261
262
  }
262
- if (typeof require === 'undefined' || require.main === module) {
263
+ const _cjsMain = typeof require !== 'undefined' && require.main === module;
264
+ const _arg1 = typeof process.argv[1] === 'string' && process.argv[1] ? process.argv[1] : undefined;
265
+ const _esmMain = _arg1 && _arg1.endsWith('/px.ts');
266
+ if (_esmMain || _cjsMain) {
263
267
  run().then(code => { process.exitCode = code; });
264
268
  }