substrate-ai 0.20.64 → 0.20.66
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/dist/adapter-registry-BbVWH3Yv.js +4 -0
- package/dist/cli/index.js +172 -25
- package/dist/{decision-router-BA__VYIp.js → decision-router-DblHY8se.js} +1 -1
- package/dist/{decisions-4F91LrVD.js → decisions-DilHo99V.js} +2 -2
- package/dist/{dist-W2emvN3F.js → dist-K_RRWnBX.js} +2 -2
- package/dist/{errors-CKFu8YI9.js → errors-pSiZbn6e.js} +2 -2
- package/dist/{experimenter-BgpUcUaW.js → experimenter-DT9v2Pto.js} +1 -1
- package/dist/health-D6MKxV46.js +1715 -0
- package/dist/health-rGXaJvYJ.js +8 -0
- package/dist/index-c924O9mj.d.ts +1432 -0
- package/dist/index.d.ts +56 -735
- package/dist/index.js +2 -2
- package/dist/interactive-prompt-kzkG24Rn.js +183 -0
- package/dist/{health-DudlnqXd.js → manifest-read-g4zt3DXJ.js} +280 -2014
- package/dist/modules/interactive-prompt/index.d.ts +86 -0
- package/dist/modules/interactive-prompt/index.js +6 -0
- package/dist/recovery-engine-BKGBeBnW.js +281 -0
- package/dist/{routing-0ykvBl_4.js → routing-CzF0p6lI.js} +2 -2
- package/dist/{run-CCxsv-9M.js → run-7h2-DIjt.js} +282 -37
- package/dist/run-DB9P6m_P.js +14 -0
- package/dist/src/modules/decision-router/index.js +1 -1
- package/dist/src/modules/recovery-engine/index.d.ts +1101 -0
- package/dist/src/modules/recovery-engine/index.js +5 -0
- package/dist/{upgrade-OFeC_NIx.js → upgrade-DxzQ1nss.js} +3 -3
- package/dist/{upgrade-aW7GYL2F.js → upgrade-MP9XzrI6.js} +2 -2
- package/dist/version-manager-impl-GZDUBt0Q.js +4 -0
- package/dist/work-graph-repository-DZyJv5pV.js +265 -0
- package/package.json +1 -1
- package/dist/adapter-registry-k7ZX3Bz6.js +0 -4
- package/dist/health-CLNmnZiw.js +0 -6
- package/dist/run-ChxsPICN.js +0 -10
- package/dist/version-manager-impl-BCSf5E3j.js +0 -4
- /package/dist/{decisions-C0pz9Clx.js → decisions-CzSIEeGP.js} +0 -0
- /package/dist/{routing-CcBOCuC9.js → routing-DFxoKHDt.js} +0 -0
- /package/dist/{version-manager-impl-FH4TTnXm.js → version-manager-impl-qFBiO4Eh.js} +0 -0
package/dist/cli/index.js
CHANGED
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { FileStateStore,
|
|
2
|
+
import { FileStateStore, SUBSTRATE_OWNED_SETTINGS_KEYS, VALID_PHASES, buildPipelineStatusOutput, createDatabaseAdapter, createStateStore, findPackageRoot, formatOutput, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, inspectProcessTree, parseDbTimestampAsUtc, registerHealthCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion } from "../health-D6MKxV46.js";
|
|
3
3
|
import { createLogger } from "../logger-KeHncl-f.js";
|
|
4
4
|
import { createEventBus } from "../helpers-CElYrONe.js";
|
|
5
|
-
import { AdapterRegistry, BudgetConfigSchema, CURRENT_CONFIG_FORMAT_VERSION, CURRENT_TASK_GRAPH_VERSION, ConfigError, CostTrackerConfigSchema, DEFAULT_CONFIG, DoltClient, DoltNotInstalled, GlobalSettingsSchema, InMemoryDatabaseAdapter, IngestionServer, MonitorDatabaseImpl, OPERATIONAL_FINDING, PartialGlobalSettingsSchema, PartialProviderConfigSchema, ProvidersSchema, RoutingRecommender, STORY_METRICS, TelemetryConfigSchema, addTokenUsage, aggregateTokenUsageForRun, checkDoltInstalled, compareRunMetrics, createAmendmentRun, createConfigSystem, createDecision, createDoltClient, createPipelineRun, getActiveDecisions, getAllCostEntriesFiltered, getBaselineRunMetrics, getDecisionsByCategory, getDecisionsByPhaseForRun, getLatestCompletedRun, getLatestRun, getPipelineRunById, getPlanningCostTotal, getRetryableEscalations, getRunMetrics, getRunningPipelineRuns, getSessionCostSummary, getSessionCostSummaryFiltered, getStoryMetricsForRun, getTokenUsageSummary, incrementRunRestarts, initSchema, initializeDolt, listRunMetrics, loadParentRunDecisions, supersedeDecision, tagRunAsBaseline, updatePipelineRun } from "../dist-
|
|
5
|
+
import { AdapterRegistry$1 as AdapterRegistry, BudgetConfigSchema, CURRENT_CONFIG_FORMAT_VERSION, CURRENT_TASK_GRAPH_VERSION, ConfigError$1 as ConfigError, CostTrackerConfigSchema, DEFAULT_CONFIG, DoltClient, DoltNotInstalled, GlobalSettingsSchema, InMemoryDatabaseAdapter, IngestionServer, MonitorDatabaseImpl, OPERATIONAL_FINDING, PartialGlobalSettingsSchema, PartialProviderConfigSchema, ProvidersSchema, RoutingRecommender, STORY_METRICS, TelemetryConfigSchema, addTokenUsage, aggregateTokenUsageForRun, checkDoltInstalled, compareRunMetrics, createAmendmentRun, createConfigSystem, createDecision, createDoltClient, createPipelineRun, getActiveDecisions, getAllCostEntriesFiltered, getBaselineRunMetrics, getDecisionsByCategory, getDecisionsByPhaseForRun, getLatestCompletedRun, getLatestRun, getPipelineRunById, getPlanningCostTotal, getRetryableEscalations, getRunMetrics, getRunningPipelineRuns, getSessionCostSummary, getSessionCostSummaryFiltered, getStoryMetricsForRun, getTokenUsageSummary, incrementRunRestarts, initSchema, initializeDolt, listRunMetrics, loadParentRunDecisions, supersedeDecision, tagRunAsBaseline, updatePipelineRun } from "../dist-K_RRWnBX.js";
|
|
6
6
|
import "../adapter-registry-DXLMTmfD.js";
|
|
7
|
-
import {
|
|
8
|
-
import "../
|
|
9
|
-
import "../
|
|
10
|
-
import "../
|
|
11
|
-
import "../
|
|
12
|
-
import "../
|
|
13
|
-
import
|
|
7
|
+
import { RunManifest, SupervisorLock, ZERO_FINDINGS_BY_AUTHOR, ZERO_FINDING_COUNTS, ZERO_PROBE_AUTHOR_METRICS, aggregateProbeAuthorMetrics, parseRuntimeProbes, readCurrentRunId, resolveMainRepoRoot, resolveRunManifest, rollupFindingCounts, rollupFindingsByAuthor, rollupProbeAuthorByClass, rollupProbeAuthorMetrics, runAcTraceabilityCheck } from "../manifest-read-g4zt3DXJ.js";
|
|
8
|
+
import { AdapterTelemetryPersistence, AppError, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, EpicIngester, GLOBSTAR, GitClient, GrammarLoader, Minimatch, Minipass, RepoMapInjector, RepoMapModule, RepoMapQueryEngine, RepoMapStorage, SymbolParser, createContextCompiler, createDispatcher, createEventEmitter, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStopAfterGate, createTelemetryAdvisor, escape, formatPhaseCompletionSummary, getFactoryRunSummaries, getScenarioResultsForRun, getTwinRunsForRun, listGraphRuns, registerExportCommand, registerFactoryCommand, registerRunCommand, registerScenariosCommand, resolveStoryKeys, runAnalysisPhase, runPlanningPhase, runProbeAuthor, runSolutioningPhase, unescape, validateStopAfterFromConflict } from "../run-7h2-DIjt.js";
|
|
9
|
+
import "../errors-pSiZbn6e.js";
|
|
10
|
+
import "../routing-DFxoKHDt.js";
|
|
11
|
+
import { WorkGraphRepository } from "../work-graph-repository-DZyJv5pV.js";
|
|
12
|
+
import "../decisions-CzSIEeGP.js";
|
|
13
|
+
import "../decision-router-DblHY8se.js";
|
|
14
|
+
import "../interactive-prompt-kzkG24Rn.js";
|
|
15
|
+
import "../recovery-engine-BKGBeBnW.js";
|
|
16
|
+
import "../version-manager-impl-qFBiO4Eh.js";
|
|
17
|
+
import { registerUpgradeCommand } from "../upgrade-MP9XzrI6.js";
|
|
14
18
|
import { Command } from "commander";
|
|
15
19
|
import { fileURLToPath } from "url";
|
|
16
20
|
import { dirname, join, resolve } from "path";
|
|
17
|
-
import { access, mkdir, readFile, readdir, writeFile } from "fs/promises";
|
|
21
|
+
import { access, mkdir, readFile, readdir, unlink, writeFile } from "fs/promises";
|
|
18
22
|
import { EventEmitter } from "node:events";
|
|
19
23
|
import yaml from "js-yaml";
|
|
20
24
|
import * as actualFS from "node:fs";
|
|
@@ -7487,7 +7491,7 @@ async function runStatusAction(options) {
|
|
|
7487
7491
|
logger$15.debug({ err }, "Work graph query failed, continuing without work graph data");
|
|
7488
7492
|
}
|
|
7489
7493
|
if (run === void 0) {
|
|
7490
|
-
const { inspectProcessTree: inspectProcessTree$1 } = await import("../health-
|
|
7494
|
+
const { inspectProcessTree: inspectProcessTree$1 } = await import("../health-rGXaJvYJ.js");
|
|
7491
7495
|
const substrateDirPath = join(projectRoot, ".substrate");
|
|
7492
7496
|
const processInfo = inspectProcessTree$1({
|
|
7493
7497
|
projectRoot,
|
|
@@ -8452,7 +8456,7 @@ function defaultSupervisorDeps() {
|
|
|
8452
8456
|
if (cached === null) {
|
|
8453
8457
|
const { AdapterRegistry: AR } = await import(
|
|
8454
8458
|
/* @vite-ignore */
|
|
8455
|
-
"../adapter-registry-
|
|
8459
|
+
"../adapter-registry-BbVWH3Yv.js"
|
|
8456
8460
|
);
|
|
8457
8461
|
cached = new AR();
|
|
8458
8462
|
await cached.discoverAndRegister();
|
|
@@ -9019,11 +9023,11 @@ async function runSupervisorAction(options, deps = {}) {
|
|
|
9019
9023
|
try {
|
|
9020
9024
|
const { createExperimenter } = await import(
|
|
9021
9025
|
/* @vite-ignore */
|
|
9022
|
-
"../experimenter-
|
|
9026
|
+
"../experimenter-DT9v2Pto.js"
|
|
9023
9027
|
);
|
|
9024
9028
|
const { getLatestRun: getLatest } = await import(
|
|
9025
9029
|
/* @vite-ignore */
|
|
9026
|
-
"../decisions-
|
|
9030
|
+
"../decisions-DilHo99V.js"
|
|
9027
9031
|
);
|
|
9028
9032
|
const expAdapter = createDatabaseAdapter({
|
|
9029
9033
|
backend: "auto",
|
|
@@ -9033,7 +9037,7 @@ async function runSupervisorAction(options, deps = {}) {
|
|
|
9033
9037
|
await initSchema(expAdapter);
|
|
9034
9038
|
const { runRunAction: runPipeline } = await import(
|
|
9035
9039
|
/* @vite-ignore */
|
|
9036
|
-
"../run-
|
|
9040
|
+
"../run-DB9P6m_P.js"
|
|
9037
9041
|
);
|
|
9038
9042
|
const runStoryFn = async (opts) => {
|
|
9039
9043
|
const exitCode = await runPipeline({
|
|
@@ -9565,7 +9569,7 @@ async function runMetricsAction(options) {
|
|
|
9565
9569
|
const routingConfigPath = join(dbDir, "routing.yml");
|
|
9566
9570
|
let routingConfig = null;
|
|
9567
9571
|
if (existsSync$1(routingConfigPath)) try {
|
|
9568
|
-
const { loadModelRoutingConfig } = await import("../routing-
|
|
9572
|
+
const { loadModelRoutingConfig } = await import("../routing-CzF0p6lI.js");
|
|
9569
9573
|
routingConfig = loadModelRoutingConfig(routingConfigPath);
|
|
9570
9574
|
} catch {}
|
|
9571
9575
|
if (routingConfig === null) routingConfig = {
|
|
@@ -13640,6 +13644,50 @@ function enrichEscalation(storyKey, state, runId, manifest) {
|
|
|
13640
13644
|
blast_radius
|
|
13641
13645
|
};
|
|
13642
13646
|
}
|
|
13647
|
+
/**
|
|
13648
|
+
* Read all halt notification files for a given run from
|
|
13649
|
+
* .substrate/notifications/<runId>-*.json and delete them after reading (AC6).
|
|
13650
|
+
*
|
|
13651
|
+
* Returns an empty array if the notifications directory is absent or
|
|
13652
|
+
* no notifications exist for the given run ID.
|
|
13653
|
+
*
|
|
13654
|
+
* ENOENT is swallowed for each file (external monitors may delete files
|
|
13655
|
+
* between listing and reading — AC7 tolerance).
|
|
13656
|
+
*/
|
|
13657
|
+
async function readNotificationsForRun(runId, dbRoot) {
|
|
13658
|
+
const notifDir = join(dbRoot, ".substrate", "notifications");
|
|
13659
|
+
let entries;
|
|
13660
|
+
try {
|
|
13661
|
+
entries = await readdir(notifDir);
|
|
13662
|
+
} catch {
|
|
13663
|
+
return [];
|
|
13664
|
+
}
|
|
13665
|
+
const matching = entries.filter((f) => f.startsWith(`${runId}-`) && f.endsWith(".json"));
|
|
13666
|
+
const notifications = [];
|
|
13667
|
+
for (const filename of matching) {
|
|
13668
|
+
const filePath = join(notifDir, filename);
|
|
13669
|
+
try {
|
|
13670
|
+
const raw = await readFile(filePath, "utf-8");
|
|
13671
|
+
const parsed = JSON.parse(raw);
|
|
13672
|
+
notifications.push(parsed);
|
|
13673
|
+
} catch (err) {
|
|
13674
|
+
if (err.code !== "ENOENT") logger$1.warn({
|
|
13675
|
+
err,
|
|
13676
|
+
filePath
|
|
13677
|
+
}, "failed to read notification file — skipping");
|
|
13678
|
+
continue;
|
|
13679
|
+
}
|
|
13680
|
+
try {
|
|
13681
|
+
await unlink(filePath);
|
|
13682
|
+
} catch (err) {
|
|
13683
|
+
if (err.code !== "ENOENT") logger$1.warn({
|
|
13684
|
+
err,
|
|
13685
|
+
filePath
|
|
13686
|
+
}, "failed to delete notification file — continuing");
|
|
13687
|
+
}
|
|
13688
|
+
}
|
|
13689
|
+
return notifications;
|
|
13690
|
+
}
|
|
13643
13691
|
/** Pad a string to a fixed width, truncating with '…' if necessary. */
|
|
13644
13692
|
function padCell(value, width) {
|
|
13645
13693
|
if (value.length > width) return value.slice(0, width - 1) + "…";
|
|
@@ -13664,7 +13712,7 @@ function wallClockMs(state) {
|
|
|
13664
13712
|
}
|
|
13665
13713
|
function renderHuman(output, manifest) {
|
|
13666
13714
|
const lines = [];
|
|
13667
|
-
const { runId, summary, stories, escalations, cost, duration } = output;
|
|
13715
|
+
const { runId, summary, stories, escalations, cost, duration, halts } = output;
|
|
13668
13716
|
const durationStr = duration.wall_clock_ms != null ? formatDurationMs(duration.wall_clock_ms) : "unknown";
|
|
13669
13717
|
const costStr = `$${cost.spent.toFixed(4)}`;
|
|
13670
13718
|
const ceilingStr = cost.ceiling != null ? ` / $${cost.ceiling.toFixed(4)} ceiling (${cost.utilization ?? "?"}) ${cost.overCeiling ? "[OVER CEILING]" : ""}` : "";
|
|
@@ -13728,6 +13776,55 @@ function renderHuman(output, manifest) {
|
|
|
13728
13776
|
}
|
|
13729
13777
|
lines.push("");
|
|
13730
13778
|
}
|
|
13779
|
+
if (halts && halts.length > 0) {
|
|
13780
|
+
lines.push("──── Operator Halts ────");
|
|
13781
|
+
for (const halt of halts) {
|
|
13782
|
+
lines.push("");
|
|
13783
|
+
lines.push(` Timestamp: ${halt.timestamp}`);
|
|
13784
|
+
lines.push(` Decision type: ${halt.decisionType}`);
|
|
13785
|
+
lines.push(` Severity: ${halt.severity}`);
|
|
13786
|
+
lines.push(` Operator choice: ${halt.operatorChoice ?? "(none — non-interactive)"}`);
|
|
13787
|
+
}
|
|
13788
|
+
lines.push("");
|
|
13789
|
+
}
|
|
13790
|
+
if (output.ac_traceability && Object.keys(output.ac_traceability).length > 0) {
|
|
13791
|
+
lines.push("──── AC Traceability (approximate) ────");
|
|
13792
|
+
for (const [storyKey, traceability] of Object.entries(output.ac_traceability)) {
|
|
13793
|
+
lines.push("");
|
|
13794
|
+
lines.push(` Story: ${storyKey}`);
|
|
13795
|
+
if (traceability.matrix.length === 0) {
|
|
13796
|
+
lines.push(" (no acceptance criteria found)");
|
|
13797
|
+
continue;
|
|
13798
|
+
}
|
|
13799
|
+
const AC_COL = 60;
|
|
13800
|
+
const MATCH_COL = 9;
|
|
13801
|
+
const TEST_COL = 50;
|
|
13802
|
+
lines.push(" " + formatRow([
|
|
13803
|
+
"AC",
|
|
13804
|
+
"Matched",
|
|
13805
|
+
"Test Name"
|
|
13806
|
+
], [
|
|
13807
|
+
AC_COL,
|
|
13808
|
+
MATCH_COL,
|
|
13809
|
+
TEST_COL
|
|
13810
|
+
]));
|
|
13811
|
+
lines.push(" " + [
|
|
13812
|
+
AC_COL,
|
|
13813
|
+
MATCH_COL,
|
|
13814
|
+
TEST_COL
|
|
13815
|
+
].map((w) => "-".repeat(w)).join("-+-"));
|
|
13816
|
+
for (const row of traceability.matrix) lines.push(" " + formatRow([
|
|
13817
|
+
row.acText,
|
|
13818
|
+
row.matched ? "✓" : "✗",
|
|
13819
|
+
row.testName ?? "—"
|
|
13820
|
+
], [
|
|
13821
|
+
AC_COL,
|
|
13822
|
+
MATCH_COL,
|
|
13823
|
+
TEST_COL
|
|
13824
|
+
]));
|
|
13825
|
+
}
|
|
13826
|
+
lines.push("");
|
|
13827
|
+
}
|
|
13731
13828
|
return lines.join("\n");
|
|
13732
13829
|
}
|
|
13733
13830
|
function renderJson(output) {
|
|
@@ -13735,8 +13832,12 @@ function renderJson(output) {
|
|
|
13735
13832
|
}
|
|
13736
13833
|
/**
|
|
13737
13834
|
* Build ReportOutput from a raw manifest.
|
|
13835
|
+
*
|
|
13836
|
+
* @param runId - Pipeline run ID.
|
|
13837
|
+
* @param manifest - Raw manifest data.
|
|
13838
|
+
* @param halts - Optional operator halt notifications (Story 73-2, AC12).
|
|
13738
13839
|
*/
|
|
13739
|
-
function assembleReport(runId, manifest) {
|
|
13840
|
+
function assembleReport(runId, manifest, halts) {
|
|
13740
13841
|
const perStoryState = manifest.per_story_state ?? {};
|
|
13741
13842
|
const storyKeys = Object.keys(perStoryState);
|
|
13742
13843
|
const startedAt = manifest.created_at ?? "";
|
|
@@ -13797,7 +13898,8 @@ function assembleReport(runId, manifest) {
|
|
|
13797
13898
|
stories,
|
|
13798
13899
|
escalations,
|
|
13799
13900
|
cost,
|
|
13800
|
-
duration
|
|
13901
|
+
duration,
|
|
13902
|
+
halts
|
|
13801
13903
|
};
|
|
13802
13904
|
}
|
|
13803
13905
|
/**
|
|
@@ -13862,7 +13964,7 @@ async function resolveLatestRunId(dbRoot) {
|
|
|
13862
13964
|
}
|
|
13863
13965
|
}
|
|
13864
13966
|
async function runReportAction(options) {
|
|
13865
|
-
const { run: runArg, outputFormat, projectRoot, _dbRoot } = options;
|
|
13967
|
+
const { run: runArg, outputFormat, projectRoot, _dbRoot, verifyAc } = options;
|
|
13866
13968
|
const effectiveProjectRoot = process.env["SUBSTRATE_PROJECT_ROOT"] ?? projectRoot;
|
|
13867
13969
|
const dbRoot = _dbRoot ?? await resolveMainRepoRoot(effectiveProjectRoot);
|
|
13868
13970
|
const runsDir = join(dbRoot, ".substrate", "runs");
|
|
@@ -13936,7 +14038,50 @@ async function runReportAction(options) {
|
|
|
13936
14038
|
} catch (err) {
|
|
13937
14039
|
logger$1.debug({ err }, "Dolt enrichment unavailable — using manifest-only data (degraded mode)");
|
|
13938
14040
|
}
|
|
13939
|
-
const
|
|
14041
|
+
const halts = await readNotificationsForRun(resolvedRunId, dbRoot).catch((err) => {
|
|
14042
|
+
logger$1.debug({ err }, "notification read failed — continuing without halt data");
|
|
14043
|
+
return [];
|
|
14044
|
+
});
|
|
14045
|
+
const output = assembleReport(resolvedRunId, manifest, halts);
|
|
14046
|
+
if (verifyAc === true) {
|
|
14047
|
+
const artifactsDir = join(dbRoot, "_bmad-output", "implementation-artifacts");
|
|
14048
|
+
const acTraceability = {};
|
|
14049
|
+
let acPerStoryState = manifest.per_story_state;
|
|
14050
|
+
try {
|
|
14051
|
+
const rmForAc = RunManifest.open(resolvedRunId, runsDir);
|
|
14052
|
+
const rmData = await rmForAc.read();
|
|
14053
|
+
acPerStoryState = rmData.per_story_state;
|
|
14054
|
+
} catch {
|
|
14055
|
+
logger$1.debug({ runId: resolvedRunId }, "RunManifest.read() for --verify-ac failed — using raw manifest fallback");
|
|
14056
|
+
}
|
|
14057
|
+
const storyEntries = Object.entries(acPerStoryState);
|
|
14058
|
+
for (const [storyKey, state] of storyEntries) {
|
|
14059
|
+
const filesModified = state.dev_story_signals?.files_modified ?? [];
|
|
14060
|
+
let storyContent = "";
|
|
14061
|
+
try {
|
|
14062
|
+
const artifactFiles = await readdir(artifactsDir).catch(() => []);
|
|
14063
|
+
const matchingFile = artifactFiles.find((f) => (f.startsWith(`${storyKey}-`) || f === `${storyKey}.md`) && f.endsWith(".md"));
|
|
14064
|
+
if (matchingFile) storyContent = await readFile(join(artifactsDir, matchingFile), "utf-8");
|
|
14065
|
+
} catch {}
|
|
14066
|
+
try {
|
|
14067
|
+
const result = await runAcTraceabilityCheck({
|
|
14068
|
+
storyKey,
|
|
14069
|
+
storyContent,
|
|
14070
|
+
filesModified
|
|
14071
|
+
});
|
|
14072
|
+
acTraceability[storyKey] = {
|
|
14073
|
+
matrix: result.matrix,
|
|
14074
|
+
confidence: result.confidence
|
|
14075
|
+
};
|
|
14076
|
+
} catch (err) {
|
|
14077
|
+
logger$1.debug({
|
|
14078
|
+
err,
|
|
14079
|
+
storyKey
|
|
14080
|
+
}, "ac traceability check failed for story (skipping)");
|
|
14081
|
+
}
|
|
14082
|
+
}
|
|
14083
|
+
output.ac_traceability = acTraceability;
|
|
14084
|
+
}
|
|
13940
14085
|
if (outputFormat === "json") process.stdout.write(renderJson(output) + "\n");
|
|
13941
14086
|
else process.stdout.write(renderHuman(output, manifest));
|
|
13942
14087
|
return 0;
|
|
@@ -13949,12 +14094,14 @@ async function runReportAction(options) {
|
|
|
13949
14094
|
* uniformity even though this command does not use it.
|
|
13950
14095
|
*/
|
|
13951
14096
|
function registerReportCommand(program, _version = "0.0.0", projectRoot = process.cwd(), _registry) {
|
|
13952
|
-
program.command("report").description("Read run manifest and produce a structured completion report").option("--run <id|latest>", "Run ID to report on, or \"latest\" (default: current-run-id file, then Dolt getLatestRun fallback)").option("--output-format <format>", "Output format: human (default) or json", "human").action(async (opts) => {
|
|
14097
|
+
program.command("report").description("Read run manifest and produce a structured completion report").option("--run <id|latest>", "Run ID to report on, or \"latest\" (default: current-run-id file, then Dolt getLatestRun fallback)").option("--output-format <format>", "Output format: human (default) or json", "human").option("--basePath <path>", "Base path override for .substrate directory (used by probes and tests)").option("--verify-ac", "Run AC-to-test traceability heuristic for each story and append results to report (Story 74-1)").action(async (opts) => {
|
|
13953
14098
|
const outputFormat = opts.outputFormat === "json" ? "json" : "human";
|
|
13954
14099
|
const exitCode = await runReportAction({
|
|
13955
14100
|
run: opts.run,
|
|
13956
14101
|
outputFormat,
|
|
13957
|
-
projectRoot
|
|
14102
|
+
projectRoot,
|
|
14103
|
+
_dbRoot: opts.basePath,
|
|
14104
|
+
verifyAc: opts.verifyAc
|
|
13958
14105
|
});
|
|
13959
14106
|
process.exitCode = exitCode;
|
|
13960
14107
|
});
|
|
@@ -14036,8 +14183,8 @@ async function createProgram() {
|
|
|
14036
14183
|
/** Fire-and-forget startup version check (story 8.3, AC3/AC5) */
|
|
14037
14184
|
function checkForUpdatesInBackground(currentVersion) {
|
|
14038
14185
|
if (process.env.SUBSTRATE_NO_UPDATE_CHECK === "1") return;
|
|
14039
|
-
import("../upgrade-
|
|
14040
|
-
const { createVersionManager } = await import("../version-manager-impl-
|
|
14186
|
+
import("../upgrade-DxzQ1nss.js").then(async () => {
|
|
14187
|
+
const { createVersionManager } = await import("../version-manager-impl-GZDUBt0Q.js");
|
|
14041
14188
|
const vm = createVersionManager();
|
|
14042
14189
|
const result = await vm.checkForUpdates();
|
|
14043
14190
|
if (result.updateAvailable) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { addTokenUsage, createDecision, createPipelineRun, createRequirement, getArtifactByTypeForRun, getArtifactsByRun, getDecisionsByCategory, getDecisionsByPhase, getDecisionsByPhaseForRun, getLatestRun, getPipelineRunById, getRunningPipelineRuns, getTokenUsageSummary, listRequirements, registerArtifact, updateDecision, updatePipelineRun, updatePipelineRunConfig, upsertDecision } from "./dist-
|
|
2
|
-
import "./decisions-
|
|
1
|
+
import { addTokenUsage, createDecision, createPipelineRun, createRequirement, getArtifactByTypeForRun, getArtifactsByRun, getDecisionsByCategory, getDecisionsByPhase, getDecisionsByPhaseForRun, getLatestRun, getPipelineRunById, getRunningPipelineRuns, getTokenUsageSummary, listRequirements, registerArtifact, updateDecision, updatePipelineRun, updatePipelineRunConfig, upsertDecision } from "./dist-K_RRWnBX.js";
|
|
2
|
+
import "./decisions-CzSIEeGP.js";
|
|
3
3
|
|
|
4
4
|
export { getLatestRun };
|
|
@@ -11041,5 +11041,5 @@ async function callLLM(params) {
|
|
|
11041
11041
|
}
|
|
11042
11042
|
|
|
11043
11043
|
//#endregion
|
|
11044
|
-
export { ADVISORY_NOTES, AdapterRegistry, AdtError, BudgetConfigSchema, CURRENT_CONFIG_FORMAT_VERSION, CURRENT_TASK_GRAPH_VERSION, Categorizer, ClaudeCodeAdapter, CodexCLIAdapter, ConfigError, ConfigIncompatibleFormatError, ConsumerAnalyzer, CostTrackerConfigSchema, DEFAULT_CONFIG, DEFAULT_GLOBAL_SETTINGS, DispatcherImpl, DoltClient, DoltNotInstalled, DoltQueryError, ESCALATION_DIAGNOSIS, EXPERIMENT_RESULT, EfficiencyScorer, GeminiCLIAdapter, GlobalSettingsSchema, InMemoryDatabaseAdapter, IngestionServer, LEARNING_FINDING, LogTurnAnalyzer, ModelRoutingConfigSchema, MonitorDatabaseImpl, OPERATIONAL_FINDING, PartialGlobalSettingsSchema, PartialProviderConfigSchema, ProviderPolicySchema, ProvidersSchema, Recommender, RoutingConfigError, RoutingRecommender, RoutingResolver, RoutingTelemetry, RoutingTokenAccumulator, RoutingTuner, STORY_METRICS, STORY_OUTCOME, SubstrateConfigSchema, TASK_TYPE_PHASE_MAP, TEST_EXPANSION_FINDING, TEST_PLAN, TelemetryConfigSchema, TelemetryNormalizer, TelemetryPipeline, TurnAnalyzer, VersionManagerImpl, addTokenUsage, aggregateTokenUsageForRun, aggregateTokenUsageForStory, buildAuditLogEntry, buildBranchName, buildModificationDirective, buildPRBody, buildWorktreePath, callLLM, checkDoltInstalled, compareRunMetrics, createAmendmentRun, createConfigSystem, createDatabaseAdapter as createDatabaseAdapter$1, createDecision, createDoltClient, createExperimenter, createPipelineRun, createRequirement, createVersionManager, detectInterfaceChanges, determineVerdict, getActiveDecisions, getAllCostEntriesFiltered, getArtifactByTypeForRun, getArtifactsByRun, getBaselineRunMetrics, getDecisionsByCategory, getDecisionsByPhase, getDecisionsByPhaseForRun, getLatestCompletedRun, getLatestRun, getModelTier, getPipelineRunById, getPlanningCostTotal, getRetryableEscalations, getRunMetrics, getRunningPipelineRuns, getSessionCostSummary, getSessionCostSummaryFiltered, getStoryMetricsForRun, getTokenUsageSummary, incrementRunRestarts, initSchema, initializeDolt, listRequirements, listRunMetrics, loadModelRoutingConfig, loadParentRunDecisions, registerArtifact, resolvePromptFile, supersedeDecision, tagRunAsBaseline, updateDecision, updatePipelineRun, updatePipelineRunConfig, upsertDecision, writeRunMetrics, writeStoryMetrics };
|
|
11045
|
-
//# sourceMappingURL=dist-
|
|
11044
|
+
export { ADVISORY_NOTES, AdapterRegistry as AdapterRegistry$1, AdtError as AdtError$1, BudgetConfigSchema, CURRENT_CONFIG_FORMAT_VERSION, CURRENT_TASK_GRAPH_VERSION, Categorizer, ClaudeCodeAdapter as ClaudeCodeAdapter$1, CodexCLIAdapter as CodexCLIAdapter$1, ConfigError as ConfigError$1, ConfigIncompatibleFormatError as ConfigIncompatibleFormatError$1, ConsumerAnalyzer, CostTrackerConfigSchema, DEFAULT_CONFIG, DEFAULT_GLOBAL_SETTINGS, DispatcherImpl, DoltClient, DoltNotInstalled, DoltQueryError, ESCALATION_DIAGNOSIS, EXPERIMENT_RESULT, EfficiencyScorer, GeminiCLIAdapter as GeminiCLIAdapter$1, GlobalSettingsSchema, InMemoryDatabaseAdapter, IngestionServer, LEARNING_FINDING, LogTurnAnalyzer, ModelRoutingConfigSchema, MonitorDatabaseImpl, OPERATIONAL_FINDING, PartialGlobalSettingsSchema, PartialProviderConfigSchema, ProviderPolicySchema, ProvidersSchema, Recommender, RoutingConfigError, RoutingRecommender, RoutingResolver, RoutingTelemetry, RoutingTokenAccumulator, RoutingTuner, STORY_METRICS, STORY_OUTCOME, SubstrateConfigSchema, TASK_TYPE_PHASE_MAP, TEST_EXPANSION_FINDING, TEST_PLAN, TelemetryConfigSchema, TelemetryNormalizer, TelemetryPipeline, TurnAnalyzer, VersionManagerImpl, addTokenUsage, aggregateTokenUsageForRun, aggregateTokenUsageForStory, buildAuditLogEntry, buildBranchName, buildModificationDirective, buildPRBody, buildWorktreePath, callLLM, checkDoltInstalled, compareRunMetrics, createAmendmentRun, createConfigSystem, createDatabaseAdapter as createDatabaseAdapter$1, createDecision, createDoltClient, createExperimenter, createPipelineRun, createRequirement, createVersionManager, detectInterfaceChanges, determineVerdict, getActiveDecisions, getAllCostEntriesFiltered, getArtifactByTypeForRun, getArtifactsByRun, getBaselineRunMetrics, getDecisionsByCategory, getDecisionsByPhase, getDecisionsByPhaseForRun, getLatestCompletedRun, getLatestRun, getModelTier, getPipelineRunById, getPlanningCostTotal, getRetryableEscalations, getRunMetrics, getRunningPipelineRuns, getSessionCostSummary, getSessionCostSummaryFiltered, getStoryMetricsForRun, getTokenUsageSummary, incrementRunRestarts, initSchema, initializeDolt, listRequirements, listRunMetrics, loadModelRoutingConfig, loadParentRunDecisions, registerArtifact, resolvePromptFile, supersedeDecision, tagRunAsBaseline, updateDecision, updatePipelineRun, updatePipelineRunConfig, upsertDecision, writeRunMetrics, writeStoryMetrics };
|
|
11045
|
+
//# sourceMappingURL=dist-K_RRWnBX.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AdtError } from "./dist-
|
|
1
|
+
import { AdtError$1 as AdtError } from "./dist-K_RRWnBX.js";
|
|
2
2
|
|
|
3
3
|
//#region src/core/errors.ts
|
|
4
4
|
/** Error thrown when task configuration is invalid */
|
|
@@ -71,4 +71,4 @@ var TaskGraphIncompatibleFormatError = class extends AdtError {
|
|
|
71
71
|
|
|
72
72
|
//#endregion
|
|
73
73
|
export { BudgetExceededError, GitError, RecoveryError, TaskConfigError, TaskGraphCycleError, TaskGraphError, TaskGraphIncompatibleFormatError, WorkerError, WorkerNotFoundError };
|
|
74
|
-
//# sourceMappingURL=errors-
|
|
74
|
+
//# sourceMappingURL=errors-pSiZbn6e.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { buildAuditLogEntry, buildBranchName, buildModificationDirective, buildPRBody, buildWorktreePath, createExperimenter, determineVerdict, resolvePromptFile } from "./dist-
|
|
1
|
+
import { buildAuditLogEntry, buildBranchName, buildModificationDirective, buildPRBody, buildWorktreePath, createExperimenter, determineVerdict, resolvePromptFile } from "./dist-K_RRWnBX.js";
|
|
2
2
|
|
|
3
3
|
export { createExperimenter };
|