@magnusekdahl/parallix 1.2.0 → 1.3.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.
Files changed (127) hide show
  1. package/index.js +190 -185
  2. package/lib/agents/agents.js +737 -838
  3. package/lib/agents/agents.ts +930 -0
  4. package/lib/agents/claude-telemetry.js +149 -154
  5. package/lib/agents/claude-telemetry.ts +233 -0
  6. package/lib/agents/claude.js +121 -131
  7. package/lib/agents/claude.ts +156 -0
  8. package/lib/agents/codex-telemetry.js +176 -164
  9. package/lib/agents/codex-telemetry.ts +205 -0
  10. package/lib/agents/codex.js +168 -201
  11. package/lib/agents/codex.ts +236 -0
  12. package/lib/agents/limit-hit.js +216 -226
  13. package/lib/agents/limit-hit.ts +262 -0
  14. package/lib/agents/mistral-telemetry.js +7 -10
  15. package/lib/agents/mistral-telemetry.ts +44 -0
  16. package/lib/agents/mistral.js +40 -58
  17. package/lib/agents/mistral.ts +84 -0
  18. package/lib/agents/opencode-export.js +126 -127
  19. package/lib/agents/opencode-export.ts +160 -0
  20. package/lib/agents/opencode-telemetry.js +282 -261
  21. package/lib/agents/opencode-telemetry.ts +350 -0
  22. package/lib/agents/opencode.js +263 -305
  23. package/lib/agents/opencode.ts +370 -0
  24. package/lib/agents/stage-telemetry.js +23 -24
  25. package/lib/agents/stage-telemetry.ts +47 -0
  26. package/lib/commands/active.js +502 -579
  27. package/lib/commands/active.ts +665 -0
  28. package/lib/commands/checkpoint.js +98 -74
  29. package/lib/commands/checkpoint.ts +79 -0
  30. package/lib/commands/config.js +61 -31
  31. package/lib/commands/config.ts +47 -0
  32. package/lib/commands/coverage-gate.js +271 -246
  33. package/lib/commands/coverage-gate.ts +362 -0
  34. package/lib/commands/diff.js +140 -119
  35. package/lib/commands/diff.ts +125 -0
  36. package/lib/commands/draft.js +770 -923
  37. package/lib/commands/draft.ts +1021 -0
  38. package/lib/commands/handoff.js +588 -608
  39. package/lib/commands/handoff.ts +694 -0
  40. package/lib/commands/integrate.js +1332 -1463
  41. package/lib/commands/integrate.ts +1688 -0
  42. package/lib/commands/mission-start.js +279 -237
  43. package/lib/commands/mission-start.ts +263 -0
  44. package/lib/commands/rebase.js +606 -582
  45. package/lib/commands/rebase.ts +635 -0
  46. package/lib/commands/repair-handoff.js +181 -179
  47. package/lib/commands/repair-handoff.ts +228 -0
  48. package/lib/commands/resolve-conflict.js +121 -102
  49. package/lib/commands/resolve-conflict.ts +112 -0
  50. package/lib/commands/review.js +3 -4
  51. package/lib/commands/review.ts +14 -0
  52. package/lib/commands/setup-review.js +4 -5
  53. package/lib/commands/setup-review.ts +14 -0
  54. package/lib/commands/setup.js +3 -3
  55. package/lib/commands/setup.ts +2 -0
  56. package/lib/commands/stats-backfill.js +394 -359
  57. package/lib/commands/stats-backfill.ts +418 -0
  58. package/lib/commands/stats.js +1424 -1665
  59. package/lib/commands/stats.ts +2186 -0
  60. package/lib/commands/status.js +219 -200
  61. package/lib/commands/status.ts +219 -0
  62. package/lib/commands/verify.js +3 -1
  63. package/lib/commands/verify.ts +2 -0
  64. package/lib/core/fmt.js +140 -211
  65. package/lib/core/fmt.ts +189 -0
  66. package/lib/core/git.js +121 -102
  67. package/lib/core/git.ts +146 -0
  68. package/lib/core/gitignore.js +59 -106
  69. package/lib/core/gitignore.ts +103 -0
  70. package/lib/core/mission-utils.js +833 -875
  71. package/lib/core/mission-utils.ts +998 -0
  72. package/lib/core/nels.js +112 -127
  73. package/lib/core/nels.ts +189 -0
  74. package/lib/core/persistent-data-migration.js +247 -205
  75. package/lib/core/persistent-data-migration.ts +255 -0
  76. package/lib/core/product-config.js +400 -476
  77. package/lib/core/product-config.ts +518 -0
  78. package/lib/core/runtime-matrix.js +41 -87
  79. package/lib/core/runtime-matrix.ts +84 -0
  80. package/lib/core/spawn-tee.js +152 -192
  81. package/lib/core/spawn-tee.ts +202 -0
  82. package/lib/core/state-map.js +92 -92
  83. package/lib/core/state-map.ts +115 -0
  84. package/lib/core/storage.js +101 -129
  85. package/lib/core/storage.ts +182 -0
  86. package/lib/core/subagent-limit.js +15 -16
  87. package/lib/core/subagent-limit.ts +25 -0
  88. package/lib/core/verification.js +148 -138
  89. package/lib/core/verification.ts +200 -0
  90. package/lib/index.js +142 -59
  91. package/lib/index.ts +134 -0
  92. package/lib/review/rebase.js +142 -145
  93. package/lib/review/rebase.ts +188 -0
  94. package/lib/review/review-adapter.js +99 -87
  95. package/lib/review/review-adapter.ts +198 -0
  96. package/lib/review/review-artifacts.js +486 -629
  97. package/lib/review/review-artifacts.ts +622 -0
  98. package/lib/review/review-commands.js +1220 -1373
  99. package/lib/review/review-commands.ts +1579 -0
  100. package/lib/review/review-events.js +544 -886
  101. package/lib/review/review-events.ts +954 -0
  102. package/lib/review/review-loop.js +945 -1020
  103. package/lib/review/review-loop.ts +1174 -0
  104. package/lib/review/review-polling.js +86 -115
  105. package/lib/review/review-polling.ts +194 -0
  106. package/lib/review/review-prompts.js +154 -189
  107. package/lib/review/review-prompts.ts +182 -0
  108. package/lib/review/review-state.js +246 -225
  109. package/lib/review/review-state.ts +353 -0
  110. package/lib/review/review.js +63 -84
  111. package/lib/review/review.ts +138 -0
  112. package/lib/tools/backlog.js +694 -680
  113. package/lib/tools/backlog.ts +835 -0
  114. package/lib/tools/forgejo.js +1270 -1405
  115. package/lib/tools/forgejo.ts +1793 -0
  116. package/lib/tools/gatekeeper.js +106 -96
  117. package/lib/tools/gatekeeper.ts +124 -0
  118. package/lib/tools/redgreen.js +200 -181
  119. package/lib/tools/redgreen.ts +221 -0
  120. package/lib/tools/sessions.js +58 -52
  121. package/lib/tools/sessions.ts +81 -0
  122. package/lib/tools/setup-review.js +902 -975
  123. package/lib/tools/setup-review.ts +1152 -0
  124. package/package.json +7 -5
  125. package/prompts/draft.md +1 -0
  126. package/prompts/portfolio.md +1 -1
  127. package/px.js +226 -210
