substrate-ai 0.20.44 → 0.20.45
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
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { FileStateStore, RunManifest, SUBSTRATE_OWNED_SETTINGS_KEYS, SupervisorLock, VALID_PHASES, WorkGraphRepository, ZERO_FINDINGS_BY_AUTHOR, ZERO_FINDING_COUNTS, ZERO_PROBE_AUTHOR_METRICS, aggregateProbeAuthorMetrics, buildPipelineStatusOutput, createDatabaseAdapter, createStateStore, findPackageRoot, formatOutput, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, inspectProcessTree, parseDbTimestampAsUtc, parseRuntimeProbes, registerHealthCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion, resolveMainRepoRoot, resolveRunManifest, rollupFindingCounts, rollupFindingsByAuthor, rollupProbeAuthorMetrics } from "../health-
|
|
2
|
+
import { FileStateStore, RunManifest, SUBSTRATE_OWNED_SETTINGS_KEYS, SupervisorLock, VALID_PHASES, WorkGraphRepository, ZERO_FINDINGS_BY_AUTHOR, ZERO_FINDING_COUNTS, ZERO_PROBE_AUTHOR_METRICS, aggregateProbeAuthorMetrics, buildPipelineStatusOutput, createDatabaseAdapter, createStateStore, findPackageRoot, formatOutput, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, inspectProcessTree, parseDbTimestampAsUtc, parseRuntimeProbes, registerHealthCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion, resolveMainRepoRoot, resolveRunManifest, rollupFindingCounts, rollupFindingsByAuthor, rollupProbeAuthorMetrics } from "../health-BV-rzjf7.js";
|
|
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, 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-VcMmfo2w.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, runProbeAuthor, 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, runProbeAuthor, runSolutioningPhase, validateStopAfterFromConflict } from "../run-BWUZK6bP.js";
|
|
8
8
|
import "../errors-CogpxBUg.js";
|
|
9
9
|
import "../routing-CcBOCuC9.js";
|
|
10
10
|
import "../decisions-C0pz9Clx.js";
|
|
@@ -3667,7 +3667,7 @@ async function runStatusAction(options) {
|
|
|
3667
3667
|
logger$13.debug({ err }, "Work graph query failed, continuing without work graph data");
|
|
3668
3668
|
}
|
|
3669
3669
|
if (run === void 0) {
|
|
3670
|
-
const { inspectProcessTree: inspectProcessTree$1 } = await import("../health-
|
|
3670
|
+
const { inspectProcessTree: inspectProcessTree$1 } = await import("../health-DQrsmYTt.js");
|
|
3671
3671
|
const substrateDirPath = join(projectRoot, ".substrate");
|
|
3672
3672
|
const processInfo = inspectProcessTree$1({
|
|
3673
3673
|
projectRoot,
|
|
@@ -5204,7 +5204,7 @@ async function runSupervisorAction(options, deps = {}) {
|
|
|
5204
5204
|
await initSchema(expAdapter);
|
|
5205
5205
|
const { runRunAction: runPipeline } = await import(
|
|
5206
5206
|
/* @vite-ignore */
|
|
5207
|
-
"../run-
|
|
5207
|
+
"../run-DRhwVUur.js"
|
|
5208
5208
|
);
|
|
5209
5209
|
const runStoryFn = async (opts) => {
|
|
5210
5210
|
const exitCode = await runPipeline({
|
|
@@ -4661,11 +4661,81 @@ function detectNegationContextLines(lines) {
|
|
|
4661
4661
|
}
|
|
4662
4662
|
return result;
|
|
4663
4663
|
}
|
|
4664
|
+
/**
|
|
4665
|
+
* obs_2026-05-02_020: dependency-context phrase patterns. When any of these
|
|
4666
|
+
* patterns appears on a line (or its indented continuation), every backtick-
|
|
4667
|
+
* wrapped path on the same line is tagged `dependency: true`. The phrases
|
|
4668
|
+
* indicate the AC is naming the path as an architectural integration point
|
|
4669
|
+
* (a peer package the implementation imports from, a service the code
|
|
4670
|
+
* queries, etc.) — NOT as a positive-delivery requirement.
|
|
4671
|
+
*
|
|
4672
|
+
* Strata Run 19 / Story 2-7 (2026-05-02): the AC said
|
|
4673
|
+
*
|
|
4674
|
+
* "publishes a `MorningBriefing` mesh record via `packages/mesh-agent`'s
|
|
4675
|
+
* outbox using the existing `MeshClient` surface"
|
|
4676
|
+
*
|
|
4677
|
+
* The implementation correctly imported `MeshClient` from
|
|
4678
|
+
* `@jplanow/agent-mesh` and called the existing publish surface, but
|
|
4679
|
+
* `pathReferencedInModifiedFiles` (Story 60-3, v0.20.23) couldn't match the
|
|
4680
|
+
* AC's `packages/mesh-agent` token against the package's `@jplanow/agent-mesh`
|
|
4681
|
+
* import path (the words `mesh` and `agent` are reordered between directory
|
|
4682
|
+
* name and package name). The check fired ERROR-level under-delivery and
|
|
4683
|
+
* VERIFICATION_FAILED'd a story whose code was correct.
|
|
4684
|
+
*
|
|
4685
|
+
* Patterns are anchored to backtick-wrapped paths to keep the trigger tight.
|
|
4686
|
+
* Bare prose like "uses the existing surface" or "from yesterday's run"
|
|
4687
|
+
* doesn't fire — only references where the path appears in backticks under
|
|
4688
|
+
* an explicit dependency-context preposition / verb.
|
|
4689
|
+
*
|
|
4690
|
+
* Coverage shapes (each must precede a backtick-wrapped path on the same line):
|
|
4691
|
+
* - `via \`X\`` / `via \`X\`'s ...` — Story 2-7 exact shape
|
|
4692
|
+
* - `imports? from \`X\`` — explicit import statement
|
|
4693
|
+
* - `consumes \`X\`` — skill / queue consumption
|
|
4694
|
+
* - `built atop \`X\`` — architectural foundation
|
|
4695
|
+
* - `\`X\`-shipped` — back-reference to a peer story's package
|
|
4696
|
+
* - `using \`X\`` — when AC narrates "using <package>'s API"
|
|
4697
|
+
*/
|
|
4698
|
+
const DEPENDENCY_CONTEXT_PHRASE_PATTERNS = [
|
|
4699
|
+
/\bvia\s+`[^`]+`/i,
|
|
4700
|
+
/\bimports?\s+from\s+`[^`]+`/i,
|
|
4701
|
+
/\bconsumes\s+`[^`]+`/i,
|
|
4702
|
+
/\bbuilt\s+(?:atop|on\s+top\s+of)\s+`[^`]+`/i,
|
|
4703
|
+
/`[^`]+`-shipped/i,
|
|
4704
|
+
/\busing\s+`[^`]+`['']s/i
|
|
4705
|
+
];
|
|
4706
|
+
/**
|
|
4707
|
+
* Find all line indices that fall within a dependency context. Mirrors the
|
|
4708
|
+
* `detectNegationContextLines` shape exactly (same continuation walk: the
|
|
4709
|
+
* dependency-phrase line plus indented non-bullet continuation lines).
|
|
4710
|
+
*/
|
|
4711
|
+
function detectDependencyContextLines(lines) {
|
|
4712
|
+
const result = new Set();
|
|
4713
|
+
for (let i = 0; i < lines.length; i++) {
|
|
4714
|
+
const line = lines[i] ?? "";
|
|
4715
|
+
if (DEPENDENCY_CONTEXT_PHRASE_PATTERNS.some((pat) => pat.test(line))) {
|
|
4716
|
+
result.add(i);
|
|
4717
|
+
let j = i + 1;
|
|
4718
|
+
while (j < lines.length) {
|
|
4719
|
+
const next = lines[j] ?? "";
|
|
4720
|
+
if (next.trim() === "") break;
|
|
4721
|
+
if (/^\s*(?:-|\*|\d+\.)\s+/.test(next)) break;
|
|
4722
|
+
if (/^\s+\S/.test(next)) {
|
|
4723
|
+
result.add(j);
|
|
4724
|
+
j++;
|
|
4725
|
+
continue;
|
|
4726
|
+
}
|
|
4727
|
+
break;
|
|
4728
|
+
}
|
|
4729
|
+
}
|
|
4730
|
+
}
|
|
4731
|
+
return result;
|
|
4732
|
+
}
|
|
4664
4733
|
function extractHardClauses(sectionContent) {
|
|
4665
4734
|
const clauses = [];
|
|
4666
4735
|
const lines = sectionContent.split("\n");
|
|
4667
4736
|
const alternativeOptions = detectAlternativeOptions(lines);
|
|
4668
4737
|
const negationContextLines = detectNegationContextLines(lines);
|
|
4738
|
+
const dependencyContextLines = detectDependencyContextLines(lines);
|
|
4669
4739
|
const mustPattern = /\b(MUST NOT|MUST|SHALL NOT|SHALL)\b/;
|
|
4670
4740
|
for (const line of lines) {
|
|
4671
4741
|
const match = mustPattern.exec(line);
|
|
@@ -4685,11 +4755,13 @@ function extractHardClauses(sectionContent) {
|
|
|
4685
4755
|
while ((pathMatch = pathPattern.exec(line)) !== null) {
|
|
4686
4756
|
const alt = findOptionForLine(lineIdx, alternativeOptions);
|
|
4687
4757
|
const inNegation = negationContextLines.has(lineIdx);
|
|
4758
|
+
const inDependency = dependencyContextLines.has(lineIdx);
|
|
4688
4759
|
clauses.push({
|
|
4689
4760
|
type: "path",
|
|
4690
4761
|
text: `\`${pathMatch[1]}\``,
|
|
4691
4762
|
...alt ? { alternative: alt } : {},
|
|
4692
|
-
...inNegation ? { negation: true } : {}
|
|
4763
|
+
...inNegation ? { negation: true } : {},
|
|
4764
|
+
...inDependency ? { dependency: true } : {}
|
|
4693
4765
|
});
|
|
4694
4766
|
}
|
|
4695
4767
|
}
|
|
@@ -4757,6 +4829,14 @@ var SourceAcFidelityCheck = class {
|
|
|
4757
4829
|
});
|
|
4758
4830
|
continue;
|
|
4759
4831
|
}
|
|
4832
|
+
if (clause.dependency === true) {
|
|
4833
|
+
findings.push({
|
|
4834
|
+
category: "source-ac-dependency-reference",
|
|
4835
|
+
severity: "info",
|
|
4836
|
+
message: `path: "${truncated}" referenced in source AC inside a dependency-context phrase (e.g., "via \`X\`", "via \`X\`'s outbox", "imports from \`X\`", "consumes \`X\`", "built atop \`X\`", "\`X\`-shipped", "using \`X\`'s") — the AC named this path as an architectural integration point the implementation interacts with, not a positive-delivery requirement; treated as reference-only`
|
|
4837
|
+
});
|
|
4838
|
+
continue;
|
|
4839
|
+
}
|
|
4760
4840
|
if (isOperationalPath(clause.text)) {
|
|
4761
4841
|
findings.push({
|
|
4762
4842
|
category: "source-ac-operational-path-reference",
|
|
@@ -6700,4 +6780,4 @@ function registerHealthCommand(program, _version = "0.0.0", projectRoot = proces
|
|
|
6700
6780
|
|
|
6701
6781
|
//#endregion
|
|
6702
6782
|
export { BMAD_BASELINE_TOKENS_FULL, DEFAULT_STALL_THRESHOLD_SECONDS, DoltMergeConflict, FileStateStore, FindingsInjector, RunManifest, RuntimeProbeListSchema, STOP_AFTER_VALID_PHASES, STORY_KEY_PATTERN$1 as STORY_KEY_PATTERN, SUBSTRATE_OWNED_SETTINGS_KEYS, SupervisorLock, VALID_PHASES, WorkGraphRepository, ZERO_FINDINGS_BY_AUTHOR, ZERO_FINDING_COUNTS, ZERO_PROBE_AUTHOR_METRICS, __commonJS, __require, __toESM, aggregateProbeAuthorMetrics, applyConfigToGraph, buildPipelineStatusOutput, createDatabaseAdapter$1 as createDatabaseAdapter, createDefaultVerificationPipeline, createGraphOrchestrator, createSdlcCodeReviewHandler, createSdlcCreateStoryHandler, createSdlcDevStoryHandler, createSdlcPhaseHandler, createStateStore, detectCycles, detectsEventDrivenAC, extractTargetFilesFromStoryContent, findPackageRoot, formatOutput, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, inspectProcessTree, isOrchestratorProcessLine, parseDbTimestampAsUtc, parseRuntimeProbes, registerHealthCommand, renderFindings, resolveBmadMethodSrcPath, resolveBmadMethodVersion, resolveGraphPath, resolveMainRepoRoot, resolveRunManifest, rollupFindingCounts, rollupFindingsByAuthor, rollupProbeAuthorMetrics, runHealthAction, validateStoryKey };
|
|
6703
|
-
//# sourceMappingURL=health-
|
|
6783
|
+
//# sourceMappingURL=health-BV-rzjf7.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DEFAULT_STALL_THRESHOLD_SECONDS, getAllDescendantPids, getAutoHealthData, inspectProcessTree, isOrchestratorProcessLine, registerHealthCommand, runHealthAction } from "./health-
|
|
1
|
+
import { DEFAULT_STALL_THRESHOLD_SECONDS, getAllDescendantPids, getAutoHealthData, inspectProcessTree, isOrchestratorProcessLine, registerHealthCommand, runHealthAction } from "./health-BV-rzjf7.js";
|
|
2
2
|
import "./logger-KeHncl-f.js";
|
|
3
3
|
import "./dist-VcMmfo2w.js";
|
|
4
4
|
import "./decisions-C0pz9Clx.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BMAD_BASELINE_TOKENS_FULL, DoltMergeConflict, FileStateStore, FindingsInjector, RunManifest, RuntimeProbeListSchema, STOP_AFTER_VALID_PHASES, STORY_KEY_PATTERN, VALID_PHASES, WorkGraphRepository, __commonJS, __require, __toESM, applyConfigToGraph, buildPipelineStatusOutput, createDatabaseAdapter, createDefaultVerificationPipeline, createGraphOrchestrator, createSdlcCodeReviewHandler, createSdlcCreateStoryHandler, createSdlcDevStoryHandler, createSdlcPhaseHandler, detectCycles, detectsEventDrivenAC, extractTargetFilesFromStoryContent, formatOutput, formatPipelineSummary, formatTokenTelemetry, inspectProcessTree, parseDbTimestampAsUtc, renderFindings, resolveGraphPath, resolveMainRepoRoot, validateStoryKey } from "./health-
|
|
1
|
+
import { BMAD_BASELINE_TOKENS_FULL, DoltMergeConflict, FileStateStore, FindingsInjector, RunManifest, RuntimeProbeListSchema, STOP_AFTER_VALID_PHASES, STORY_KEY_PATTERN, VALID_PHASES, WorkGraphRepository, __commonJS, __require, __toESM, applyConfigToGraph, buildPipelineStatusOutput, createDatabaseAdapter, createDefaultVerificationPipeline, createGraphOrchestrator, createSdlcCodeReviewHandler, createSdlcCreateStoryHandler, createSdlcDevStoryHandler, createSdlcPhaseHandler, detectCycles, detectsEventDrivenAC, extractTargetFilesFromStoryContent, formatOutput, formatPipelineSummary, formatTokenTelemetry, inspectProcessTree, parseDbTimestampAsUtc, renderFindings, resolveGraphPath, resolveMainRepoRoot, validateStoryKey } from "./health-BV-rzjf7.js";
|
|
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, createConfigSystem, createDatabaseAdapter$1, createDecision, createPipelineRun, createRequirement, detectInterfaceChanges, getArtifactByTypeForRun, getArtifactsByRun, getDecisionsByCategory, getDecisionsByPhase, getDecisionsByPhaseForRun, getLatestRun, getPipelineRunById, getRunMetrics, getRunningPipelineRuns, getStoryMetricsForRun, getTokenUsageSummary, initSchema, listRequirements, loadModelRoutingConfig, registerArtifact, updatePipelineRun, updatePipelineRunConfig, upsertDecision, writeRunMetrics, writeStoryMetrics } from "./dist-VcMmfo2w.js";
|
|
@@ -45175,4 +45175,4 @@ function registerRunCommand(program, _version = "0.0.0", projectRoot = process.c
|
|
|
45175
45175
|
|
|
45176
45176
|
//#endregion
|
|
45177
45177
|
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, runProbeAuthor, runRunAction, runSolutioningPhase, validateStopAfterFromConflict, wireNdjsonEmitter };
|
|
45178
|
-
//# sourceMappingURL=run-
|
|
45178
|
+
//# sourceMappingURL=run-BWUZK6bP.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "./health-
|
|
1
|
+
import "./health-BV-rzjf7.js";
|
|
2
2
|
import "./logger-KeHncl-f.js";
|
|
3
3
|
import "./helpers-CElYrONe.js";
|
|
4
4
|
import "./dist-VcMmfo2w.js";
|
|
5
|
-
import { normalizeGraphSummaryToStatus, registerRunCommand, resolveMaxReviewCycles, runRunAction, wireNdjsonEmitter } from "./run-
|
|
5
|
+
import { normalizeGraphSummaryToStatus, registerRunCommand, resolveMaxReviewCycles, runRunAction, wireNdjsonEmitter } from "./run-BWUZK6bP.js";
|
|
6
6
|
import "./routing-CcBOCuC9.js";
|
|
7
7
|
import "./decisions-C0pz9Clx.js";
|
|
8
8
|
|