@dailephd/my-dev-kit-orchestrator 1.0.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 +295 -0
- package/dist/artifactChecker.d.ts +31 -0
- package/dist/artifactChecker.d.ts.map +1 -0
- package/dist/artifactChecker.js +341 -0
- package/dist/artifactChecker.js.map +1 -0
- package/dist/artifactLifecycle.d.ts +30 -0
- package/dist/artifactLifecycle.d.ts.map +1 -0
- package/dist/artifactLifecycle.js +176 -0
- package/dist/artifactLifecycle.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +7 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/check.d.ts +3 -0
- package/dist/commands/check.d.ts.map +1 -0
- package/dist/commands/check.js +494 -0
- package/dist/commands/check.js.map +1 -0
- package/dist/commands/export.d.ts +16 -0
- package/dist/commands/export.d.ts.map +1 -0
- package/dist/commands/export.js +248 -0
- package/dist/commands/export.js.map +1 -0
- package/dist/commands/init.d.ts +3 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +59 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/list.d.ts +3 -0
- package/dist/commands/list.d.ts.map +1 -0
- package/dist/commands/list.js +101 -0
- package/dist/commands/list.js.map +1 -0
- package/dist/commands/mark.d.ts +3 -0
- package/dist/commands/mark.d.ts.map +1 -0
- package/dist/commands/mark.js +139 -0
- package/dist/commands/mark.js.map +1 -0
- package/dist/commands/prompt.d.ts +3 -0
- package/dist/commands/prompt.d.ts.map +1 -0
- package/dist/commands/prompt.js +198 -0
- package/dist/commands/prompt.js.map +1 -0
- package/dist/commands/start.d.ts +3 -0
- package/dist/commands/start.d.ts.map +1 -0
- package/dist/commands/start.js +100 -0
- package/dist/commands/start.js.map +1 -0
- package/dist/commands/status.d.ts +3 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +191 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/contractChecker.d.ts +53 -0
- package/dist/contractChecker.d.ts.map +1 -0
- package/dist/contractChecker.js +319 -0
- package/dist/contractChecker.js.map +1 -0
- package/dist/correctionRouter.d.ts +37 -0
- package/dist/correctionRouter.d.ts.map +1 -0
- package/dist/correctionRouter.js +142 -0
- package/dist/correctionRouter.js.map +1 -0
- package/dist/correctionState.d.ts +16 -0
- package/dist/correctionState.d.ts.map +1 -0
- package/dist/correctionState.js +64 -0
- package/dist/correctionState.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/judgeParser.d.ts +16 -0
- package/dist/judgeParser.d.ts.map +1 -0
- package/dist/judgeParser.js +52 -0
- package/dist/judgeParser.js.map +1 -0
- package/dist/program.d.ts +3 -0
- package/dist/program.d.ts.map +1 -0
- package/dist/program.js +33 -0
- package/dist/program.js.map +1 -0
- package/dist/promptChecker.d.ts +27 -0
- package/dist/promptChecker.d.ts.map +1 -0
- package/dist/promptChecker.js +152 -0
- package/dist/promptChecker.js.map +1 -0
- package/dist/promptGenerator.d.ts +12 -0
- package/dist/promptGenerator.d.ts.map +1 -0
- package/dist/promptGenerator.js +2556 -0
- package/dist/promptGenerator.js.map +1 -0
- package/dist/run.d.ts +30 -0
- package/dist/run.d.ts.map +1 -0
- package/dist/run.js +141 -0
- package/dist/run.js.map +1 -0
- package/dist/stageDetector.d.ts +29 -0
- package/dist/stageDetector.d.ts.map +1 -0
- package/dist/stageDetector.js +161 -0
- package/dist/stageDetector.js.map +1 -0
- package/dist/traceChecker.d.ts +46 -0
- package/dist/traceChecker.d.ts.map +1 -0
- package/dist/traceChecker.js +257 -0
- package/dist/traceChecker.js.map +1 -0
- package/dist/traceModel.d.ts +7 -0
- package/dist/traceModel.d.ts.map +1 -0
- package/dist/traceModel.js +37 -0
- package/dist/traceModel.js.map +1 -0
- package/dist/traceParser.d.ts +27 -0
- package/dist/traceParser.d.ts.map +1 -0
- package/dist/traceParser.js +102 -0
- package/dist/traceParser.js.map +1 -0
- package/dist/types.d.ts +11 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +9 -0
- package/dist/types.js.map +1 -0
- package/dist/workflows.d.ts +16 -0
- package/dist/workflows.d.ts.map +1 -0
- package/dist/workflows.js +170 -0
- package/dist/workflows.js.map +1 -0
- package/dist/workspace.d.ts +13 -0
- package/dist/workspace.d.ts.map +1 -0
- package/dist/workspace.js +70 -0
- package/dist/workspace.js.map +1 -0
- package/package.json +62 -0
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.isSectionPlaceholderContent = isSectionPlaceholderContent;
|
|
37
|
+
exports.checkArtifactContract = checkArtifactContract;
|
|
38
|
+
exports.checkRunArtifactContracts = checkRunArtifactContracts;
|
|
39
|
+
exports.checkStageGates = checkStageGates;
|
|
40
|
+
exports.resolveArtifactContractsForMode = resolveArtifactContractsForMode;
|
|
41
|
+
const fs = __importStar(require("fs"));
|
|
42
|
+
const path = __importStar(require("path"));
|
|
43
|
+
const artifactChecker_1 = require("./artifactChecker");
|
|
44
|
+
const workflows_1 = require("./workflows");
|
|
45
|
+
const types_1 = require("./types");
|
|
46
|
+
// ─── Placeholder section detection ───────────────────────────────────────────
|
|
47
|
+
const SECTION_PLACEHOLDER_RE = /^\s*(todo|tbd|n\/a|none|to be filled|to be completed|placeholder)\s*$/i;
|
|
48
|
+
function isSectionPlaceholderContent(content) {
|
|
49
|
+
return SECTION_PLACEHOLDER_RE.test(content.trim());
|
|
50
|
+
}
|
|
51
|
+
// ─── Mode and stage validation helpers ───────────────────────────────────────
|
|
52
|
+
function getStagesForMode(mode) {
|
|
53
|
+
if (!(0, types_1.isValidMode)(mode))
|
|
54
|
+
return new Set();
|
|
55
|
+
try {
|
|
56
|
+
const workflow = (0, workflows_1.getWorkflowOrThrow)(mode);
|
|
57
|
+
return new Set(workflow.stages.map((s) => s.name));
|
|
58
|
+
}
|
|
59
|
+
catch {
|
|
60
|
+
return new Set();
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
// Build map: artifact file path -> predecessor artifact file paths (immediate prior stage)
|
|
64
|
+
function buildPredecessorMap(mode) {
|
|
65
|
+
const predecessors = new Map();
|
|
66
|
+
if (!(0, types_1.isValidMode)(mode))
|
|
67
|
+
return predecessors;
|
|
68
|
+
try {
|
|
69
|
+
const workflow = (0, workflows_1.getWorkflowOrThrow)(mode);
|
|
70
|
+
for (let i = 0; i < workflow.stages.length; i++) {
|
|
71
|
+
const stage = workflow.stages[i];
|
|
72
|
+
if (i === 0) {
|
|
73
|
+
predecessors.set(stage.artifactFile, []);
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
const prev = workflow.stages[i - 1];
|
|
77
|
+
predecessors.set(stage.artifactFile, [prev.artifactFile]);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
catch {
|
|
82
|
+
// Invalid mode: return empty map
|
|
83
|
+
}
|
|
84
|
+
return predecessors;
|
|
85
|
+
}
|
|
86
|
+
// ─── Single-artifact contract check ──────────────────────────────────────────
|
|
87
|
+
function checkArtifactContract(runFolder, artifactFile, stageName, mode, predecessorFiles, options = {}) {
|
|
88
|
+
const artifactKind = (0, artifactChecker_1.resolveArtifactKind)(stageName) ?? 'Unknown';
|
|
89
|
+
const checkedAt = new Date().toISOString();
|
|
90
|
+
const issues = [];
|
|
91
|
+
const { strict = false } = options;
|
|
92
|
+
// Unknown mode
|
|
93
|
+
if (!(0, types_1.isValidMode)(mode)) {
|
|
94
|
+
issues.push({
|
|
95
|
+
code: 'CONTRACT_UNKNOWN_MODE',
|
|
96
|
+
severity: 'fail',
|
|
97
|
+
message: `Unknown workflow mode: "${mode}". Supported: ${types_1.VALID_MODES.join(', ')}`,
|
|
98
|
+
suggestedFix: 'Check the mode field in run.json.',
|
|
99
|
+
});
|
|
100
|
+
return { artifactFile, artifactKind, stageName, mode, issues, passed: false, checkedAt };
|
|
101
|
+
}
|
|
102
|
+
// Unknown stage for this mode
|
|
103
|
+
const validStages = getStagesForMode(mode);
|
|
104
|
+
if (!validStages.has(stageName)) {
|
|
105
|
+
issues.push({
|
|
106
|
+
code: 'CONTRACT_UNKNOWN_STAGE',
|
|
107
|
+
severity: 'fail',
|
|
108
|
+
message: `Stage "${stageName}" is not valid for mode "${mode}".`,
|
|
109
|
+
suggestedFix: `Valid stages for ${mode}: ${[...validStages].join(', ')}`,
|
|
110
|
+
});
|
|
111
|
+
return { artifactFile, artifactKind, stageName, mode, issues, passed: false, checkedAt };
|
|
112
|
+
}
|
|
113
|
+
const fullPath = path.join(runFolder, artifactFile);
|
|
114
|
+
// Predecessor missing checks
|
|
115
|
+
for (const predFile of predecessorFiles) {
|
|
116
|
+
const predPath = path.join(runFolder, predFile);
|
|
117
|
+
if (!fs.existsSync(predPath)) {
|
|
118
|
+
issues.push({
|
|
119
|
+
code: 'CONTRACT_PREDECESSOR_MISSING',
|
|
120
|
+
severity: strict ? 'fail' : 'warn',
|
|
121
|
+
message: `Required predecessor artifact is missing: ${predFile}`,
|
|
122
|
+
suggestedFix: `Complete the stage that produces ${predFile} before this stage.`,
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
// Missing artifact file
|
|
127
|
+
if (!fs.existsSync(fullPath)) {
|
|
128
|
+
issues.push({
|
|
129
|
+
code: 'CONTRACT_MISSING_FILE',
|
|
130
|
+
severity: 'fail',
|
|
131
|
+
message: `Artifact file does not exist: ${artifactFile}`,
|
|
132
|
+
suggestedFix: `Run the ${stageName} stage to produce this artifact.`,
|
|
133
|
+
});
|
|
134
|
+
const passed = !issues.some((i) => i.severity === 'fail');
|
|
135
|
+
return { artifactFile, artifactKind, stageName, mode, issues, passed, checkedAt };
|
|
136
|
+
}
|
|
137
|
+
const content = fs.readFileSync(fullPath, 'utf8');
|
|
138
|
+
// Empty file
|
|
139
|
+
if (!content.trim()) {
|
|
140
|
+
issues.push({
|
|
141
|
+
code: 'CONTRACT_EMPTY_FILE',
|
|
142
|
+
severity: 'fail',
|
|
143
|
+
message: `Artifact file is empty: ${artifactFile}`,
|
|
144
|
+
suggestedFix: `The coding agent must write content to this artifact.`,
|
|
145
|
+
});
|
|
146
|
+
const passed = !issues.some((i) => i.severity === 'fail');
|
|
147
|
+
return { artifactFile, artifactKind, stageName, mode, issues, passed, checkedAt };
|
|
148
|
+
}
|
|
149
|
+
// Section requirement checks
|
|
150
|
+
const requirements = (0, artifactChecker_1.getArtifactSectionRequirements)(artifactKind);
|
|
151
|
+
if (!requirements) {
|
|
152
|
+
// No section contract defined for this artifact kind
|
|
153
|
+
issues.push({
|
|
154
|
+
code: 'CONTRACT_STAGE_NO_CONTRACT',
|
|
155
|
+
severity: strict ? 'fail' : 'warn',
|
|
156
|
+
message: `No section contract is defined for artifact kind "${artifactKind}" (stage: ${stageName})`,
|
|
157
|
+
suggestedFix: `Add section requirements to the SECTION_REGISTRY for ${artifactKind}.`,
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
else {
|
|
161
|
+
const parsed = (0, artifactChecker_1.parseArtifact)(content);
|
|
162
|
+
for (const section of requirements.required) {
|
|
163
|
+
if (!parsed.sections.has(section)) {
|
|
164
|
+
issues.push({
|
|
165
|
+
code: 'CONTRACT_MISSING_SECTION',
|
|
166
|
+
severity: 'fail',
|
|
167
|
+
message: `Required section "${section}" is missing from ${artifactFile}`,
|
|
168
|
+
suggestedFix: `Add a "${section}:" header with content to the artifact.`,
|
|
169
|
+
section,
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
else {
|
|
173
|
+
const sectionContent = parsed.sections.get(section) ?? '';
|
|
174
|
+
if (!sectionContent.trim()) {
|
|
175
|
+
issues.push({
|
|
176
|
+
code: 'CONTRACT_BLANK_SECTION',
|
|
177
|
+
severity: strict ? 'fail' : 'warn',
|
|
178
|
+
message: `Required section "${section}" is present but blank`,
|
|
179
|
+
suggestedFix: `Add content to the "${section}" section.`,
|
|
180
|
+
section,
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
else if (isSectionPlaceholderContent(sectionContent)) {
|
|
184
|
+
issues.push({
|
|
185
|
+
code: 'CONTRACT_PLACEHOLDER_SECTION',
|
|
186
|
+
severity: strict ? 'fail' : 'warn',
|
|
187
|
+
message: `Required section "${section}" contains only placeholder content`,
|
|
188
|
+
suggestedFix: `Replace placeholder content in "${section}" with actual content.`,
|
|
189
|
+
section,
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
const passed = !issues.some((i) => i.severity === 'fail');
|
|
196
|
+
return { artifactFile, artifactKind, stageName, mode, issues, passed, checkedAt };
|
|
197
|
+
}
|
|
198
|
+
// ─── Run-level contract check ─────────────────────────────────────────────────
|
|
199
|
+
function checkRunArtifactContracts(meta, options = {}) {
|
|
200
|
+
const checkedAt = new Date().toISOString();
|
|
201
|
+
const modeIssues = [];
|
|
202
|
+
const results = [];
|
|
203
|
+
if (!(0, types_1.isValidMode)(meta.mode)) {
|
|
204
|
+
modeIssues.push({
|
|
205
|
+
code: 'CONTRACT_UNKNOWN_MODE',
|
|
206
|
+
severity: 'fail',
|
|
207
|
+
message: `Run mode "${meta.mode}" is not a supported workflow mode.`,
|
|
208
|
+
suggestedFix: `Supported modes: ${types_1.VALID_MODES.join(', ')}`,
|
|
209
|
+
});
|
|
210
|
+
return {
|
|
211
|
+
runId: meta.runId,
|
|
212
|
+
mode: meta.mode,
|
|
213
|
+
modeValid: false,
|
|
214
|
+
results,
|
|
215
|
+
modeIssues,
|
|
216
|
+
checkedAt,
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
const predecessorMap = buildPredecessorMap(meta.mode);
|
|
220
|
+
const validStages = getStagesForMode(meta.mode);
|
|
221
|
+
for (const stage of meta.stages) {
|
|
222
|
+
if (!validStages.has(stage.name)) {
|
|
223
|
+
modeIssues.push({
|
|
224
|
+
code: 'CONTRACT_UNKNOWN_STAGE',
|
|
225
|
+
severity: 'warn',
|
|
226
|
+
message: `Stage "${stage.name}" is not expected for mode "${meta.mode}"`,
|
|
227
|
+
suggestedFix: `Review run.json stages for mode ${meta.mode}.`,
|
|
228
|
+
});
|
|
229
|
+
continue;
|
|
230
|
+
}
|
|
231
|
+
const predecessorFiles = predecessorMap.get(stage.artifactFile) ?? [];
|
|
232
|
+
results.push(checkArtifactContract(meta.runFolder, stage.artifactFile, stage.name, meta.mode, predecessorFiles, options));
|
|
233
|
+
for (const additional of stage.additionalArtifactFiles ?? []) {
|
|
234
|
+
results.push(checkArtifactContract(meta.runFolder, additional, stage.name, meta.mode, [stage.artifactFile], options));
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
return {
|
|
238
|
+
runId: meta.runId,
|
|
239
|
+
mode: meta.mode,
|
|
240
|
+
modeValid: true,
|
|
241
|
+
results,
|
|
242
|
+
modeIssues,
|
|
243
|
+
checkedAt,
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
// Critical gate pairs: if downstream artifact exists but prerequisite does not, gate is violated.
|
|
247
|
+
// Derived from agents.txt gate rules, applied across all modes via stage name lookup.
|
|
248
|
+
const CRITICAL_GATE_PAIRS = [
|
|
249
|
+
['pseudocode-packet', 'behavior-model', 'Gate 1: pseudocode-packet requires behavior-model'],
|
|
250
|
+
['implementation', 'pseudocode-packet', 'Gate 2: implementation requires pseudocode-packet'],
|
|
251
|
+
['test-implementation', 'test-strategy', 'Gate 3: test-implementation requires test-strategy'],
|
|
252
|
+
['verification', 'implementation', 'Gate 4a: verification requires implementation'],
|
|
253
|
+
['verification', 'test-implementation', 'Gate 4b: verification requires test-implementation'],
|
|
254
|
+
['judge', 'verification', 'Gate 5: judge requires verification'],
|
|
255
|
+
['final-report', 'judge', 'Gate 6: final-report requires judge'],
|
|
256
|
+
// repair-mode specific
|
|
257
|
+
['correction-design', 'divergence-report', 'Repair gate: correction-design requires divergence-report'],
|
|
258
|
+
// test-mode specific
|
|
259
|
+
['test-implementation', 'behavior-reconstruction', 'Test gate: test-implementation requires behavior-reconstruction'],
|
|
260
|
+
// refactor-mode specific
|
|
261
|
+
['implementation', 'refactor-pseudocode-packet', 'Refactor gate: implementation requires refactor-pseudocode-packet'],
|
|
262
|
+
// harden-mode specific
|
|
263
|
+
['implementation', 'guard-pseudocode-packet', 'Harden gate: implementation requires guard-pseudocode-packet'],
|
|
264
|
+
];
|
|
265
|
+
function checkStageGates(meta) {
|
|
266
|
+
const violations = [];
|
|
267
|
+
const stageArtifactMap = new Map();
|
|
268
|
+
for (const stage of meta.stages) {
|
|
269
|
+
stageArtifactMap.set(stage.name, stage.artifactFile);
|
|
270
|
+
}
|
|
271
|
+
const exists = (stageName) => {
|
|
272
|
+
const file = stageArtifactMap.get(stageName);
|
|
273
|
+
if (!file)
|
|
274
|
+
return false;
|
|
275
|
+
return fs.existsSync(path.join(meta.runFolder, file));
|
|
276
|
+
};
|
|
277
|
+
for (const [downstream, prerequisite, gateName] of CRITICAL_GATE_PAIRS) {
|
|
278
|
+
const downstreamFile = stageArtifactMap.get(downstream);
|
|
279
|
+
const prerequisiteFile = stageArtifactMap.get(prerequisite);
|
|
280
|
+
if (!downstreamFile || !prerequisiteFile)
|
|
281
|
+
continue;
|
|
282
|
+
if (exists(downstream) && !exists(prerequisite)) {
|
|
283
|
+
violations.push({
|
|
284
|
+
gateName,
|
|
285
|
+
severity: 'fail',
|
|
286
|
+
message: `"${downstream}" artifact exists but required prerequisite "${prerequisite}" is missing`,
|
|
287
|
+
missingArtifact: prerequisiteFile,
|
|
288
|
+
presentArtifact: downstreamFile,
|
|
289
|
+
suggestedFix: `Complete the ${prerequisite} stage before proceeding to ${downstream}.`,
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
return violations;
|
|
294
|
+
}
|
|
295
|
+
// ─── Mode contract summary ─────────────────────────────────────────────────────
|
|
296
|
+
function resolveArtifactContractsForMode(mode) {
|
|
297
|
+
if (!(0, types_1.isValidMode)(mode))
|
|
298
|
+
return null;
|
|
299
|
+
try {
|
|
300
|
+
const workflow = (0, workflows_1.getWorkflowOrThrow)(mode);
|
|
301
|
+
const predecessorMap = buildPredecessorMap(mode);
|
|
302
|
+
const stages = workflow.stages.map((stage) => {
|
|
303
|
+
const artifactKind = (0, artifactChecker_1.resolveArtifactKind)(stage.name) ?? 'Unknown';
|
|
304
|
+
const requirements = (0, artifactChecker_1.getArtifactSectionRequirements)(artifactKind);
|
|
305
|
+
return {
|
|
306
|
+
stageName: stage.name,
|
|
307
|
+
artifactFile: stage.artifactFile,
|
|
308
|
+
artifactKind,
|
|
309
|
+
predecessors: predecessorMap.get(stage.artifactFile) ?? [],
|
|
310
|
+
requiredSections: requirements?.required ?? [],
|
|
311
|
+
};
|
|
312
|
+
});
|
|
313
|
+
return { mode, stages };
|
|
314
|
+
}
|
|
315
|
+
catch {
|
|
316
|
+
return null;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
//# sourceMappingURL=contractChecker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contractChecker.js","sourceRoot":"","sources":["../src/contractChecker.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8DA,kEAEC;AAqCD,sDA2HC;AAID,8DAyEC;AAiCD,0CA8BC;AAID,0EAoBC;AApYD,uCAAyB;AACzB,2CAA6B;AAE7B,uDAI2B;AAC3B,2CAAiD;AACjD,mCAAmD;AAgDnD,gFAAgF;AAEhF,MAAM,sBAAsB,GAC1B,wEAAwE,CAAC;AAE3E,SAAgB,2BAA2B,CAAC,OAAe;IACzD,OAAO,sBAAsB,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;AACrD,CAAC;AAED,gFAAgF;AAEhF,SAAS,gBAAgB,CAAC,IAAY;IACpC,IAAI,CAAC,IAAA,mBAAW,EAAC,IAAI,CAAC;QAAE,OAAO,IAAI,GAAG,EAAE,CAAC;IACzC,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,IAAA,8BAAkB,EAAC,IAAI,CAAC,CAAC;QAC1C,OAAO,IAAI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kB,EAAC,IAAI,CAAC,CAAC;QAC1C,MAAM,cAAc,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC;QACjD,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;YAC3C,MAAM,YAAY,GAAG,IAAA,qCAAmB,EAAC,KAAK,CAAC,IAAI,CAAC,IAAI,SAAS,CAAC;YAClE,MAAM,YAAY,GAAG,IAAA,gDAA8B,EAAC,YAAY,CAAC,CAAC;YAClE,OAAO;gBACL,SAAS,EAAE,KAAK,CAAC,IAAI;gBACrB,YAAY,EAAE,KAAK,CAAC,YAAY;gBAChC,YAAY;gBACZ,YAAY,EAAE,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,EAAE;gBAC1D,gBAAgB,EAAE,YAAY,EAAE,QAAQ,IAAI,EAAE;aAC/C,CAAC;QACJ,CAAC,CAAC,CAAC;QACH,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAC1B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { JudgeVerdict, ParsedJudgeReport } from './judgeParser';
|
|
2
|
+
export declare const CORRECTABLE_STAGES: readonly ["architecture-context", "behavior-model", "pseudocode-packet", "test-strategy", "test-implementation", "implementation", "verification"];
|
|
3
|
+
export type CorrectableStage = (typeof CORRECTABLE_STAGES)[number];
|
|
4
|
+
export type RouteStatus = 'pass' | 'correction_required' | 'blocked' | 'unknown_verdict' | 'missing_verdict';
|
|
5
|
+
export interface CorrectionRouteResult {
|
|
6
|
+
verdict: JudgeVerdict | null;
|
|
7
|
+
recommendedStage: string | null;
|
|
8
|
+
routedStage: CorrectableStage | null;
|
|
9
|
+
routeStatus: RouteStatus;
|
|
10
|
+
warnings: string[];
|
|
11
|
+
errors: string[];
|
|
12
|
+
isBlocked: boolean;
|
|
13
|
+
strictFail: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare function isCorrectableStage(s: string): s is CorrectableStage;
|
|
16
|
+
/**
|
|
17
|
+
* Routes a parsed judge report to a correction stage.
|
|
18
|
+
*
|
|
19
|
+
* - PASS → routeStatus: 'pass', no correction
|
|
20
|
+
* - null verdict with parseError → routeStatus: 'unknown_verdict'
|
|
21
|
+
* - null verdict without parseError → routeStatus: 'missing_verdict'
|
|
22
|
+
* - SCOPE_VIOLATION / BLOCKED → routeStatus: 'blocked', isBlocked: true
|
|
23
|
+
* - Other known verdicts → routeStatus: 'correction_required', routedStage from table
|
|
24
|
+
*
|
|
25
|
+
* If recommendedNextStage conflicts with the table default, a warning is added.
|
|
26
|
+
* In strict mode, a conflict produces strictFail: true.
|
|
27
|
+
*/
|
|
28
|
+
export declare function routeJudgeVerdict(parsed: ParsedJudgeReport, options?: {
|
|
29
|
+
strict?: boolean;
|
|
30
|
+
}): CorrectionRouteResult;
|
|
31
|
+
/**
|
|
32
|
+
* High-level helper: parse a judge report string and route it in one call.
|
|
33
|
+
*/
|
|
34
|
+
export declare function parseAndRoute(content: string, options?: {
|
|
35
|
+
strict?: boolean;
|
|
36
|
+
}): CorrectionRouteResult;
|
|
37
|
+
//# sourceMappingURL=correctionRouter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"correctionRouter.d.ts","sourceRoot":"","sources":["../src/correctionRouter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAoB,MAAM,eAAe,CAAC;AAIlF,eAAO,MAAM,kBAAkB,oJAQrB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnE,MAAM,MAAM,WAAW,GACnB,MAAM,GACN,qBAAqB,GACrB,SAAS,GACT,iBAAiB,GACjB,iBAAiB,CAAC;AAEtB,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,YAAY,GAAG,IAAI,CAAC;IAC7B,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,WAAW,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACrC,WAAW,EAAE,WAAW,CAAC;IACzB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;CACrB;AAmBD,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC,IAAI,gBAAgB,CAEnE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,iBAAiB,EACzB,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GACjC,qBAAqB,CA8FvB;AAED;;GAEG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,MAAM,EACf,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GACjC,qBAAqB,CAGvB"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CORRECTABLE_STAGES = void 0;
|
|
4
|
+
exports.isCorrectableStage = isCorrectableStage;
|
|
5
|
+
exports.routeJudgeVerdict = routeJudgeVerdict;
|
|
6
|
+
exports.parseAndRoute = parseAndRoute;
|
|
7
|
+
const judgeParser_1 = require("./judgeParser");
|
|
8
|
+
// The set of stage names that correction routing can target.
|
|
9
|
+
// These are the canonical stage names as used in workflow stage definitions.
|
|
10
|
+
exports.CORRECTABLE_STAGES = [
|
|
11
|
+
'architecture-context',
|
|
12
|
+
'behavior-model',
|
|
13
|
+
'pseudocode-packet',
|
|
14
|
+
'test-strategy',
|
|
15
|
+
'test-implementation',
|
|
16
|
+
'implementation',
|
|
17
|
+
'verification',
|
|
18
|
+
];
|
|
19
|
+
/**
|
|
20
|
+
* Deterministic routing table: maps each non-PASS verdict to a default
|
|
21
|
+
* correction stage. SCOPE_VIOLATION and BLOCKED do not route to a stage -
|
|
22
|
+
* they produce the "blocked" status instead.
|
|
23
|
+
*/
|
|
24
|
+
const VERDICT_ROUTE_TABLE = {
|
|
25
|
+
NEED_CONTEXT: 'architecture-context',
|
|
26
|
+
DESIGN_INCOMPLETE: 'behavior-model',
|
|
27
|
+
PSEUDOCODE_INCOMPLETE: 'pseudocode-packet',
|
|
28
|
+
IMPLEMENTATION_MISMATCH: 'implementation',
|
|
29
|
+
TEST_COVERAGE_INCOMPLETE: 'test-strategy',
|
|
30
|
+
ARCHITECTURE_MISMATCH: 'architecture-context',
|
|
31
|
+
NEED_VERIFICATION: 'verification',
|
|
32
|
+
};
|
|
33
|
+
const BLOCKED_VERDICTS = new Set(['SCOPE_VIOLATION', 'BLOCKED']);
|
|
34
|
+
function isCorrectableStage(s) {
|
|
35
|
+
return exports.CORRECTABLE_STAGES.includes(s);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Routes a parsed judge report to a correction stage.
|
|
39
|
+
*
|
|
40
|
+
* - PASS → routeStatus: 'pass', no correction
|
|
41
|
+
* - null verdict with parseError → routeStatus: 'unknown_verdict'
|
|
42
|
+
* - null verdict without parseError → routeStatus: 'missing_verdict'
|
|
43
|
+
* - SCOPE_VIOLATION / BLOCKED → routeStatus: 'blocked', isBlocked: true
|
|
44
|
+
* - Other known verdicts → routeStatus: 'correction_required', routedStage from table
|
|
45
|
+
*
|
|
46
|
+
* If recommendedNextStage conflicts with the table default, a warning is added.
|
|
47
|
+
* In strict mode, a conflict produces strictFail: true.
|
|
48
|
+
*/
|
|
49
|
+
function routeJudgeVerdict(parsed, options = {}) {
|
|
50
|
+
const warnings = [];
|
|
51
|
+
const errors = [];
|
|
52
|
+
if (parsed.parseError) {
|
|
53
|
+
errors.push(parsed.parseError);
|
|
54
|
+
return {
|
|
55
|
+
verdict: null,
|
|
56
|
+
recommendedStage: parsed.recommendedNextStage,
|
|
57
|
+
routedStage: null,
|
|
58
|
+
routeStatus: 'unknown_verdict',
|
|
59
|
+
warnings,
|
|
60
|
+
errors,
|
|
61
|
+
isBlocked: false,
|
|
62
|
+
strictFail: false,
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
if (parsed.verdict === null) {
|
|
66
|
+
return {
|
|
67
|
+
verdict: null,
|
|
68
|
+
recommendedStage: parsed.recommendedNextStage,
|
|
69
|
+
routedStage: null,
|
|
70
|
+
routeStatus: 'missing_verdict',
|
|
71
|
+
warnings,
|
|
72
|
+
errors,
|
|
73
|
+
isBlocked: false,
|
|
74
|
+
strictFail: false,
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
if (parsed.verdict === 'PASS') {
|
|
78
|
+
return {
|
|
79
|
+
verdict: 'PASS',
|
|
80
|
+
recommendedStage: parsed.recommendedNextStage,
|
|
81
|
+
routedStage: null,
|
|
82
|
+
routeStatus: 'pass',
|
|
83
|
+
warnings,
|
|
84
|
+
errors,
|
|
85
|
+
isBlocked: false,
|
|
86
|
+
strictFail: false,
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
if (BLOCKED_VERDICTS.has(parsed.verdict)) {
|
|
90
|
+
return {
|
|
91
|
+
verdict: parsed.verdict,
|
|
92
|
+
recommendedStage: parsed.recommendedNextStage,
|
|
93
|
+
routedStage: null,
|
|
94
|
+
routeStatus: 'blocked',
|
|
95
|
+
warnings,
|
|
96
|
+
errors,
|
|
97
|
+
isBlocked: true,
|
|
98
|
+
strictFail: false,
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
// Correction-required verdicts
|
|
102
|
+
const tableStage = VERDICT_ROUTE_TABLE[parsed.verdict] ?? null;
|
|
103
|
+
// Honour recommended stage when it's a valid correctable stage
|
|
104
|
+
let routedStage = tableStage;
|
|
105
|
+
if (parsed.recommendedNextStage) {
|
|
106
|
+
if (isCorrectableStage(parsed.recommendedNextStage)) {
|
|
107
|
+
if (parsed.recommendedNextStage !== tableStage) {
|
|
108
|
+
// Conflict between table and recommendation
|
|
109
|
+
const msg = `Judge recommended "${parsed.recommendedNextStage}" but routing table suggests ` +
|
|
110
|
+
`"${tableStage}" for verdict ${parsed.verdict}. Using recommended stage.`;
|
|
111
|
+
warnings.push(msg);
|
|
112
|
+
if (options.strict) {
|
|
113
|
+
errors.push(`Strict mode: verdict/recommended-stage conflict is a failure. ${msg}`);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
// Recommended stage wins when it's correctable
|
|
117
|
+
routedStage = parsed.recommendedNextStage;
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
warnings.push(`Recommended next stage "${parsed.recommendedNextStage}" is not a known correctable stage; ` +
|
|
121
|
+
`using table default "${tableStage}".`);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
return {
|
|
125
|
+
verdict: parsed.verdict,
|
|
126
|
+
recommendedStage: parsed.recommendedNextStage,
|
|
127
|
+
routedStage,
|
|
128
|
+
routeStatus: 'correction_required',
|
|
129
|
+
warnings,
|
|
130
|
+
errors,
|
|
131
|
+
isBlocked: false,
|
|
132
|
+
strictFail: options.strict === true && errors.length > 0,
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* High-level helper: parse a judge report string and route it in one call.
|
|
137
|
+
*/
|
|
138
|
+
function parseAndRoute(content, options = {}) {
|
|
139
|
+
const parsed = (0, judgeParser_1.parseJudgeReport)(content);
|
|
140
|
+
return routeJudgeVerdict(parsed, options);
|
|
141
|
+
}
|
|
142
|
+
//# sourceMappingURL=correctionRouter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"correctionRouter.js","sourceRoot":"","sources":["../src/correctionRouter.ts"],"names":[],"mappings":";;;AAmDA,gDAEC;AAcD,8CAiGC;AAKD,sCAMC;AA/KD,+CAAkF;AAElF,6DAA6D;AAC7D,6EAA6E;AAChE,QAAA,kBAA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AAC,IAAI,CAAC,iEAAiE,GAAG,EAAE,CAAC,CAAC;gBACtF,CAAC;YACH,CAAC;YACD,+CAA+C;YAC/C,WAAW,GAAG,MAAM,CAAC,oBAAwC,CAAC;QAChE,CAAC;aAAM,CAAC;YACN,QAAQ,CAAC,IAAI,CACX,2BAA2B,MAAM,CAAC,oBAAoB,sCAAsC;gBAC1F,wBAAwB,UAAU,IAAI,CACzC,CAAC;QACJ,CAAC;IACH,CAAC;IAED,OAAO;QACL,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,gBAAgB,EAAE,MAAM,CAAC,oBAAoB;QAC7C,WAAW;QACX,WAAW,EAAE,qBAAqB;QAClC,QAAQ;QACR,MAAM;QACN,SAAS,EAAE,KAAK;QAChB,UAAU,EAAE,OAAO,CAAC,MAAM,KAAK,IAAI,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC;KACzD,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAgB,aAAa,CAC3B,OAAe,EACf,UAAgC,EAAE;IAElC,MAAM,MAAM,GAAG,IAAA,8BAAgB,EAAC,OAAO,CAAC,CAAC;IACzC,OAAO,iBAAiB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAC5C,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CorrectionRouteResult } from './correctionRouter';
|
|
2
|
+
/**
|
|
3
|
+
* Reads artifacts/judge-report.txt from the run folder and computes the
|
|
4
|
+
* correction route result. Returns null when no judge report exists yet.
|
|
5
|
+
* This is computed fresh each call - no additional persistence file is needed.
|
|
6
|
+
*/
|
|
7
|
+
export declare function readCorrectionState(runFolder: string, options?: {
|
|
8
|
+
strict?: boolean;
|
|
9
|
+
}): CorrectionRouteResult | null;
|
|
10
|
+
/**
|
|
11
|
+
* Returns true when a correction route is active for this run:
|
|
12
|
+
* a judge report exists with a non-PASS, non-blocked verdict that maps
|
|
13
|
+
* to a correctable stage.
|
|
14
|
+
*/
|
|
15
|
+
export declare function isCorrectionActive(runFolder: string): boolean;
|
|
16
|
+
//# sourceMappingURL=correctionState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"correctionState.d.ts","sourceRoot":"","sources":["../src/correctionState.ts"],"names":[],"mappings":"AAGA,OAAO,EAAqB,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAE9E;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GACjC,qBAAqB,GAAG,IAAI,CAO9B;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAG7D"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.readCorrectionState = readCorrectionState;
|
|
37
|
+
exports.isCorrectionActive = isCorrectionActive;
|
|
38
|
+
const fs = __importStar(require("fs"));
|
|
39
|
+
const path = __importStar(require("path"));
|
|
40
|
+
const judgeParser_1 = require("./judgeParser");
|
|
41
|
+
const correctionRouter_1 = require("./correctionRouter");
|
|
42
|
+
/**
|
|
43
|
+
* Reads artifacts/judge-report.txt from the run folder and computes the
|
|
44
|
+
* correction route result. Returns null when no judge report exists yet.
|
|
45
|
+
* This is computed fresh each call - no additional persistence file is needed.
|
|
46
|
+
*/
|
|
47
|
+
function readCorrectionState(runFolder, options = {}) {
|
|
48
|
+
const reportPath = path.join(runFolder, 'artifacts', 'judge-report.txt');
|
|
49
|
+
if (!fs.existsSync(reportPath))
|
|
50
|
+
return null;
|
|
51
|
+
const content = fs.readFileSync(reportPath, 'utf8');
|
|
52
|
+
const parsed = (0, judgeParser_1.parseJudgeReport)(content);
|
|
53
|
+
return (0, correctionRouter_1.routeJudgeVerdict)(parsed, options);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Returns true when a correction route is active for this run:
|
|
57
|
+
* a judge report exists with a non-PASS, non-blocked verdict that maps
|
|
58
|
+
* to a correctable stage.
|
|
59
|
+
*/
|
|
60
|
+
function isCorrectionActive(runFolder) {
|
|
61
|
+
const state = readCorrectionState(runFolder);
|
|
62
|
+
return state !== null && state.routeStatus === 'correction_required';
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=correctionState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"correctionState.js","sourceRoot":"","sources":["../src/correctionState.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,kDAUC;AAOD,gDAGC;AA9BD,uCAAyB;AACzB,2CAA6B;AAC7B,+CAAiD;AACjD,yDAA8E;AAE9E;;;;GAIG;AACH,SAAgB,mBAAmB,CACjC,SAAiB,EACjB,UAAgC,EAAE;IAElC,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,WAAW,EAAE,kBAAkB,CAAC,CAAC;IACzE,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;QAAE,OAAO,IAAI,CAAC;IAE5C,MAAM,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;IACpD,MAAM,MAAM,GAAG,IAAA,8BAAgB,EAAC,OAAO,CAAC,CAAC;IACzC,OAAO,IAAA,oCAAiB,EAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAC5C,CAAC;AAED;;;;GAIG;AACH,SAAgB,kBAAkB,CAAC,SAAiB;IAClD,MAAM,KAAK,GAAG,mBAAmB,CAAC,SAAS,CAAC,CAAC;IAC7C,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,CAAC,WAAW,KAAK,qBAAqB,CAAC;AACvE,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACnD,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isValidMode = exports.VALID_MODES = exports.createProgram = void 0;
|
|
4
|
+
var program_1 = require("./program");
|
|
5
|
+
Object.defineProperty(exports, "createProgram", { enumerable: true, get: function () { return program_1.createProgram; } });
|
|
6
|
+
var types_1 = require("./types");
|
|
7
|
+
Object.defineProperty(exports, "VALID_MODES", { enumerable: true, get: function () { return types_1.VALID_MODES; } });
|
|
8
|
+
Object.defineProperty(exports, "isValidMode", { enumerable: true, get: function () { return types_1.isValidMode; } });
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,qCAA0C;AAAjC,wGAAA,aAAa,OAAA;AACtB,iCAAmD;AAA1C,oGAAA,WAAW,OAAA;AAAE,oGAAA,WAAW,OAAA"}
|