@@ -0,0 +1,200 @@
1
+ import { git, run } from './git.js';
2
+ import type { SpawnSyncOptions } from 'node:child_process';
3
+ import { loadAdapterConfig } from './product-config.js';
4
+ import { log } from './fmt.js';
5
+ import * as fsMod from 'node:fs';
6
+
7
+ interface GitOptions {
8
+ encoding?: BufferEncoding;
9
+ stdio?: SpawnSyncOptions['stdio'];
10
+ cwd?: string;
11
+ env?: NodeJS.ProcessEnv;
12
+ maxBuffer?: number;
13
+ [key: string]: unknown;
14
+ }
15
+
16
+ interface GitResult {
17
+ status: number | null;
18
+ signal: string | null;
19
+ stdout: string;
20
+ stderr: string;
21
+ error?: Error | null;
22
+ }
23
+
24
+ export type GitFn = (args: string[], options?: GitOptions) => GitResult;
25
+
26
+ export interface VerificationAdapterConfig {
27
+ command: string | null;
28
+ defaultArea: string;
29
+ }
30
+
31
+ export interface VerificationProof {
32
+ rootDir: string;
33
+ area: string;
34
+ command: string | null;
35
+ commit: string;
36
+ tree: string;
37
+ verifiedAt: string;
38
+ }
39
+
40
+ export interface PublishedTreeStateOk {
41
+ ok: true;
42
+ rootDir: string;
43
+ commit: string;
44
+ tree: string;
45
+ }
46
+
47
+ export interface PublishedTreeStateFail {
48
+ ok: false;
49
+ error: string;
50
+ }
51
+
52
+ export type PublishedTreeState = PublishedTreeStateOk | PublishedTreeStateFail;
53
+
54
+ // parallix targets arbitrary repositories, so there is no universal gate
55
+ // command. When adapters.verification.command is not configured, verification
56
+ // is a no-op pass ("no validation"). A repository opts into a real gate by
57
+ // declaring the command in workflow.config.json.
58
+ export const DEFAULT_AREA = 'docs';
59
+ // Shell-safe no-op so this is harmless if pasted into a command sequence: `:` is
60
+ // the bash null command and `#` comments the explanation.
61
+ export const NO_GATE_NOTICE = ': # no verification gate configured (set adapters.verification.command)';
62
+
63
+ export function resolveVerificationAdapter(rootDir: string = process.cwd()): VerificationAdapterConfig {
64
+ const config = loadAdapterConfig(rootDir);
65
+ const verification = (config.verification as { command?: unknown; defaultArea?: unknown }) || {};
66
+ const command = typeof verification.command === 'string' && verification.command.trim()
67
+ ? verification.command.trim()
68
+ : null;
69
+ const defaultArea = typeof verification.defaultArea === 'string' && verification.defaultArea.trim()
70
+ ? verification.defaultArea.trim()
71
+ : DEFAULT_AREA;
72
+
73
+ return { command, defaultArea };
74
+ }
75
+
76
+ /** @param {string} [area] @param {string} [rootDir] */
77
+ export function formatVerificationCommand(area: string | undefined, rootDir: string = process.cwd()): string {
78
+ const { command, defaultArea } = resolveVerificationAdapter(rootDir);
79
+ const effectiveArea = area || defaultArea;
80
+ if (!command) {
81
+ return NO_GATE_NOTICE;
82
+ }
83
+ return command.replaceAll('{{area}}', effectiveArea || DEFAULT_AREA);
84
+ }
85
+
86
+ /** @param {string} [area] @param {{rootDir?: string, log?: Function, stdio?: string, runFn?: Function}} [options] */
87
+ export function runVerificationGate(area: string | undefined, options: { rootDir?: string; log?: Function; stdio?: string; runFn?: Function } = {}): import('child_process').SpawnSyncReturns<string> {
88
+ const opts = options;
89
+ const rootDir = opts.rootDir || process.cwd();
90
+ const { command, defaultArea } = resolveVerificationAdapter(rootDir);
91
+ const effectiveArea = area || defaultArea;
92
+
93
+ if (!command) {
94
+ const info = opts.log || log.info;
95
+ info(`No verification gate configured for area: ${effectiveArea}; default is no validation. `
96
+ + 'Set adapters.verification.command in workflow.config.json to enforce one.');
97
+ return { status: 0 } as import('child_process').SpawnSyncReturns<string>;
98
+ }
99
+
100
+ const stdio = opts.stdio || 'inherit';
101
+ const runFn = opts.runFn || run;
102
+ return runFn('bash', ['-lc', command.replaceAll('{{area}}', effectiveArea)], { cwd: rootDir, stdio });
103
+ }
104
+
105
+ /** @param {string} rootDir @param {{gitRunner?: GitFn}} [options] */
106
+ export function readPublishedTreeState(rootDir: string, options: { gitRunner?: GitFn } = {}): PublishedTreeState {
107
+ const gitRunner = options.gitRunner || git;
108
+ const resolvedRoot = fsMod.realpathSync(rootDir);
109
+ const commitResult = gitRunner(['-C', resolvedRoot, 'rev-parse', 'HEAD']);
110
+ const treeResult = gitRunner(['-C', resolvedRoot, 'rev-parse', 'HEAD^{tree}']);
111
+
112
+ const commit = commitResult.stdout ? commitResult.stdout.trim() : '';
113
+ const tree = treeResult.stdout ? treeResult.stdout.trim() : '';
114
+ if (commitResult.status !== 0 || treeResult.status !== 0 || !commit || !tree) {
115
+ return {
116
+ ok: false,
117
+ error: `could not resolve current published tree for ${resolvedRoot}`
118
+ };
119
+ }
120
+
121
+ return { ok: true, rootDir: resolvedRoot, commit, tree };
122
+ }
123
+
124
+ /** @param {string} [area] @param {string} [rootDir] @param {{gitRunner?: GitFn, runFn?: Function, stdio?: string}} [options] */
125
+ export function captureVerifiedTreeProof(area: string | undefined, rootDir: string = process.cwd(), options: { gitRunner?: GitFn; runFn?: Function; stdio?: string } = {}): { ok: boolean; proof?: VerificationProof; error?: string } {
126
+ const {
127
+ gitRunner = git,
128
+ runFn = run,
129
+ stdio = 'inherit'
130
+ } = options;
131
+
132
+ const before = readPublishedTreeState(rootDir, { gitRunner });
133
+ if (!before.ok) {return before;}
134
+
135
+ const verification = runVerificationGate(area, {
136
+ rootDir: before.rootDir,
137
+ runFn,
138
+ stdio
139
+ });
140
+ if (verification.status !== 0) {
141
+ return {
142
+ ok: false,
143
+ error: `verification gate failed for ${before.rootDir} with exit code ${verification.status}`
144
+ };
145
+ }
146
+
147
+ const after = readPublishedTreeState(before.rootDir!, { gitRunner });
148
+ if (!after.ok) {return after;}
149
+ if (after.commit !== before.commit || after.tree !== before.tree) {
150
+ return {
151
+ ok: false,
152
+ error: `verification proof became stale while publishing ${before.rootDir}`
153
+ };
154
+ }
155
+
156
+ const { command, defaultArea } = resolveVerificationAdapter(before.rootDir!);
157
+ const effectiveArea = area || defaultArea;
158
+
159
+ return {
160
+ ok: true,
161
+ proof: {
162
+ rootDir: before.rootDir!,
163
+ area: effectiveArea,
164
+ command: command || null,
165
+ commit: after.commit,
166
+ tree: after.tree,
167
+ verifiedAt: new Date().toISOString()
168
+ }
169
+ };
170
+ }
171
+
172
+ /** @param {{rootDir?: string, commit?: string, tree?: string}} proof @param {string} [rootDir] @param {{gitRunner?: GitFn}} [opts] */
173
+ export function assertVerifiedTreeProof(proof: { rootDir?: string; commit?: string; tree?: string }, rootDir: string = process.cwd(), opts: { gitRunner?: GitFn } = {}): { ok: boolean; proof?: PublishedTreeState; error?: string } {
174
+ if (!proof || typeof proof !== 'object') {
175
+ return { ok: false, error: 'missing verification proof' };
176
+ }
177
+
178
+ const o = opts;
179
+ const gitRunner = o.gitRunner || git;
180
+ const current = readPublishedTreeState(rootDir, { gitRunner });
181
+ if (!current.ok) {return current;}
182
+
183
+ if (proof.rootDir !== current.rootDir) {
184
+ return { ok: false, error: `verification proof was captured from a different checkout: ${proof.rootDir}` };
185
+ }
186
+ if (proof.commit !== current.commit || proof.tree !== current.tree) {
187
+ return { ok: false, error: 'verification proof does not match the tree being published' };
188
+ }
189
+
190
+ return { ok: true, proof: current };
191
+ }
192
+
193
+ /** @param {string[]} args @param {{log?: Function}} [options] */
194
+ export default function runWorkflow(args: string[], options: { log?: Function } = {}): import('child_process').SpawnSyncReturns<string> {
195
+ const opts = options;
196
+ const logFn = opts.log || log.plain;
197
+ const area = args[0] || process.env.VERIFY_AREA || DEFAULT_AREA;
198
+ logFn(`Running verification gate for area: ${area}...`);
199
+ return runVerificationGate(area, { stdio: 'inherit' });
200
+ }
package/lib/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  /**
2
3
  * Barrel re-export for parallix/lib/.
3
4
  *
@@ -14,64 +15,146 @@
14
15
  * review/ — Review subsystem (artifacts, commands, loop, polling, prompts, state)
15
16
  * tools/ — External integrations and supporting workflow libraries
16
17
  */
