substrate-ai 0.20.118 → 0.20.119
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
|
@@ -3,7 +3,7 @@ import { FileKvStore, SUBSTRATE_OWNED_SETTINGS_KEYS, VALID_PHASES, buildPipeline
|
|
|
3
3
|
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, InMemoryDatabaseAdapter, IngestionServer, MonitorDatabaseImpl, OPERATIONAL_FINDING, PartialGlobalSettingsSchema, PartialProviderConfigSchema, ProvidersSchema, RoutingRecommender, STORY_METRICS, TelemetryConfigSchema, addTokenUsage, aggregateTokenUsageForRun, checkDoltInstalled, compareRunMetrics, createAmendmentRun, createConfigSystem, createDecision, createPipelineRun, createStderrLogger, getActiveDecisions, getAllCostEntriesFiltered, getBaselineRunMetrics, getDecisionsByCategory, getDecisionsByPhaseForRun, getLatestCompletedRun, getLatestRun, getPipelineRunById, getPlanningCostTotal, getRetryableEscalations, getRunMetrics, getRunningPipelineRuns, getSessionCostSummary, getSessionCostSummaryFiltered, getStoryMetricsForRun, getTokenUsageSummary, incrementRunRestarts, initSchema, initWorkGraphSchema, initializeDolt, listRunMetrics, loadParentRunDecisions, supersedeDecision, swallowDebug, tagRunAsBaseline, updatePipelineRun } from "../dist-Bc0-6VcX.js";
|
|
6
|
-
import { AdapterTelemetryPersistence, AppError, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, EpicIngester, GLOBSTAR, GitClient, GrammarLoader, Minimatch, Minipass, RepoMapInjector, RepoMapModule, RepoMapQueryEngine, RepoMapStorage, SymbolParser, createContextCompiler, createDispatcher, createEventEmitter, createGitWorktreeManager, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStopAfterGate, createTelemetryAdvisor, escape, formatPhaseCompletionSummary, getFactoryRunSummaries, getScenarioResultsForRun, getTwinRunsForRun, listGraphRuns, registerExportCommand, registerFactoryCommand, registerRunCommand, registerScenariosCommand, resolveStoryKeys, runAnalysisPhase, runPlanningPhase, runProbeAuthor, runSolutioningPhase, unescape, validateStopAfterFromConflict } from "../run-
|
|
6
|
+
import { AdapterTelemetryPersistence, AppError, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, EpicIngester, GLOBSTAR, GitClient, GrammarLoader, Minimatch, Minipass, RepoMapInjector, RepoMapModule, RepoMapQueryEngine, RepoMapStorage, SymbolParser, createContextCompiler, createDispatcher, createEventEmitter, createGitWorktreeManager, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStopAfterGate, createTelemetryAdvisor, escape, formatPhaseCompletionSummary, getFactoryRunSummaries, getScenarioResultsForRun, getTwinRunsForRun, listGraphRuns, registerExportCommand, registerFactoryCommand, registerRunCommand, registerScenariosCommand, resolveStoryKeys, runAnalysisPhase, runPlanningPhase, runProbeAuthor, runSolutioningPhase, unescape, validateStopAfterFromConflict } from "../run-ClsMsm4P.js";
|
|
7
7
|
import "../adapter-registry-DIcrxjH8.js";
|
|
8
8
|
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-BE70EnPy.js";
|
|
9
9
|
import "../errors-CwQM_6Yk.js";
|
|
@@ -8419,7 +8419,7 @@ async function runSupervisorAction(options, deps = {}) {
|
|
|
8419
8419
|
await initSchema(expAdapter);
|
|
8420
8420
|
const { runRunAction: runPipeline } = await import(
|
|
8421
8421
|
/* @vite-ignore */
|
|
8422
|
-
"../run-
|
|
8422
|
+
"../run-BfBS7Zv2.js"
|
|
8423
8423
|
);
|
|
8424
8424
|
const runStoryFn = async (opts) => {
|
|
8425
8425
|
const exitCode = await runPipeline({
|
|
@@ -2,7 +2,7 @@ import "./health-DSg6dtya.js";
|
|
|
2
2
|
import "./logger-KeHncl-f.js";
|
|
3
3
|
import "./helpers-CElYrONe.js";
|
|
4
4
|
import "./dist-Bc0-6VcX.js";
|
|
5
|
-
import { normalizeGraphSummaryToStatus, registerRunCommand, resolveMaxReviewCycles, resolveProbeAuthorStateIntegrating, runRunAction, wireNdjsonEmitter } from "./run-
|
|
5
|
+
import { normalizeGraphSummaryToStatus, registerRunCommand, resolveMaxReviewCycles, resolveProbeAuthorStateIntegrating, runRunAction, wireNdjsonEmitter } from "./run-ClsMsm4P.js";
|
|
6
6
|
import "./manifest-read-BE70EnPy.js";
|
|
7
7
|
import "./routing-DFxoKHDt.js";
|
|
8
8
|
import "./work-graph-repository-DZyJv5pV.js";
|
|
@@ -2,7 +2,7 @@ import { BMAD_BASELINE_TOKENS_FULL, FileKvStore, STOP_AFTER_VALID_PHASES, STORY_
|
|
|
2
2
|
import { createLogger } from "./logger-KeHncl-f.js";
|
|
3
3
|
import { TypedEventBusImpl, createEventBus, createTuiApp, isTuiCapable, printNonTtyWarning, sleep } from "./helpers-CElYrONe.js";
|
|
4
4
|
import { ADVISORY_NOTES, Categorizer, ConsumerAnalyzer, DEFAULT_GLOBAL_SETTINGS, DispatcherImpl, DoltClient, ESCALATION_DIAGNOSIS, EXPERIMENT_RESULT, EfficiencyScorer, IngestionServer, LogTurnAnalyzer, OPERATIONAL_FINDING, Recommender, RoutingRecommender, RoutingResolver, RoutingTelemetry, RoutingTokenAccumulator, RoutingTuner, STORY_METRICS, STORY_OUTCOME, SubstrateConfigSchema, TEST_EXPANSION_FINDING, TEST_PLAN, TelemetryNormalizer, TelemetryPipeline, TurnAnalyzer, addTokenUsage, aggregateTokenUsageForRun, aggregateTokenUsageForStory, callLLM, classifyVersionGap, createConfigSystem, createDatabaseAdapter$1, createDecision, createPipelineRun, createRequirement, createStderrLogger, detectInterfaceChanges, getArtifactByTypeForRun, getArtifactsByRun, getDecisionsByCategory, getDecisionsByPhase, getDecisionsByPhaseForRun, getLatestRun, getPipelineRunById, getRunMetrics, getRunningPipelineRuns, getStoryMetricsForRun, getTokenUsageSummary, initSchema, listRequirements, loadModelRoutingConfig, registerArtifact, swallowDebug, updatePipelineRun, updatePipelineRunConfig, upsertDecision, writeRunMetrics, writeStoryMetrics } from "./dist-Bc0-6VcX.js";
|
|
5
|
-
import { FindingsInjector, RunManifest, RuntimeProbeListSchema, applyConfigToGraph, createDefaultVerificationPipeline, createGraphOrchestrator, createSdlcCodeReviewHandler, createSdlcCreateStoryHandler, createSdlcDevStoryHandler, createSdlcPhaseHandler, detectsEventDrivenAC, detectsStateIntegratingAC, extractTargetFilesFromStoryContent, renderFindings, resolveGraphPath, resolveMainRepoRoot, runAcTraceabilityCheck, runStaleVerificationRecovery } from "./manifest-read-BE70EnPy.js";
|
|
5
|
+
import { FindingsInjector, RunManifest, RuntimeProbeListSchema, applyConfigToGraph, createDefaultVerificationPipeline, createGraphOrchestrator, createSdlcCodeReviewHandler, createSdlcCreateStoryHandler, createSdlcDevStoryHandler, createSdlcPhaseHandler, detectsEventDrivenAC, detectsStateIntegratingAC, extractTargetFilesFromStoryContent, parseRuntimeProbes, renderFindings, resolveGraphPath, resolveMainRepoRoot, runAcTraceabilityCheck, runStaleVerificationRecovery } from "./manifest-read-BE70EnPy.js";
|
|
6
6
|
import { WorkGraphRepository, detectCycles } from "./work-graph-repository-DZyJv5pV.js";
|
|
7
7
|
import { deriveExitCode, routeDecision } from "./decision-router-DblHY8se.js";
|
|
8
8
|
import { runInteractivePrompt } from "./interactive-prompt-B4sDQpFI.js";
|
|
@@ -14072,6 +14072,7 @@ function createImplementationOrchestrator(deps) {
|
|
|
14072
14072
|
return;
|
|
14073
14073
|
}
|
|
14074
14074
|
let fidelityRetries = 0;
|
|
14075
|
+
let probeRetries = 0;
|
|
14075
14076
|
let priorDriftFeedback;
|
|
14076
14077
|
while (storyFilePath === void 0) {
|
|
14077
14078
|
try {
|
|
@@ -14446,6 +14447,43 @@ function createImplementationOrchestrator(deps) {
|
|
|
14446
14447
|
err: fidelityErr
|
|
14447
14448
|
}, "fidelity gate threw; proceeding without retry");
|
|
14448
14449
|
}
|
|
14450
|
+
if (storyFilePath !== void 0 && effectiveProjectRoot !== void 0) try {
|
|
14451
|
+
const probeContent = await readFile$1(storyFilePath, "utf-8");
|
|
14452
|
+
const probeParse = parseRuntimeProbes(probeContent);
|
|
14453
|
+
if (probeParse.kind === "invalid" && probeRetries < MAX_FIDELITY_RETRIES) {
|
|
14454
|
+
probeRetries++;
|
|
14455
|
+
const stalePath = storyFilePath.replace(/\.md$/, `.stale-probe-${Date.now()}.md`);
|
|
14456
|
+
renameSync(storyFilePath, stalePath);
|
|
14457
|
+
logger$27.warn({
|
|
14458
|
+
storyKey,
|
|
14459
|
+
error: probeParse.error,
|
|
14460
|
+
retries: probeRetries,
|
|
14461
|
+
stalePath
|
|
14462
|
+
}, `create-story produced an invalid ## Runtime Probes block (${probeParse.error}); renamed to ${stalePath} and retrying (${probeRetries}/${MAX_FIDELITY_RETRIES})`);
|
|
14463
|
+
eventBus.emit("orchestrator:story-warn", {
|
|
14464
|
+
storyKey,
|
|
14465
|
+
msg: `invalid runtime-probe YAML; retry ${probeRetries}/${MAX_FIDELITY_RETRIES}`
|
|
14466
|
+
});
|
|
14467
|
+
priorDriftFeedback = [
|
|
14468
|
+
`### Prior Dispatch — Invalid Runtime Probes YAML (retry ${probeRetries}/${MAX_FIDELITY_RETRIES})`,
|
|
14469
|
+
"",
|
|
14470
|
+
`The previous artifact's \`## Runtime Probes\` block was not valid YAML and has been moved to \`${stalePath}\`.`,
|
|
14471
|
+
"",
|
|
14472
|
+
`Parse error: ${probeParse.error}`,
|
|
14473
|
+
"",
|
|
14474
|
+
"When re-authoring the probes, the fenced ```yaml block MUST be valid YAML:",
|
|
14475
|
+
"- Inside a `command: |` block scalar, EVERY line (including blank-line continuations) must be indented to at least the block indentation. A multi-line shell string with an unindented (column-0) line — e.g. a `git commit -m \"subject\\n\\nCo-Authored-By: ...\"` whose trailer sits at column 0 — terminates the scalar and breaks the YAML.",
|
|
14476
|
+
"- Prefer single-line commands, or keep every continuation line indented under the block scalar."
|
|
14477
|
+
].join("\n");
|
|
14478
|
+
storyFilePath = void 0;
|
|
14479
|
+
continue;
|
|
14480
|
+
}
|
|
14481
|
+
} catch (probeGateErr) {
|
|
14482
|
+
logger$27.warn({
|
|
14483
|
+
storyKey,
|
|
14484
|
+
err: probeGateErr
|
|
14485
|
+
}, "probe-validity gate threw; proceeding without retry (verification backstop)");
|
|
14486
|
+
}
|
|
14449
14487
|
}
|
|
14450
14488
|
if (storyFilePath) try {
|
|
14451
14489
|
const storyContent = await readFile$1(storyFilePath, "utf-8");
|
|
@@ -47200,4 +47238,4 @@ function registerRunCommand(program, version = "0.0.0", projectRoot = process.cw
|
|
|
47200
47238
|
|
|
47201
47239
|
//#endregion
|
|
47202
47240
|
export { AdapterTelemetryPersistence, AppError, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, EpicIngester, GLOBSTAR$1 as GLOBSTAR, GitClient, GrammarLoader, Minimatch$1 as Minimatch, Minipass, RepoMapInjector, RepoMapModule, RepoMapQueryEngine, RepoMapStorage, SymbolParser, createContextCompiler, createDispatcher, createEventEmitter, createGitWorktreeManager, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStopAfterGate, createTelemetryAdvisor, escape$1 as escape, formatPhaseCompletionSummary, getFactoryRunSummaries, getScenarioResultsForRun, getTwinRunsForRun, listGraphRuns, normalizeGraphSummaryToStatus, registerExportCommand, registerFactoryCommand, registerRunCommand, registerScenariosCommand, resolveMaxReviewCycles, resolveProbeAuthorStateIntegrating, resolveStoryKeys, runAnalysisPhase, runPlanningPhase, runProbeAuthor, runRunAction, runSolutioningPhase, unescape$1 as unescape, validateStopAfterFromConflict, wireNdjsonEmitter };
|
|
47203
|
-
//# sourceMappingURL=run-
|
|
47241
|
+
//# sourceMappingURL=run-ClsMsm4P.js.map
|