substrate-ai 0.20.16 → 0.20.17
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/cli/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { createLogger } from "../logger-KeHncl-f.js";
|
|
|
4
4
|
import { createEventBus } from "../helpers-CElYrONe.js";
|
|
5
5
|
import { AdapterRegistry, BudgetConfigSchema, CURRENT_CONFIG_FORMAT_VERSION, CURRENT_TASK_GRAPH_VERSION, ConfigError, CostTrackerConfigSchema, DEFAULT_CONFIG, DoltClient, DoltNotInstalled, GlobalSettingsSchema, 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-CqtWS9wF.js";
|
|
6
6
|
import "../adapter-registry-DXLMTmfD.js";
|
|
7
|
-
import { AdapterTelemetryPersistence, AppError, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, EpicIngester, GitClient, GrammarLoader, RepoMapInjector, RepoMapModule, RepoMapQueryEngine, RepoMapStorage, SymbolParser, createContextCompiler, createDispatcher, createEventEmitter, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStopAfterGate, createTelemetryAdvisor, formatPhaseCompletionSummary, getFactoryRunSummaries, getScenarioResultsForRun, getTwinRunsForRun, listGraphRuns, registerExportCommand, registerFactoryCommand, registerRunCommand, registerScenariosCommand, resolveStoryKeys, runAnalysisPhase, runPlanningPhase, runSolutioningPhase, validateStopAfterFromConflict } from "../run-
|
|
7
|
+
import { AdapterTelemetryPersistence, AppError, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, EpicIngester, GitClient, GrammarLoader, RepoMapInjector, RepoMapModule, RepoMapQueryEngine, RepoMapStorage, SymbolParser, createContextCompiler, createDispatcher, createEventEmitter, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStopAfterGate, createTelemetryAdvisor, formatPhaseCompletionSummary, getFactoryRunSummaries, getScenarioResultsForRun, getTwinRunsForRun, listGraphRuns, registerExportCommand, registerFactoryCommand, registerRunCommand, registerScenariosCommand, resolveStoryKeys, runAnalysisPhase, runPlanningPhase, runSolutioningPhase, validateStopAfterFromConflict } from "../run-xQLHet2Y.js";
|
|
8
8
|
import "../errors-1uLGqnvr.js";
|
|
9
9
|
import "../routing-CcBOCuC9.js";
|
|
10
10
|
import "../decisions-C0pz9Clx.js";
|
|
@@ -5198,7 +5198,7 @@ async function runSupervisorAction(options, deps = {}) {
|
|
|
5198
5198
|
await initSchema(expAdapter);
|
|
5199
5199
|
const { runRunAction: runPipeline } = await import(
|
|
5200
5200
|
/* @vite-ignore */
|
|
5201
|
-
"../run-
|
|
5201
|
+
"../run-CZW8qqr5.js"
|
|
5202
5202
|
);
|
|
5203
5203
|
const runStoryFn = async (opts) => {
|
|
5204
5204
|
const exitCode = await runPipeline({
|
|
@@ -2,7 +2,7 @@ import "./health-ZGa9E0D2.js";
|
|
|
2
2
|
import "./logger-KeHncl-f.js";
|
|
3
3
|
import "./helpers-CElYrONe.js";
|
|
4
4
|
import "./dist-CqtWS9wF.js";
|
|
5
|
-
import { normalizeGraphSummaryToStatus, registerRunCommand, resolveMaxReviewCycles, runRunAction, wireNdjsonEmitter } from "./run-
|
|
5
|
+
import { normalizeGraphSummaryToStatus, registerRunCommand, resolveMaxReviewCycles, runRunAction, wireNdjsonEmitter } from "./run-xQLHet2Y.js";
|
|
6
6
|
import "./routing-CcBOCuC9.js";
|
|
7
7
|
import "./decisions-C0pz9Clx.js";
|
|
8
8
|
|
|
@@ -7,7 +7,7 @@ import { access, readFile, readdir, stat } from "fs/promises";
|
|
|
7
7
|
import { EventEmitter } from "node:events";
|
|
8
8
|
import yaml from "js-yaml";
|
|
9
9
|
import * as actualFS from "node:fs";
|
|
10
|
-
import { accessSync, existsSync, mkdirSync, readFileSync, readdirSync, realpathSync, rmSync, statSync, unlinkSync, unwatchFile, watchFile, writeFileSync } from "node:fs";
|
|
10
|
+
import { accessSync, existsSync, mkdirSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, statSync, unlinkSync, unwatchFile, watchFile, writeFileSync } from "node:fs";
|
|
11
11
|
import { exec, execFile, execFileSync, execSync, spawn } from "node:child_process";
|
|
12
12
|
import path, { basename as basename$1, dirname as dirname$1, extname as extname$1, isAbsolute, join as join$1, posix, resolve as resolve$1, win32 } from "node:path";
|
|
13
13
|
import { tmpdir } from "node:os";
|
|
@@ -12034,7 +12034,8 @@ function createImplementationOrchestrator(deps) {
|
|
|
12034
12034
|
const artifactsDir = projectRoot ? join$1(projectRoot, "_bmad-output", "implementation-artifacts") : void 0;
|
|
12035
12035
|
if (artifactsDir && existsSync(artifactsDir)) try {
|
|
12036
12036
|
const files = readdirSync(artifactsDir);
|
|
12037
|
-
const
|
|
12037
|
+
const STALE_SUFFIX = /\.stale-\d+\.md$/;
|
|
12038
|
+
const match$2 = files.find((f$1) => f$1.startsWith(`${storyKey}-`) && f$1.endsWith(".md") && !STALE_SUFFIX.test(f$1));
|
|
12038
12039
|
if (match$2) {
|
|
12039
12040
|
const candidatePath = join$1(artifactsDir, match$2);
|
|
12040
12041
|
const validation = await isValidStoryFile(candidatePath);
|
|
@@ -12089,6 +12090,20 @@ function createImplementationOrchestrator(deps) {
|
|
|
12089
12090
|
}
|
|
12090
12091
|
});
|
|
12091
12092
|
await persistState();
|
|
12093
|
+
} else try {
|
|
12094
|
+
const ts = Date.now();
|
|
12095
|
+
const staleName = match$2.replace(/\.md$/, `.stale-${ts}.md`);
|
|
12096
|
+
const stalePath = join$1(artifactsDir, staleName);
|
|
12097
|
+
renameSync(candidatePath, stalePath);
|
|
12098
|
+
logger$24.info({
|
|
12099
|
+
storyKey,
|
|
12100
|
+
staleName
|
|
12101
|
+
}, `[orchestrator] story ${storyKey}: renamed drifted artifact to ${staleName} before re-dispatch`);
|
|
12102
|
+
} catch (renameErr) {
|
|
12103
|
+
logger$24.warn({
|
|
12104
|
+
storyKey,
|
|
12105
|
+
err: renameErr
|
|
12106
|
+
}, "Failed to rename stale artifact before create-story re-dispatch; relying on 58-9d fraud-guard");
|
|
12092
12107
|
}
|
|
12093
12108
|
}
|
|
12094
12109
|
}
|
|
@@ -14432,8 +14447,7 @@ function createImplementationOrchestrator(deps) {
|
|
|
14432
14447
|
let escalated = 0;
|
|
14433
14448
|
let failed = 0;
|
|
14434
14449
|
for (const s$1 of _stories.values()) if (s$1.phase === "COMPLETE") completed++;
|
|
14435
|
-
else if (s$1.phase === "ESCALATED")
|
|
14436
|
-
else escalated++;
|
|
14450
|
+
else if (s$1.phase === "ESCALATED") escalated++;
|
|
14437
14451
|
else if (s$1.phase === "VERIFICATION_FAILED") failed++;
|
|
14438
14452
|
eventBus.emit("orchestrator:complete", {
|
|
14439
14453
|
totalStories: storyKeys.length,
|
|
@@ -43435,8 +43449,7 @@ async function runRunAction(options) {
|
|
|
43435
43449
|
const failedKeys = [];
|
|
43436
43450
|
const escalatedKeys = [];
|
|
43437
43451
|
for (const [key, s$1] of Object.entries(status.stories)) if (s$1.phase === "COMPLETE") succeededKeys.push(key);
|
|
43438
|
-
else if (s$1.phase === "ESCALATED")
|
|
43439
|
-
else escalatedKeys.push(key);
|
|
43452
|
+
else if (s$1.phase === "ESCALATED") escalatedKeys.push(key);
|
|
43440
43453
|
else failedKeys.push(key);
|
|
43441
43454
|
try {
|
|
43442
43455
|
const runEndMs = Date.now();
|
|
@@ -43469,7 +43482,7 @@ async function runRunAction(options) {
|
|
|
43469
43482
|
}
|
|
43470
43483
|
try {
|
|
43471
43484
|
const runsDir = join(dbDir, "runs");
|
|
43472
|
-
const terminalStatus = failedKeys.length > 0 ? "failed" : "completed";
|
|
43485
|
+
const terminalStatus = failedKeys.length > 0 || escalatedKeys.length > 0 ? "failed" : "completed";
|
|
43473
43486
|
await RunManifest.open(pipelineRun.id, runsDir).update({ run_status: terminalStatus });
|
|
43474
43487
|
} catch {}
|
|
43475
43488
|
if (progressRenderer !== void 0) progressRenderer.render({
|
|
@@ -43880,8 +43893,7 @@ async function runFullPipeline(options) {
|
|
|
43880
43893
|
const implStatus = await orchestrator.run(storyKeys);
|
|
43881
43894
|
if (outputFormat === "human") process.stdout.write("[IMPLEMENTATION] Complete\n");
|
|
43882
43895
|
for (const [key, s$1] of Object.entries(implStatus.stories)) if (s$1.phase === "COMPLETE") fpSucceededKeys.push(key);
|
|
43883
|
-
else if (s$1.phase === "ESCALATED")
|
|
43884
|
-
else fpEscalatedKeys.push(key);
|
|
43896
|
+
else if (s$1.phase === "ESCALATED") fpEscalatedKeys.push(key);
|
|
43885
43897
|
else fpFailedKeys.push(key);
|
|
43886
43898
|
}
|
|
43887
43899
|
if (fullPipelineNdjsonEmitter !== void 0) fullPipelineNdjsonEmitter.emit({
|
|
@@ -44040,4 +44052,4 @@ function registerRunCommand(program, _version = "0.0.0", projectRoot = process.c
|
|
|
44040
44052
|
|
|
44041
44053
|
//#endregion
|
|
44042
44054
|
export { AdapterTelemetryPersistence, AppError, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, EpicIngester, GitClient, GrammarLoader, RepoMapInjector, RepoMapModule, RepoMapQueryEngine, RepoMapStorage, SymbolParser, createContextCompiler, createDispatcher, createEventEmitter, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStopAfterGate, createTelemetryAdvisor, formatPhaseCompletionSummary, getFactoryRunSummaries, getScenarioResultsForRun, getTwinRunsForRun, listGraphRuns, normalizeGraphSummaryToStatus, registerExportCommand, registerFactoryCommand, registerRunCommand, registerScenariosCommand, resolveMaxReviewCycles, resolveStoryKeys, runAnalysisPhase, runPlanningPhase, runRunAction, runSolutioningPhase, validateStopAfterFromConflict, wireNdjsonEmitter };
|
|
44043
|
-
//# sourceMappingURL=run-
|
|
44055
|
+
//# sourceMappingURL=run-xQLHet2Y.js.map
|