17
-
18
- 'use strict';
19
-
18
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
19
+ if (k2 === undefined) k2 = k;
20
+ var desc = Object.getOwnPropertyDescriptor(m, k);
21
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
22
+ desc = { enumerable: true, get: function() { return m[k]; } };
23
+ }
24
+ Object.defineProperty(o, k2, desc);
25
+ }) : (function(o, m, k, k2) {
26
+ if (k2 === undefined) k2 = k;
27
+ o[k2] = m[k];
28
+ }));
29
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
30
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
31
+ }) : function(o, v) {
32
+ o["default"] = v;
33
+ });
34
+ var __importStar = (this && this.__importStar) || (function () {
35
+ var ownKeys = function(o) {
36
+ ownKeys = Object.getOwnPropertyNames || function (o) {
37
+ var ar = [];
38
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
39
+ return ar;
40
+ };
41
+ return ownKeys(o);
42
+ };
43
+ return function (mod) {
44
+ if (mod && mod.__esModule) return mod;
45
+ var result = {};
46
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
47
+ __setModuleDefault(result, mod);
48
+ return result;
49
+ };
50
+ })();
51
+ var __importDefault = (this && this.__importDefault) || function (mod) {
52
+ return (mod && mod.__esModule) ? mod : { "default": mod };
53
+ };
54
+ Object.defineProperty(exports, "__esModule", { value: true });
55
+ exports.sessions = exports.setupReview = exports.gatekeeper = exports.forgejo = exports.backlog = exports.reviewState = exports.reviewPrompts = exports.reviewPolling = exports.reviewLoop = exports.reviewEvents = exports.reviewCommands = exports.reviewArtifacts = exports.review = exports.verification = exports.storage = exports.stateMap = exports.spawnTee = exports.runtimeMatrix = exports.productConfig = exports.persistentDataMigration = exports.missionUtils = exports.gitignore = exports.git = exports.fmt = exports.verify = exports.status = exports.statsBackfill = exports.stats = exports.setup = exports.resolveConflict = exports.repairHandoff = exports.rebase = exports.missionStart = exports.integrate = exports.handoff = exports.draft = exports.diff = exports.coverageGate = exports.config = exports.checkpoint = exports.active = exports.opencode = exports.mistral = exports.limitHit = exports.codexTelemetry = exports.codex = exports.claudeTelemetry = exports.claude = exports.agents = void 0;
56
+ // agents/ — all use named exports
57
+ const agentsMod = __importStar(require("./agents/agents.js"));
58
+ const claudeMod = __importStar(require("./agents/claude.js"));
59
+ const claudeTelemetryMod = __importStar(require("./agents/claude-telemetry.js"));
60
+ const codexMod = __importStar(require("./agents/codex.js"));
61
+ const codexTelemetryMod = __importStar(require("./agents/codex-telemetry.js"));
62
+ const limitHitMod = __importStar(require("./agents/limit-hit.js"));
63
+ const mistralMod = __importStar(require("./agents/mistral.js"));
64
+ const opencodeMod = __importStar(require("./agents/opencode.js"));
65
+ // commands/ — mixed export styles
66
+ const active = require("./commands/active.js");
67
+ exports.active = active;
68
+ const checkpoint_js_1 = __importDefault(require("./commands/checkpoint.js"));
69
+ exports.checkpoint = checkpoint_js_1.default;
70
+ const config = require("./commands/config.js");
71
+ exports.config = config;
72
+ const coverageGate = require("./commands/coverage-gate.js");
73
+ exports.coverageGate = coverageGate;
74
+ const diff = require("./commands/diff.js");
75
+ exports.diff = diff;
76
+ const draft = require("./commands/draft.js");
77
+ exports.draft = draft;
78
+ const handoff = require("./commands/handoff.js");
79
+ exports.handoff = handoff;
80
+ const integrate = require("./commands/integrate.js");
81
+ exports.integrate = integrate;
82
+ const missionStart = require("./commands/mission-start.js");
83
+ exports.missionStart = missionStart;
84
+ const rebase = require("./commands/rebase.js");
85
+ exports.rebase = rebase;
86
+ const repairHandoff = require("./commands/repair-handoff.js");
87
+ exports.repairHandoff = repairHandoff;
88
+ const resolveConflict = require("./commands/resolve-conflict.js");
89
+ exports.resolveConflict = resolveConflict;
90
+ const setup = require("./commands/setup.js");
91
+ exports.setup = setup;
92
+ const stats = require("./commands/stats.js");
93
+ exports.stats = stats;
94
+ const statsBackfill = require("./commands/stats-backfill.js");
95
+ exports.statsBackfill = statsBackfill;
96
+ const status = require("./commands/status.js");
97
+ exports.status = status;
98
+ const verify = require("./commands/verify.js");
99
+ exports.verify = verify;
100
+ // core/ — mixed export styles
101
+ const fmtMod = __importStar(require("./core/fmt.js"));
102
+ exports.fmt = fmtMod;
103
+ const gitMod = __importStar(require("./core/git.js"));
104
+ const gitignore = require("./core/gitignore.js");
105
+ exports.gitignore = gitignore;
106
+ const missionUtilsMod = __importStar(require("./core/mission-utils.js"));
107
+ const persistentDataMigrationMod = __importStar(require("./core/persistent-data-migration.js"));
108
+ const productConfigMod = __importStar(require("./core/product-config.js"));
109
+ const runtimeMatrixMod = __importStar(require("./core/runtime-matrix.js"));
110
+ const spawnTeeMod = __importStar(require("./core/spawn-tee.js"));
111
+ const stateMapMod = __importStar(require("./core/state-map.js"));
112
+ const storageMod = __importStar(require("./core/storage.js"));
113
+ const verificationMod = __importStar(require("./core/verification.js"));
114
+ // review/ — mixed export styles
115
+ const review = require("./review/review.js");
116
+ exports.review = review;
117
+ const reviewArtifactsMod = __importStar(require("./review/review-artifacts.js"));
118
+ const reviewCommandsMod = __importStar(require("./review/review-commands.js"));
119
+ const reviewEventsMod = __importStar(require("./review/review-events.js"));
120
+ const reviewLoopMod = __importStar(require("./review/review-loop.js"));
121
+ const reviewPollingMod = __importStar(require("./review/review-polling.js"));
122
+ const reviewPromptsMod = __importStar(require("./review/review-prompts.js"));
123
+ const reviewStateMod = __importStar(require("./review/review-state.js"));
124
+ // tools/ — all use named exports
125
+ const backlogMod = __importStar(require("./tools/backlog.js"));
126
+ const forgejoMod = __importStar(require("./tools/forgejo.js"));
127
+ const gatekeeperMod = __importStar(require("./tools/gatekeeper.js"));
128
+ const setupReviewMod = __importStar(require("./tools/setup-review.js"));
129
+ const sessionsMod = __importStar(require("./tools/sessions.js"));
20
130
  // agents/
