@magnusekdahl/parallix 1.2.1 → 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.
- package/index.js +190 -185
- package/lib/commands/active.js +502 -579
- package/lib/commands/active.ts +665 -0
- package/lib/commands/checkpoint.js +98 -74
- package/lib/commands/checkpoint.ts +79 -0
- package/lib/commands/config.js +61 -31
- package/lib/commands/config.ts +47 -0
- package/lib/commands/coverage-gate.js +271 -246
- package/lib/commands/coverage-gate.ts +362 -0
- package/lib/commands/diff.js +140 -119
- package/lib/commands/diff.ts +125 -0
- package/lib/commands/draft.js +770 -923
- package/lib/commands/draft.ts +1021 -0
- package/lib/commands/handoff.js +588 -608
- package/lib/commands/handoff.ts +694 -0
- package/lib/commands/integrate.js +1331 -1468
- package/lib/commands/integrate.ts +1688 -0
- package/lib/commands/mission-start.js +279 -237
- package/lib/commands/mission-start.ts +263 -0
- package/lib/commands/rebase.js +606 -582
- package/lib/commands/rebase.ts +635 -0
- package/lib/commands/repair-handoff.js +181 -179
- package/lib/commands/repair-handoff.ts +228 -0
- package/lib/commands/resolve-conflict.js +121 -102
- package/lib/commands/resolve-conflict.ts +112 -0
- package/lib/commands/review.js +3 -4
- package/lib/commands/review.ts +14 -0
- package/lib/commands/setup-review.js +4 -5
- package/lib/commands/setup-review.ts +14 -0
- package/lib/commands/setup.js +3 -3
- package/lib/commands/setup.ts +2 -0
- package/lib/commands/stats-backfill.js +394 -359
- package/lib/commands/stats-backfill.ts +418 -0
- package/lib/commands/stats.js +1424 -1665
- package/lib/commands/stats.ts +2186 -0
- package/lib/commands/status.js +219 -200
- package/lib/commands/status.ts +219 -0
- package/lib/commands/verify.js +3 -1
- package/lib/commands/verify.ts +2 -0
- package/lib/core/nels.js +112 -127
- package/lib/core/nels.ts +189 -0
- package/lib/core/subagent-limit.js +15 -16
- package/lib/core/subagent-limit.ts +25 -0
- package/lib/index.js +142 -59
- package/lib/index.ts +134 -0
- package/lib/review/rebase.js +142 -145
- package/lib/review/rebase.ts +188 -0
- package/lib/review/review-adapter.js +99 -87
- package/lib/review/review-adapter.ts +198 -0
- package/lib/review/review-artifacts.js +486 -629
- package/lib/review/review-artifacts.ts +622 -0
- package/lib/review/review-commands.js +1220 -1373
- package/lib/review/review-commands.ts +1579 -0
- package/lib/review/review-events.js +544 -886
- package/lib/review/review-events.ts +954 -0
- package/lib/review/review-loop.js +945 -1020
- package/lib/review/review-loop.ts +1174 -0
- package/lib/review/review-polling.js +86 -115
- package/lib/review/review-polling.ts +194 -0
- package/lib/review/review-prompts.js +154 -189
- package/lib/review/review-prompts.ts +182 -0
- package/lib/review/review-state.js +246 -225
- package/lib/review/review-state.ts +353 -0
- package/lib/review/review.js +63 -84
- package/lib/review/review.ts +138 -0
- package/lib/tools/backlog.js +694 -680
- package/lib/tools/backlog.ts +835 -0
- package/lib/tools/forgejo.js +1270 -1405
- package/lib/tools/forgejo.ts +1793 -0
- package/lib/tools/gatekeeper.js +106 -96
- package/lib/tools/gatekeeper.ts +124 -0
- package/lib/tools/redgreen.js +200 -181
- package/lib/tools/redgreen.ts +221 -0
- package/lib/tools/sessions.js +58 -52
- package/lib/tools/sessions.ts +81 -0
- package/lib/tools/setup-review.js +902 -975
- package/lib/tools/setup-review.ts +1152 -0
- package/package.json +4 -4
- package/px.js +226 -208
package/lib/core/nels.ts
ADDED
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Net Engineering Lines (NEL) computation.
|
|
3
|
+
*
|
|
4
|
+
* Computes NEL from `git diff --numstat -w` for a given diff range,
|
|
5
|
+
* excluding workflow/process bookkeeping, documentation, and generated files
|
|
6
|
+
* per ADR 0047.
|
|
7
|
+
*
|
|
8
|
+
* Bucket thresholds (empirical terciles from task-1355 data, n=29):
|
|
9
|
+
* - Small: 0–80 NEL (11% rework rate)
|
|
10
|
+
* - Medium: 81–235 NEL (22% rework rate)
|
|
11
|
+
* - Large: 235+ NEL (73% rework rate)
|
|
12
|
+
*
|
|
13
|
+
* This module is purely observational — no enforcement, gates, or blocks.
|
|
14
|
+
*
|
|
15
|
+
* @module lib/core/nels
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import { spawnSync } from 'node:child_process';
|
|
19
|
+
|
|
20
|
+
// ---------- exclusion globs (ADR 0047) ----------
|
|
21
|
+
// Each entry is a minimatch-compatible pattern. Patterns are checked in order;
|
|
22
|
+
// the first match wins.
|
|
23
|
+
|
|
24
|
+
export const EXCLUSION_PATTERNS = [
|
|
25
|
+
'missions/**', // workflow/process bookkeeping
|
|
26
|
+
'backlog/**', // workflow/process bookkeeping
|
|
27
|
+
'review-*', // workflow/process bookkeeping
|
|
28
|
+
'CP-*', // workflow/process bookkeeping
|
|
29
|
+
'**/*.md', // documentation
|
|
30
|
+
'docs/**', // documentation
|
|
31
|
+
'package-lock.json', // generated/vendored
|
|
32
|
+
'coverage/**', // generated/vendored
|
|
33
|
+
'*lock*', // lockfiles (package-lock.json, yarn.lock, pnpm-lock.yaml, Gemfile.lock, etc.)
|
|
34
|
+
'*.lock', // additional lockfile safety net
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Bucket constants derived from ADR 0047 empirical terciles.
|
|
39
|
+
*/
|
|
40
|
+
export const BUCKET_SMALL_MAX = 80;
|
|
41
|
+
export const BUCKET_MEDIUM_MAX = 235;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Classify NEL count into a bucket label.
|
|
45
|
+
*
|
|
46
|
+
* @param {number} nel
|
|
47
|
+
* @returns {{ label: 'Small' | 'Medium' | 'Large', min: number, max: number }}
|
|
48
|
+
*/
|
|
49
|
+
export function classifyBucket(nel: number) {
|
|
50
|
+
if (nel <= BUCKET_SMALL_MAX) {
|
|
51
|
+
return { label: 'Small', min: 0, max: BUCKET_SMALL_MAX };
|
|
52
|
+
}
|
|
53
|
+
if (nel <= BUCKET_MEDIUM_MAX) {
|
|
54
|
+
return { label: 'Medium', min: BUCKET_SMALL_MAX + 1, max: BUCKET_MEDIUM_MAX };
|
|
55
|
+
}
|
|
56
|
+
return { label: 'Large', min: BUCKET_MEDIUM_MAX + 1, max: Infinity };
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Check whether a file path matches any exclusion pattern.
|
|
61
|
+
*
|
|
62
|
+
* @param {string} filePath - Relative file path from repo root
|
|
63
|
+
* @returns {boolean}
|
|
64
|
+
*/
|
|
65
|
+
export function isExcluded(filePath: string) {
|
|
66
|
+
// Normalize to forward slashes
|
|
67
|
+
const normalized = filePath.replace(/\\/g, '/');
|
|
68
|
+
|
|
69
|
+
for (const pattern of EXCLUSION_PATTERNS) {
|
|
70
|
+
if (patternMatches(normalized, pattern)) {
|
|
71
|
+
return true;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Simple glob matcher supporting *, **, and literal segments.
|
|
79
|
+
* Does not require a full minimatch dependency — keeps this module light.
|
|
80
|
+
*
|
|
81
|
+
* @param {string} str
|
|
82
|
+
* @param {string} pattern
|
|
83
|
+
* @returns {boolean}
|
|
84
|
+
*/
|
|
85
|
+
function patternMatches(str: string, pattern: string) {
|
|
86
|
+
// Convert minimatch-style glob to regex
|
|
87
|
+
// Escape regex special chars except * and ?
|
|
88
|
+
let regexStr = '';
|
|
89
|
+
let i = 0;
|
|
90
|
+
const pLen = pattern.length;
|
|
91
|
+
|
|
92
|
+
while (i < pLen) {
|
|
93
|
+
const ch = pattern[i];
|
|
94
|
+
if (ch === '*') {
|
|
95
|
+
if (i + 1 < pLen && pattern[i + 1] === '*') {
|
|
96
|
+
// ** matches everything including /
|
|
97
|
+
if (i + 2 < pLen && pattern[i + 2] === '/') {
|
|
98
|
+
regexStr += '(?:.*/)?';
|
|
99
|
+
i += 3;
|
|
100
|
+
continue;
|
|
101
|
+
} else {
|
|
102
|
+
regexStr += '.*';
|
|
103
|
+
i += 2;
|
|
104
|
+
continue;
|
|
105
|
+
}
|
|
106
|
+
} else {
|
|
107
|
+
regexStr += '[^/]*';
|
|
108
|
+
i += 1;
|
|
109
|
+
continue;
|
|
110
|
+
}
|
|
111
|
+
} else if (ch === '?') {
|
|
112
|
+
regexStr += '[^/]';
|
|
113
|
+
} else if ('.+^${}()|[]\\'.includes(ch)) {
|
|
114
|
+
regexStr += '\\' + ch;
|
|
115
|
+
} else {
|
|
116
|
+
regexStr += ch;
|
|
117
|
+
}
|
|
118
|
+
i++;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
const re = new RegExp('^' + regexStr + '$');
|
|
122
|
+
return re.test(str);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Compute Net Engineering Lines (NEL) from a git diff range.
|
|
127
|
+
*
|
|
128
|
+
* Runs `git diff --numstat -w <range>` and sums insertions+deletions
|
|
129
|
+
* for files not matching exclusion globs from ADR 0047.
|
|
130
|
+
*
|
|
131
|
+
* @param {string} range - Git diff range, e.g. `main..HEAD` or `HEAD~1..HEAD`
|
|
132
|
+
* @param {{ cwd?: string }} [options]
|
|
133
|
+
* @returns {number} Total NEL count (insertions + deletions, whitespace-ignored)
|
|
134
|
+
*/
|
|
135
|
+
export function computeNEL(range: string, options: { cwd?: string } = {}) {
|
|
136
|
+
const cwd = options.cwd || process.cwd();
|
|
137
|
+
|
|
138
|
+
const result = spawnSync('git', ['diff', '--numstat', '-w', range], {
|
|
139
|
+
cwd,
|
|
140
|
+
encoding: 'utf8',
|
|
141
|
+
maxBuffer: 50 * 1024 * 1024, // 50 MB
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
if (result.status !== 0) {
|
|
145
|
+
// Git error, empty diff, or uncomputable — return 0
|
|
146
|
+
return 0;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
const stdout = result.stdout || '';
|
|
150
|
+
const lines = stdout.split('\n').filter(line => line.trim().length > 0);
|
|
151
|
+
|
|
152
|
+
let total = 0;
|
|
153
|
+
|
|
154
|
+
for (const line of lines) {
|
|
155
|
+
// numstat format: <insertions>\t<deletions>\t<filename>
|
|
156
|
+
// Binary files show: -\t-\t<filename>
|
|
157
|
+
const parts = line.split('\t');
|
|
158
|
+
if (parts.length < 3) { continue; }
|
|
159
|
+
|
|
160
|
+
const adds = parts[0];
|
|
161
|
+
const dels = parts[1];
|
|
162
|
+
const filePath = parts.slice(2).join('\t');
|
|
163
|
+
|
|
164
|
+
// Skip binary files
|
|
165
|
+
if (adds === '-' || dels === '-') { continue; }
|
|
166
|
+
|
|
167
|
+
// Apply exclusion globs
|
|
168
|
+
if (isExcluded(filePath)) { continue; }
|
|
169
|
+
|
|
170
|
+
const addsNum = parseInt(adds, 10) || 0;
|
|
171
|
+
const delsNum = parseInt(dels, 10) || 0;
|
|
172
|
+
|
|
173
|
+
total += addsNum + delsNum;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
return total;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Compute NEL and return the full NEL record including bucket classification.
|
|
181
|
+
*
|
|
182
|
+
* @param {string} range - Git diff range
|
|
183
|
+
* @param {{ cwd?: string }} [options]
|
|
184
|
+
* @returns {{ nel: number, bucket: { label: string, min: number, max: number } }}
|
|
185
|
+
*/
|
|
186
|
+
export function computeNELRecord(range: string, options: { cwd?: string } = {}) {
|
|
187
|
+
const nel = computeNEL(range, options);
|
|
188
|
+
return { nel, bucket: classifyBucket(nel) };
|
|
189
|
+
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildSubagentLimitPrefix = buildSubagentLimitPrefix;
|
|
4
|
+
const product_config_js_1 = require("./product-config.js");
|
|
3
5
|
// Build a prompt-injection prefix that instructs the agent to limit
|
|
4
6
|
// concurrent subagent forks. Returns a non-empty advisory string when
|
|
5
7
|
// maxParallel >= 1, or an empty string when the setting is absent, null,
|
|
@@ -11,18 +13,15 @@ const { loadEffectiveConfig } = require('./product-config');
|
|
|
11
13
|
// when omitted the function reads from the effective workflow config.
|
|
12
14
|
/** @param {number | null | undefined} [maxParallel] */
|
|
13
15
|
function buildSubagentLimitPrefix(maxParallel) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
let value = maxParallel;
|
|
17
|
+
if (value === undefined || value === null) {
|
|
18
|
+
const cfg = (0, product_config_js_1.loadEffectiveConfig)();
|
|
19
|
+
const agents = cfg.adapters?.agents;
|
|
20
|
+
const sub = agents?.subagents;
|
|
21
|
+
value = sub && typeof sub.maxParallel === 'number' ? sub.maxParallel : null;
|
|
22
|
+
}
|
|
23
|
+
if (typeof value !== 'number' || value < 1) {
|
|
24
|
+
return '';
|
|
25
|
+
}
|
|
26
|
+
return `Do not spawn more than ${value} parallel subagents. If you need more, pause and wait.\n`;
|
|
24
27
|
}
|
|
25
|
-
|
|
26
|
-
module.exports = {
|
|
27
|
-
buildSubagentLimitPrefix,
|
|
28
|
-
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { loadEffectiveConfig } from './product-config.js';
|
|
2
|
+
|
|
3
|
+
// Build a prompt-injection prefix that instructs the agent to limit
|
|
4
|
+
// concurrent subagent forks. Returns a non-empty advisory string when
|
|
5
|
+
// maxParallel >= 1, or an empty string when the setting is absent, null,
|
|
6
|
+
// zero, or negative (backward-compatible default).
|
|
7
|
+
//
|
|
8
|
+
// Prefix length target: under 200 characters.
|
|
9
|
+
//
|
|
10
|
+
// @param {number | null | undefined} [maxParallel] — explicit value override;
|
|
11
|
+
// when omitted the function reads from the effective workflow config.
|
|
12
|
+
/** @param {number | null | undefined} [maxParallel] */
|
|
13
|
+
export function buildSubagentLimitPrefix(maxParallel: number | null | undefined) {
|
|
14
|
+
let value = maxParallel;
|
|
15
|
+
if (value === undefined || value === null) {
|
|
16
|
+
const cfg = loadEffectiveConfig();
|
|
17
|
+
const agents = cfg.adapters?.agents as { [key: string]: unknown } | undefined;
|
|
18
|
+
const sub = agents?.subagents as { maxParallel?: number } | undefined;
|
|
19
|
+
value = sub && typeof sub.maxParallel === 'number' ? sub.maxParallel : null;
|
|
20
|
+
}
|
|
21
|
+
if (typeof value !== 'number' || value < 1) {
|
|
22
|
+
return '';
|
|
23
|
+
}
|
|
24
|
+
return `Do not spawn more than ${value} parallel subagents. If you need more, pause and wait.\n`;
|
|
25
|
+
}
|
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
|
-
|
|
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
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
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;
|