21
- module.exports.agents = require('./agents/agents');
22
- module.exports.claude = require('./agents/claude');
23
- module.exports.claudeTelemetry = require('./agents/claude-telemetry');
24
- module.exports.codex = require('./agents/codex');
25
- module.exports.codexTelemetry = require('./agents/codex-telemetry');
26
- module.exports.limitHit = require('./agents/limit-hit');
27
- module.exports.mistral = require('./agents/mistral');
28
- module.exports.opencode = require('./agents/opencode');
29
-
30
- // commands/
31
- module.exports.active = require('./commands/active');
32
- module.exports.checkpoint = require('./commands/checkpoint');
33
- module.exports.config = require('./commands/config');
34
- module.exports.coverageGate = require('./commands/coverage-gate');
35
- module.exports.diff = require('./commands/diff');
36
- module.exports.draft = require('./commands/draft');
37
- module.exports.handoff = require('./commands/handoff');
38
- module.exports.integrate = require('./commands/integrate');
39
- module.exports.missionStart = require('./commands/mission-start');
40
- module.exports.rebase = require('./commands/rebase');
41
- module.exports.repairHandoff = require('./commands/repair-handoff');
42
- module.exports.resolveConflict = require('./commands/resolve-conflict');
43
- module.exports.setup = require('./commands/setup');
44
- module.exports.stats = require('./commands/stats');
45
- module.exports.statsBackfill = require('./commands/stats-backfill');
46
- module.exports.status = require('./commands/status');
47
- module.exports.verify = require('./commands/verify');
48
-
49
- // core/
50
- module.exports.fmt = require('./core/fmt');
51
- module.exports.git = require('./core/git');
52
- module.exports.gitignore = require('./core/gitignore');
53
- module.exports.missionUtils = require('./core/mission-utils');
54
- module.exports.persistentDataMigration = require('./core/persistent-data-migration');
55
- module.exports.productConfig = require('./core/product-config');
56
- module.exports.runtimeMatrix = require('./core/runtime-matrix');
57
- module.exports.spawnTee = require('./core/spawn-tee');
58
- module.exports.stateMap = require('./core/state-map');
59
- module.exports.storage = require('./core/storage');
60
- module.exports.verification = require('./core/verification');
61
-
62
- // review/
63
- module.exports.review = require('./review/review');
64
- module.exports.reviewArtifacts = require('./review/review-artifacts');
65
- module.exports.reviewCommands = require('./review/review-commands');
66
- module.exports.reviewEvents = require('./review/review-events');
67
- module.exports.reviewLoop = require('./review/review-loop');
68
- module.exports.reviewPolling = require('./review/review-polling');
69
- module.exports.reviewPrompts = require('./review/review-prompts');
70
- module.exports.reviewState = require('./review/review-state');
71
-
131
+ exports.agents = agentsMod;
132
+ exports.claude = claudeMod;
133
+ exports.claudeTelemetry = claudeTelemetryMod;
134
+ exports.codex = codexMod;
135
+ exports.codexTelemetry = codexTelemetryMod;
136
+ exports.limitHit = limitHitMod;
137
+ exports.mistral = mistralMod;
138
+ exports.opencode = opencodeMod;
139
+ exports.git = gitMod;
140
+ exports.missionUtils = missionUtilsMod;
141
+ exports.persistentDataMigration = persistentDataMigrationMod;
142
+ exports.productConfig = productConfigMod;
143
+ exports.runtimeMatrix = runtimeMatrixMod;
144
+ exports.spawnTee = spawnTeeMod;
145
+ exports.stateMap = stateMapMod;
146
+ exports.storage = storageMod;
147
+ exports.verification = verificationMod;
148
+ exports.reviewArtifacts = reviewArtifactsMod;
149
+ exports.reviewCommands = reviewCommandsMod;
150
+ exports.reviewEvents = reviewEventsMod;
151
+ exports.reviewLoop = reviewLoopMod;
152
+ exports.reviewPolling = reviewPollingMod;
153
+ exports.reviewPrompts = reviewPromptsMod;
154
+ exports.reviewState = reviewStateMod;
72
155
  // tools/
73
- module.exports.backlog = require('./tools/backlog');
74
- module.exports.forgejo = require('./tools/forgejo');
75
- module.exports.gatekeeper = require('./tools/gatekeeper');
76
- module.exports.setupReview = require('./tools/setup-review');
77
- module.exports.sessions = require('./tools/sessions');
156
+ exports.backlog = backlogMod;
157
+ exports.forgejo = forgejoMod;
158
+ exports.gatekeeper = gatekeeperMod;
159
+ exports.setupReview = setupReviewMod;
160
+ exports.sessions = sessionsMod;
package/lib/index.ts ADDED
@@ -0,0 +1,134 @@
1
+ /**
2
+ * Barrel re-export for parallix/lib/.
3
+ *
4
+ * Re-exports all grouped modules under named properties (e.g.
5
+ * `require('../lib').commands.setup`). This file does NOT restore
6
+ * flat subpath imports (e.g. `require('../lib/setup')`) — those
7
+ * entrypoints were removed during the restructure and any remaining
8
+ * consumers should be updated to use the new grouped paths.
9
+ *
10
+ * Directory layout:
11
+ * agents/ — AI agent launchers and session management
12
+ * commands/ — Workflow command handlers (dispatcher entry points)
13
+ * core/ — Shared infrastructure (no command-handler imports)
14
+ * review/ — Review subsystem (artifacts, commands, loop, polling, prompts, state)
15
+ * tools/ — External integrations and supporting workflow libraries
16
+ */
17
+
18
+ // agents/ — all use named exports
19
+ import * as agentsMod from './agents/agents.js';
20
+ import * as claudeMod from './agents/claude.js';
21
+ import * as claudeTelemetryMod from './agents/claude-telemetry.js';
22
+ import * as codexMod from './agents/codex.js';
23
+ import * as codexTelemetryMod from './agents/codex-telemetry.js';
24
+ import * as limitHitMod from './agents/limit-hit.js';
25
+ import * as mistralMod from './agents/mistral.js';
26
+ import * as opencodeMod from './agents/opencode.js';
27
+
28
+ // commands/ — mixed export styles
29
+ import active = require('./commands/active.js');
30
+ import checkpoint from './commands/checkpoint.js';
31
+ import config = require('./commands/config.js');
32
+ import coverageGate = require('./commands/coverage-gate.js');
33
+ import diff = require('./commands/diff.js');
34
+ import draft = require('./commands/draft.js');
35
+ import handoff = require('./commands/handoff.js');
36
+ import integrate = require('./commands/integrate.js');
37
+ import missionStart = require('./commands/mission-start.js');
38
+ import rebase = require('./commands/rebase.js');
39
+ import repairHandoff = require('./commands/repair-handoff.js');
40
+ import resolveConflict = require('./commands/resolve-conflict.js');
41
+ import setup = require('./commands/setup.js');
42
+ import stats = require('./commands/stats.js');
43
+ import statsBackfill = require('./commands/stats-backfill.js');
44
+ import status = require('./commands/status.js');
45
+ import verify = require('./commands/verify.js');
46
+
47
+ // core/ — mixed export styles
48
+ import * as fmtMod from './core/fmt.js';
49
+ import * as gitMod from './core/git.js';
50
+ import gitignore = require('./core/gitignore.js');
51
+ import * as missionUtilsMod from './core/mission-utils.js';
52
+ import * as persistentDataMigrationMod from './core/persistent-data-migration.js';
53
+ import * as productConfigMod from './core/product-config.js';
54
+ import * as runtimeMatrixMod from './core/runtime-matrix.js';
55
+ import * as spawnTeeMod from './core/spawn-tee.js';
56
+ import * as stateMapMod from './core/state-map.js';
57
+ import * as storageMod from './core/storage.js';
58
+ import * as verificationMod from './core/verification.js';
59
+
60
+ // review/ — mixed export styles
61
+ import review = require('./review/review.js');
62
+ import * as reviewArtifactsMod from './review/review-artifacts.js';
63
+ import * as reviewCommandsMod from './review/review-commands.js';
64
+ import * as reviewEventsMod from './review/review-events.js';
65
+ import * as reviewLoopMod from './review/review-loop.js';
66
+ import * as reviewPollingMod from './review/review-polling.js';
67
+ import * as reviewPromptsMod from './review/review-prompts.js';
68
+ import * as reviewStateMod from './review/review-state.js';
69
+
70
+ // tools/ — all use named exports
71
+ import * as backlogMod from './tools/backlog.js';
72
+ import * as forgejoMod from './tools/forgejo.js';
73
+ import * as gatekeeperMod from './tools/gatekeeper.js';
74
+ import * as setupReviewMod from './tools/setup-review.js';
75
+ import * as sessionsMod from './tools/sessions.js';
76
+
77
+ // agents/
78
+ export const agents = agentsMod;
79
+ export const claude = claudeMod;
80
+ export const claudeTelemetry = claudeTelemetryMod;
81
+ export const codex = codexMod;
82
+ export const codexTelemetry = codexTelemetryMod;
83
+ export const limitHit = limitHitMod;
84
+ export const mistral = mistralMod;
85
+ export const opencode = opencodeMod;
86
+
87
+ // commands/
88
+ export { active };
89
+ export { checkpoint };
90
+ export { config };
91
+ export { coverageGate };
92
+ export { diff };
93
+ export { draft };
94
+ export { handoff };
95
+ export { integrate };
96
+ export { missionStart };
97
+ export { rebase };
98
+ export { repairHandoff };
99
+ export { resolveConflict };
100
+ export { setup };
101
+ export { stats };
102
+ export { statsBackfill };
103
+ export { status };
104
+ export { verify };
105
+
106
+ // core/
107
+ export { fmtMod as fmt };
108
+ export const git = gitMod;
109
+ export { gitignore };
110
+ export const missionUtils = missionUtilsMod;
111
+ export const persistentDataMigration = persistentDataMigrationMod;
112
+ export const productConfig = productConfigMod;
113
+ export const runtimeMatrix = runtimeMatrixMod;
114
+ export const spawnTee = spawnTeeMod;
115
+ export const stateMap = stateMapMod;
116
+ export const storage = storageMod;
117
+ export const verification = verificationMod;
118
+
119
+ // review/
120
+ export { review };
121
+ export const reviewArtifacts = reviewArtifactsMod;
122
+ export const reviewCommands = reviewCommandsMod;
123
+ export const reviewEvents = reviewEventsMod;
124
+ export const reviewLoop = reviewLoopMod;
125
+ export const reviewPolling = reviewPollingMod;
126
+ export const reviewPrompts = reviewPromptsMod;
127
+ export const reviewState = reviewStateMod;
128
+
129
+ // tools/
130
+ export const backlog = backlogMod;
131
+ export const forgejo = forgejoMod;
132
+ export const gatekeeper = gatekeeperMod;
133
+ export const setupReview = setupReviewMod;
134
+ export const sessions = sessionsMod;