substrate-ai 0.20.155 → 0.21.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.
@@ -0,0 +1,4 @@
1
+ import { AdapterRegistry } from "./dist-BkhYgJWo.js";
2
+ import "./adapter-registry-DXLMTmfD.js";
3
+
4
+ export { AdapterRegistry };
package/dist/cli/index.js CHANGED
@@ -1,20 +1,20 @@
1
1
  #!/usr/bin/env node
2
- import { FileKvStore, SUBSTRATE_OWNED_SETTINGS_KEYS, VALID_PHASES, buildPipelineStatusOutput, createDatabaseAdapter, createDoltOperatorReader, findPackageRoot, formatOutput, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, inspectProcessTree, parseDbTimestampAsUtc, registerHealthCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion } from "../health-DtcROhq3.js";
2
+ import { FileKvStore, SUBSTRATE_OWNED_SETTINGS_KEYS, VALID_PHASES, buildPipelineStatusOutput, createDatabaseAdapter, createDoltOperatorReader, findPackageRoot, formatOutput, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, inspectProcessTree, parseDbTimestampAsUtc, registerHealthCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion } from "../health-Cfkv6XoQ.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, createGitWorktreeManager, 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-Dl3vBZil.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, createGitWorktreeManager, 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-BkhYgJWo.js";
6
6
  import "../adapter-registry-DXLMTmfD.js";
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-B2Tn8bvh.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-BbgwnFFw.js";
9
- import "../errors-Dyyei2ah.js";
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-BhNRIiqm.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-DurcYzEd.js";
9
+ import "../errors-C7pY6_yQ.js";
10
10
  import "../routing-DFxoKHDt.js";
11
11
  import { WorkGraphRepository } from "../work-graph-repository-DZyJv5pV.js";
12
12
  import "../decisions-CzSIEeGP.js";
13
13
  import "../decision-router-BAPpON_C.js";
14
- import "../interactive-prompt-D-xBHKiP.js";
14
+ import "../interactive-prompt-BBfPSxyJ.js";
15
15
  import "../recovery-engine-BKGBeBnW.js";
16
16
  import "../version-manager-impl-qFBiO4Eh.js";
17
- import { registerUpgradeCommand } from "../upgrade-DGqUA_5f.js";
17
+ import { registerUpgradeCommand } from "../upgrade-S1oUMH5P.js";
18
18
  import { Command } from "commander";
19
19
  import { fileURLToPath } from "url";
20
20
  import { dirname, join, resolve } from "path";
@@ -7126,7 +7126,7 @@ async function runStatusAction(options) {
7126
7126
  logger$15.debug({ err }, "Work graph query failed, continuing without work graph data");
7127
7127
  }
7128
7128
  if (run === void 0) {
7129
- const { inspectProcessTree: inspectProcessTree$1 } = await import("../health-C4ussodZ.js");
7129
+ const { inspectProcessTree: inspectProcessTree$1 } = await import("../health-Coh3BG8W.js");
7130
7130
  const substrateDirPath = join(projectRoot, ".substrate");
7131
7131
  const processInfo = inspectProcessTree$1({
7132
7132
  projectRoot,
@@ -8074,7 +8074,7 @@ function defaultSupervisorDeps() {
8074
8074
  if (cached === null) {
8075
8075
  const { AdapterRegistry: AR } = await import(
8076
8076
  /* @vite-ignore */
8077
- "../adapter-registry-DJI97Kz-.js"
8077
+ "../adapter-registry-CZn__637.js"
8078
8078
  );
8079
8079
  cached = new AR();
8080
8080
  await cached.discoverAndRegister();
@@ -8641,11 +8641,11 @@ async function runSupervisorAction(options, deps = {}) {
8641
8641
  try {
8642
8642
  const { createExperimenter } = await import(
8643
8643
  /* @vite-ignore */
8644
- "../experimenter-BtX2GBSg.js"
8644
+ "../experimenter-BYqALeaE.js"
8645
8645
  );
8646
8646
  const { getLatestRun: getLatest } = await import(
8647
8647
  /* @vite-ignore */
8648
- "../decisions-Dd8Nc_Vs.js"
8648
+ "../decisions-BPwrDCTx.js"
8649
8649
  );
8650
8650
  const expAdapter = createDatabaseAdapter({
8651
8651
  backend: "auto",
@@ -8655,7 +8655,7 @@ async function runSupervisorAction(options, deps = {}) {
8655
8655
  await initSchema(expAdapter);
8656
8656
  const { runRunAction: runPipeline } = await import(
8657
8657
  /* @vite-ignore */
8658
- "../run-DjjG9wNI.js"
8658
+ "../run-DsK3IADR.js"
8659
8659
  );
8660
8660
  const runStoryFn = async (opts) => {
8661
8661
  const exitCode = await runPipeline({
@@ -9180,7 +9180,7 @@ async function runMetricsAction(options) {
9180
9180
  const routingConfigPath = join(dbDir, "routing.yml");
9181
9181
  let routingConfig = null;
9182
9182
  if (existsSync$1(routingConfigPath)) try {
9183
- const { loadModelRoutingConfig } = await import("../routing-CKcQZJZo.js");
9183
+ const { loadModelRoutingConfig } = await import("../routing-BS-Q8_2L.js");
9184
9184
  routingConfig = loadModelRoutingConfig(routingConfigPath);
9185
9185
  } catch {}
9186
9186
  if (routingConfig === null) routingConfig = {
@@ -13508,8 +13508,8 @@ async function createProgram() {
13508
13508
  /** Fire-and-forget startup version check (story 8.3, AC3/AC5) */
13509
13509
  function checkForUpdatesInBackground(currentVersion) {
13510
13510
  if (process.env.SUBSTRATE_NO_UPDATE_CHECK === "1") return;
13511
- import("../upgrade-CNtCNhsT.js").then(async () => {
13512
- const { createVersionManager } = await import("../version-manager-impl-f4r2s_Nv.js");
13511
+ import("../upgrade-BOWLlLbD.js").then(async () => {
13512
+ const { createVersionManager } = await import("../version-manager-impl-BVcsgUtN.js");
13513
13513
  const vm = createVersionManager();
13514
13514
  const result = await vm.checkForUpdates();
13515
13515
  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-Dl3vBZil.js";
1
+ import { addTokenUsage, createDecision, createPipelineRun, createRequirement, getArtifactByTypeForRun, getArtifactsByRun, getDecisionsByCategory, getDecisionsByPhase, getDecisionsByPhaseForRun, getLatestRun, getPipelineRunById, getRunningPipelineRuns, getTokenUsageSummary, listRequirements, registerArtifact, updateDecision, updatePipelineRun, updatePipelineRunConfig, upsertDecision } from "./dist-BkhYgJWo.js";
2
2
  import "./decisions-CzSIEeGP.js";
3
3
 
4
4
  export { getLatestRun };
@@ -9627,6 +9627,12 @@ const CLAUDE_AUTH_FAILURE_SIGNATURES = [
9627
9627
  "authentication_error",
9628
9628
  "credit balance is too low"
9629
9629
  ];
9630
+ /**
9631
+ * bug_014: signatures that ALSO appear as legitimate SDK error-contract values
9632
+ * or in auth-feature story code — they require a stronger CLI-error-line signal
9633
+ * (see detectClaudeAuthFailure) rather than a bare substring match.
9634
+ */
9635
+ const CLAUDE_AUTH_FAILURE_AMBIGUOUS = new Set(["invalid api key", "authentication_error"]);
9630
9636
  /** Operator-facing remediation appended to auth-failure escalations. */
9631
9637
  const CLAUDE_AUTH_FAILURE_HINT = "The Claude CLI rejected authentication before doing any work. Every subsequent dispatch in this run would fail identically, so the run was halted. Likely causes, in order: (1) a stale ANTHROPIC_API_KEY exported in the environment that spawned substrate — the CLI prefers it over claude.ai subscription login and rejects it if invalid (substrate scrubs the var on coding dispatches, but keys configured inside Claude Code settings/apiKeyHelper are outside substrate's control; verify with `env -u ANTHROPIC_API_KEY claude -p \"ok\"`); (2) an expired claude.ai session — run `claude login`; (3) an exhausted API credit balance when api_billing is enabled. Fix the credential, then re-run — completed stories are preserved.";
9632
9638
  /**
@@ -9636,8 +9642,20 @@ const CLAUDE_AUTH_FAILURE_HINT = "The Claude CLI rejected authentication before
9636
9642
  */
9637
9643
  function detectClaudeAuthFailure(output) {
9638
9644
  if (output === void 0 || output === null || output === "") return null;
9639
- const lower = output.toLowerCase();
9640
- return CLAUDE_AUTH_FAILURE_SIGNATURES.find((sig) => lower.includes(sig)) ?? null;
9645
+ const tail = output.slice(-4e3).toLowerCase();
9646
+ for (const sig of CLAUDE_AUTH_FAILURE_SIGNATURES) {
9647
+ if (!tail.includes(sig)) continue;
9648
+ if (!CLAUDE_AUTH_FAILURE_AMBIGUOUS.has(sig)) return sig;
9649
+ const onErrorLine = tail.split("\n").some((line) => {
9650
+ const t = line.trim();
9651
+ if (!t.includes(sig)) return false;
9652
+ if (/\bassert\b|\bexpect\s*\(|\.tobe|[!=<>]=|=>|\s=\s/.test(t)) return false;
9653
+ const context = t.split(sig).join(" ");
9654
+ return /error|failed|failure|unauthorized|forbidden|401|403|expired|revoked|denied|reject|precedence|please run|too low|not logged/.test(context);
9655
+ });
9656
+ if (onErrorLine) return sig;
9657
+ }
9658
+ return null;
9641
9659
  }
9642
9660
  /** Approximate characters per token for estimation */
9643
9661
  const CHARS_PER_TOKEN$2 = 3;
@@ -12610,4 +12628,4 @@ async function callLLM(params) {
12610
12628
 
12611
12629
  //#endregion
12612
12630
  export { ADVISORY_NOTES, AdapterRegistry, AdtError, BRANCH_PREFIX, BudgetConfigSchema, CLAUDE_AUTH_FAILURE_HINT, CODEX_SANDBOX_BLOCK_HINT, 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, classifyVersionGap, compareRunMetrics, createAmendmentRun, createConfigSystem, createDatabaseAdapter as createDatabaseAdapter$1, createDecision, createExperimenter, createGitWorktreeManager, createPipelineRun, createRequirement, createStderrLogger, createVersionManager, detectClaudeAuthFailure, detectCodexSandboxBlock, detectInterfaceChanges, determineVerdict, getActiveDecisions, getAllCostEntriesFiltered, getArtifactByTypeForRun, getArtifactsByRun, getBaselineRunMetrics, getDecisionsByCategory, getDecisionsByPhase, getDecisionsByPhaseForRun, getLatestCompletedRun, getLatestRun, getModelTier, getPipelineRunById, getPlanningCostTotal, getRetryableEscalations, getRunMetrics, getRunningPipelineRuns, getSessionCostSummary, getSessionCostSummaryFiltered, getStoryMetricsForRun, getTokenUsageSummary, incrementRunRestarts, initSchema, initWorkGraphSchema, initializeDolt, listRequirements, listRunMetrics, loadModelRoutingConfig, loadParentRunDecisions, registerArtifact, resolvePromptFile, supersedeDecision, swallowDebug, tagRunAsBaseline, updateDecision, updatePipelineRun, updatePipelineRunConfig, upsertDecision, writeRunMetrics, writeStoryMetrics };
12613
- //# sourceMappingURL=dist-Dl3vBZil.js.map
12631
+ //# sourceMappingURL=dist-BkhYgJWo.js.map
@@ -1,4 +1,4 @@
1
- import { AdtError } from "./dist-Dl3vBZil.js";
1
+ import { AdtError } from "./dist-BkhYgJWo.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-Dyyei2ah.js.map
74
+ //# sourceMappingURL=errors-C7pY6_yQ.js.map
@@ -1,3 +1,3 @@
1
- import { buildAuditLogEntry, buildBranchName, buildModificationDirective, buildPRBody, buildWorktreePath, createExperimenter, determineVerdict, resolvePromptFile } from "./dist-Dl3vBZil.js";
1
+ import { buildAuditLogEntry, buildBranchName, buildModificationDirective, buildPRBody, buildWorktreePath, createExperimenter, determineVerdict, resolvePromptFile } from "./dist-BkhYgJWo.js";
2
2
 
3
3
  export { createExperimenter };
@@ -1,6 +1,6 @@
1
1
  import { createLogger } from "./logger-KeHncl-f.js";
2
- import { DoltClient, DoltQueryError, createDatabaseAdapter$1 as createDatabaseAdapter, getLatestRun, getPipelineRunById, initSchema } from "./dist-Dl3vBZil.js";
3
- import { resolveMainRepoRoot, resolveRunManifest } from "./manifest-read-B2Tn8bvh.js";
2
+ import { DoltClient, DoltQueryError, createDatabaseAdapter$1 as createDatabaseAdapter, getLatestRun, getPipelineRunById, initSchema } from "./dist-BkhYgJWo.js";
3
+ import { resolveMainRepoRoot, resolveRunManifest } from "./manifest-read-BhNRIiqm.js";
4
4
  import { createRequire } from "module";
5
5
  import { dirname, join } from "path";
6
6
  import { existsSync, readFileSync } from "node:fs";
@@ -1000,4 +1000,4 @@ function registerHealthCommand(program, _version = "0.0.0", projectRoot = proces
1000
1000
 
1001
1001
  //#endregion
1002
1002
  export { BMAD_BASELINE_TOKENS_FULL, DEFAULT_STALL_THRESHOLD_SECONDS, FileKvStore, STOP_AFTER_VALID_PHASES, STORY_KEY_PATTERN, SUBSTRATE_OWNED_SETTINGS_KEYS, VALID_PHASES, __commonJS, __require, __toESM, buildPipelineStatusOutput, createDatabaseAdapter$1 as createDatabaseAdapter, createDoltOperatorReader, findPackageRoot, formatOutput, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, inspectProcessTree, isOrchestratorProcessLine, parseDbTimestampAsUtc, registerHealthCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion, runHealthAction, validateStoryKey };
1003
- //# sourceMappingURL=health-DtcROhq3.js.map
1003
+ //# sourceMappingURL=health-Cfkv6XoQ.js.map
@@ -1,7 +1,7 @@
1
- import { DEFAULT_STALL_THRESHOLD_SECONDS, getAllDescendantPids, getAutoHealthData, inspectProcessTree, isOrchestratorProcessLine, registerHealthCommand, runHealthAction } from "./health-DtcROhq3.js";
1
+ import { DEFAULT_STALL_THRESHOLD_SECONDS, getAllDescendantPids, getAutoHealthData, inspectProcessTree, isOrchestratorProcessLine, registerHealthCommand, runHealthAction } from "./health-Cfkv6XoQ.js";
2
2
  import "./logger-KeHncl-f.js";
3
- import "./dist-Dl3vBZil.js";
4
- import "./manifest-read-B2Tn8bvh.js";
3
+ import "./dist-BkhYgJWo.js";
4
+ import "./manifest-read-BhNRIiqm.js";
5
5
  import "./work-graph-repository-DZyJv5pV.js";
6
6
  import "./decisions-CzSIEeGP.js";
7
7
 
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { childLogger, createLogger, logger } from "./logger-KeHncl-f.js";
2
2
  import { assertDefined, createEventBus, createTuiApp, deepClone, formatDuration, generateId, isPlainObject, isTuiCapable, printNonTtyWarning, sleep, withRetry } from "./helpers-CElYrONe.js";
3
- import { AdapterRegistry, AdtError, ClaudeCodeAdapter, CodexCLIAdapter, ConfigError, ConfigIncompatibleFormatError, GeminiCLIAdapter } from "./dist-Dl3vBZil.js";
3
+ import { AdapterRegistry, AdtError, ClaudeCodeAdapter, CodexCLIAdapter, ConfigError, ConfigIncompatibleFormatError, GeminiCLIAdapter } from "./dist-BkhYgJWo.js";
4
4
  import "./adapter-registry-DXLMTmfD.js";
5
- import { BudgetExceededError, GitError, RecoveryError, TaskConfigError, TaskGraphCycleError, TaskGraphError, TaskGraphIncompatibleFormatError, WorkerError, WorkerNotFoundError } from "./errors-Dyyei2ah.js";
5
+ import { BudgetExceededError, GitError, RecoveryError, TaskConfigError, TaskGraphCycleError, TaskGraphError, TaskGraphIncompatibleFormatError, WorkerError, WorkerNotFoundError } from "./errors-C7pY6_yQ.js";
6
6
 
7
7
  //#region src/core/di.ts
8
8
  /**
@@ -1,5 +1,5 @@
1
1
  import { createLogger } from "./logger-KeHncl-f.js";
2
- import { readCurrentRunId, resolveMainRepoRoot } from "./manifest-read-B2Tn8bvh.js";
2
+ import { readCurrentRunId, resolveMainRepoRoot } from "./manifest-read-BhNRIiqm.js";
3
3
  import { join } from "node:path";
4
4
  import { mkdir, readFile, writeFile } from "node:fs/promises";
5
5
  import * as readline from "node:readline";
@@ -180,4 +180,4 @@ async function runInteractivePrompt(decisionContext) {
180
180
 
181
181
  //#endregion
182
182
  export { runInteractivePrompt };
183
- //# sourceMappingURL=interactive-prompt-D-xBHKiP.js.map
183
+ //# sourceMappingURL=interactive-prompt-BBfPSxyJ.js.map
@@ -1,5 +1,5 @@
1
1
  import { createLogger } from "./logger-KeHncl-f.js";
2
- import { LEARNING_FINDING, createDecision, getDecisionsByCategory } from "./dist-Dl3vBZil.js";
2
+ import { LEARNING_FINDING, createDecision, getDecisionsByCategory } from "./dist-BkhYgJWo.js";
3
3
  import * as path$1 from "path";
4
4
  import { join } from "path";
5
5
  import { readFile } from "fs/promises";
@@ -2244,10 +2244,10 @@ function detectTestCommand(workingDir) {
2244
2244
  * do not mask their own exit code, so this is a tampering signal, not a style
2245
2245
  * nit. Note: cannot catch arbitrary in-language masking (e.g. `python -c
2246
2246
  * "...sys.exit(0)"`) — the trusted-profile read is the primary defense; this is
2247
- * belt-and-braces for the shell-wrapper class and the --no-worktree path.
2247
+ * belt-and-braces for common shell-wrapper masks; NOT a complete parser.
2248
2248
  */
2249
2249
  function detectsExitCodeLaundering(command) {
2250
- return /(\|\||;)\s*(true|:|exit\s+0)(\s|;|$)/.test(command);
2250
+ return /(\|\||;)\s*(true|:|exit\s+0|return\s+0|exec\s+true)(?!\w)/.test(command) || /\{\s*(exit\s+0|true|:)\s*;?\s*\}/.test(command);
2251
2251
  }
2252
2252
  var TestSuiteCheck = class {
2253
2253
  name = "test-suite";
@@ -2428,7 +2428,9 @@ const LANGUAGE_EXTENSIONS = {
2428
2428
  ".cc",
2429
2429
  ".cxx",
2430
2430
  ".hpp",
2431
- ".hh"
2431
+ ".hh",
2432
+ ".h",
2433
+ ".hxx"
2432
2434
  ],
2433
2435
  c: [".c", ".h"],
2434
2436
  swift: [".swift"],
@@ -2460,8 +2462,6 @@ const ALWAYS_DENY_SEGMENTS = [
2460
2462
  ".venv",
2461
2463
  "venv",
2462
2464
  "__pycache__",
2463
- "vendor",
2464
- "target",
2465
2465
  ".gradle",
2466
2466
  ".tox",
2467
2467
  ".mypy_cache",
@@ -2520,6 +2520,16 @@ function classifyContamination(changedFiles, allowedLanguages) {
2520
2520
  droppings.push(file);
2521
2521
  continue;
2522
2522
  }
2523
+ const allowGoVendor = allowedLanguages.includes("go");
2524
+ const allowJvmTarget = allowedLanguages.some((l) => l === "rust" || l === "java" || l === "kotlin" || l === "scala");
2525
+ if (!allowGoVendor && segments.includes("vendor")) {
2526
+ droppings.push(file);
2527
+ continue;
2528
+ }
2529
+ if (!allowJvmTarget && segments.includes("target")) {
2530
+ droppings.push(file);
2531
+ continue;
2532
+ }
2523
2533
  const base = segments[segments.length - 1] ?? "";
2524
2534
  if (!allowJs && JS_TOOLCHAIN_MANIFESTS.includes(base)) {
2525
2535
  foreignToolchainManifests.push(file);
@@ -6372,4 +6382,4 @@ async function resolveRunManifest(dbRoot, runId) {
6372
6382
 
6373
6383
  //#endregion
6374
6384
  export { FindingsInjector, RunManifest, RuntimeProbeListSchema, SupervisorLock, ZERO_FINDINGS_BY_AUTHOR, ZERO_FINDING_COUNTS, ZERO_PROBE_AUTHOR_METRICS, aggregateProbeAuthorMetrics, applyConfigToGraph, createDefaultVerificationPipeline, createGraphOrchestrator, createSdlcCodeReviewHandler, createSdlcCreateStoryHandler, createSdlcDevStoryHandler, createSdlcPhaseHandler, detectsEventDrivenAC, detectsStateIntegratingAC, extractTargetFilesFromStoryContent, parseRuntimeProbes, readCurrentRunId, renderFindings, resolveGraphPath, resolveMainRepoRoot, resolveRunManifest, rollupFindingCounts, rollupFindingsByAuthor, rollupProbeAuthorByClass, rollupProbeAuthorMetrics, runAcTraceabilityCheck, runStaleVerificationRecovery };
6375
- //# sourceMappingURL=manifest-read-B2Tn8bvh.js.map
6385
+ //# sourceMappingURL=manifest-read-BhNRIiqm.js.map
@@ -1,6 +1,6 @@
1
1
  import "../../logger-KeHncl-f.js";
2
- import "../../dist-Dl3vBZil.js";
3
- import "../../manifest-read-B2Tn8bvh.js";
4
- import { runInteractivePrompt } from "../../interactive-prompt-D-xBHKiP.js";
2
+ import "../../dist-BkhYgJWo.js";
3
+ import "../../manifest-read-BhNRIiqm.js";
4
+ import { runInteractivePrompt } from "../../interactive-prompt-BBfPSxyJ.js";
5
5
 
6
6
  export { runInteractivePrompt };
@@ -1,4 +1,4 @@
1
- import { ModelRoutingConfigSchema, ProviderPolicySchema, RoutingConfigError, RoutingRecommender, RoutingResolver, RoutingTelemetry, RoutingTokenAccumulator, RoutingTuner, TASK_TYPE_PHASE_MAP, getModelTier, loadModelRoutingConfig } from "./dist-Dl3vBZil.js";
1
+ import { ModelRoutingConfigSchema, ProviderPolicySchema, RoutingConfigError, RoutingRecommender, RoutingResolver, RoutingTelemetry, RoutingTokenAccumulator, RoutingTuner, TASK_TYPE_PHASE_MAP, getModelTier, loadModelRoutingConfig } from "./dist-BkhYgJWo.js";
2
2
  import "./routing-DFxoKHDt.js";
3
3
 
4
4
  export { loadModelRoutingConfig };
@@ -1,14 +1,14 @@
1
- import "./health-DtcROhq3.js";
1
+ import "./health-Cfkv6XoQ.js";
2
2
  import "./logger-KeHncl-f.js";
3
3
  import "./helpers-CElYrONe.js";
4
- import "./dist-Dl3vBZil.js";
5
- import "./manifest-read-B2Tn8bvh.js";
6
- import { normalizeGraphSummaryToStatus, registerRunCommand, resolveMaxReviewCycles, resolveProbeAuthorStateIntegrating, runRunAction, wireNdjsonEmitter } from "./run-BbgwnFFw.js";
4
+ import "./dist-BkhYgJWo.js";
5
+ import "./manifest-read-BhNRIiqm.js";
6
+ import { normalizeGraphSummaryToStatus, registerRunCommand, resolveMaxReviewCycles, resolveProbeAuthorStateIntegrating, runRunAction, wireNdjsonEmitter } from "./run-DurcYzEd.js";
7
7
  import "./routing-DFxoKHDt.js";
8
8
  import "./work-graph-repository-DZyJv5pV.js";
9
9
  import "./decisions-CzSIEeGP.js";
10
10
  import "./decision-router-BAPpON_C.js";
11
- import "./interactive-prompt-D-xBHKiP.js";
11
+ import "./interactive-prompt-BBfPSxyJ.js";
12
12
  import "./recovery-engine-BKGBeBnW.js";
13
13
 
14
14
  export { runRunAction };
@@ -1,11 +1,11 @@
1
- import { BMAD_BASELINE_TOKENS_FULL, FileKvStore, STOP_AFTER_VALID_PHASES, STORY_KEY_PATTERN, VALID_PHASES, __commonJS, __require, __toESM, buildPipelineStatusOutput, createDatabaseAdapter, formatOutput, formatPipelineSummary, formatTokenTelemetry, inspectProcessTree, parseDbTimestampAsUtc, validateStoryKey } from "./health-DtcROhq3.js";
1
+ import { BMAD_BASELINE_TOKENS_FULL, FileKvStore, STOP_AFTER_VALID_PHASES, STORY_KEY_PATTERN, VALID_PHASES, __commonJS, __require, __toESM, buildPipelineStatusOutput, createDatabaseAdapter, formatOutput, formatPipelineSummary, formatTokenTelemetry, inspectProcessTree, parseDbTimestampAsUtc, validateStoryKey } from "./health-Cfkv6XoQ.js";
2
2
  import { createLogger } from "./logger-KeHncl-f.js";
3
3
  import { TypedEventBusImpl, createEventBus, createTuiApp, isTuiCapable, printNonTtyWarning, sleep } from "./helpers-CElYrONe.js";
4
- import { ADVISORY_NOTES, BRANCH_PREFIX, CLAUDE_AUTH_FAILURE_HINT, CODEX_SANDBOX_BLOCK_HINT, 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, createGitWorktreeManager, createPipelineRun, createRequirement, detectClaudeAuthFailure, detectCodexSandboxBlock, detectInterfaceChanges, getArtifactByTypeForRun, getArtifactsByRun, getDecisionsByCategory, getDecisionsByPhase, getDecisionsByPhaseForRun, getLatestRun, getPipelineRunById, getRunMetrics, getRunningPipelineRuns, getStoryMetricsForRun, getTokenUsageSummary, initSchema, listRequirements, loadModelRoutingConfig, registerArtifact, swallowDebug, updatePipelineRun, updatePipelineRunConfig, upsertDecision, writeRunMetrics, writeStoryMetrics } from "./dist-Dl3vBZil.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-B2Tn8bvh.js";
4
+ import { ADVISORY_NOTES, BRANCH_PREFIX, CLAUDE_AUTH_FAILURE_HINT, CODEX_SANDBOX_BLOCK_HINT, 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, createGitWorktreeManager, createPipelineRun, createRequirement, detectClaudeAuthFailure, detectCodexSandboxBlock, detectInterfaceChanges, getArtifactByTypeForRun, getArtifactsByRun, getDecisionsByCategory, getDecisionsByPhase, getDecisionsByPhaseForRun, getLatestRun, getPipelineRunById, getRunMetrics, getRunningPipelineRuns, getStoryMetricsForRun, getTokenUsageSummary, initSchema, listRequirements, loadModelRoutingConfig, registerArtifact, swallowDebug, updatePipelineRun, updatePipelineRunConfig, upsertDecision, writeRunMetrics, writeStoryMetrics } from "./dist-BkhYgJWo.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-BhNRIiqm.js";
6
6
  import { WorkGraphRepository, detectCycles } from "./work-graph-repository-DZyJv5pV.js";
7
7
  import { deriveExitCode, routeDecision } from "./decision-router-BAPpON_C.js";
8
- import { runInteractivePrompt } from "./interactive-prompt-D-xBHKiP.js";
8
+ import { runInteractivePrompt } from "./interactive-prompt-BBfPSxyJ.js";
9
9
  import { runRecoveryEngine } from "./recovery-engine-BKGBeBnW.js";
10
10
  import { basename, dirname, extname, join } from "path";
11
11
  import { access, readFile, readdir, stat } from "fs/promises";
@@ -5340,7 +5340,7 @@ function checkGitModifiedTrackedFiles(workingDir = process.cwd(), baselineSha) {
5340
5340
  return [];
5341
5341
  }
5342
5342
  const diffs = ["git diff --name-only HEAD", "git diff --cached --name-only"];
5343
- if (baselineSha !== void 0 && baselineSha.length > 0) diffs.push(`git diff --name-only --diff-filter=MD ${baselineSha}..HEAD`);
5343
+ if (baselineSha !== void 0 && baselineSha.length > 0) diffs.push(`git diff --name-only --diff-filter=MDR ${baselineSha}..HEAD`);
5344
5344
  for (const args of diffs) try {
5345
5345
  execSync(args, {
5346
5346
  cwd: workingDir,
@@ -6901,8 +6901,12 @@ async function commitDevStoryOutput(storyKey, storyTitle, filesModified, working
6901
6901
  const COMMIT_DENY_SEGMENTS = [
6902
6902
  "node_modules",
6903
6903
  ".venv",
6904
+ "venv",
6904
6905
  "__pycache__",
6905
- ".substrate-worktrees"
6906
+ ".substrate-worktrees",
6907
+ ".mypy_cache",
6908
+ ".pytest_cache",
6909
+ ".ruff_cache"
6906
6910
  ];
6907
6911
  const insideWorktree = [];
6908
6912
  for (const p of filesModified) {
@@ -6931,7 +6935,7 @@ async function commitDevStoryOutput(storyKey, storyTitle, filesModified, working
6931
6935
  reason: "no-files-inside-worktree"
6932
6936
  };
6933
6937
  try {
6934
- execSync(`git add ${insideWorktree.map((p) => JSON.stringify(p)).join(" ")}`, {
6938
+ execFileSync("git", ["add", ...insideWorktree], {
6935
6939
  cwd: workingDir,
6936
6940
  stdio: [
6937
6941
  "ignore",
@@ -6970,7 +6974,11 @@ async function commitDevStoryOutput(storyKey, storyTitle, filesModified, working
6970
6974
  const title = storyTitle ?? "implementation";
6971
6975
  const message = `feat(story-${storyKey}): ${title}`;
6972
6976
  try {
6973
- execSync(`git commit -m ${JSON.stringify(message)}`, {
6977
+ execFileSync("git", [
6978
+ "commit",
6979
+ "-m",
6980
+ message
6981
+ ], {
6974
6982
  cwd: workingDir,
6975
6983
  stdio: [
6976
6984
  "ignore",
@@ -7074,7 +7082,12 @@ async function checkpointStoryWorktree(storyKey, reason, workingDir) {
7074
7082
  const cleanReason = (reason.split("\n")[0] ?? "checkpoint").split("").filter((ch) => ch.charCodeAt(0) >= 32).join("").slice(0, 100);
7075
7083
  const message = `wip(story-${storyKey}): ${cleanReason}`;
7076
7084
  try {
7077
- execSync(`git commit --no-verify -m ${JSON.stringify(message)}`, {
7085
+ execFileSync("git", [
7086
+ "commit",
7087
+ "--no-verify",
7088
+ "-m",
7089
+ message
7090
+ ], {
7078
7091
  cwd: workingDir,
7079
7092
  stdio: [
7080
7093
  "ignore",
@@ -15835,7 +15848,7 @@ function createImplementationOrchestrator(deps) {
15835
15848
  outputTokenCount: devOutputTokenCount,
15836
15849
  sourceEpicContent,
15837
15850
  ...effectiveProjectRoot !== void 0 ? { changedFiles: recaptureChangedFiles(effectiveProjectRoot) } : {},
15838
- ...modifiedTrackedFiles !== void 0 ? { modifiedTrackedFiles } : {},
15851
+ ...effectiveProjectRoot !== void 0 ? { modifiedTrackedFiles: checkGitModifiedTrackedFiles(effectiveProjectRoot, baselineHeadSha) } : {},
15839
15852
  runId: config.pipelineRunId
15840
15853
  });
15841
15854
  const retryVerifSummary = await verificationPipeline.run(retryVerifContext, "A");
@@ -16273,7 +16286,12 @@ function createImplementationOrchestrator(deps) {
16273
16286
  if (finalizationMode === "branch" || finalizationMode === "pr") {
16274
16287
  let prUrl;
16275
16288
  if (finalizationMode === "pr") try {
16276
- execSync(`git push -u origin ${branchName}`, {
16289
+ execFileSync("git", [
16290
+ "push",
16291
+ "-u",
16292
+ "origin",
16293
+ branchName
16294
+ ], {
16277
16295
  cwd: projectRoot,
16278
16296
  stdio: [
16279
16297
  "ignore",
@@ -16283,7 +16301,16 @@ function createImplementationOrchestrator(deps) {
16283
16301
  timeout: 6e4
16284
16302
  });
16285
16303
  const shortSha = (storyDeliverableSha ?? "").slice(0, 10);
16286
- const ghOutput = execSync(`gh pr create --head ${branchName} --title ${JSON.stringify(`story ${storyKey}: ${_capturedStoryTitle ?? "implementation"}`)} --body ${JSON.stringify(`Substrate story ${storyKey} (commit ${shortSha}). Verified by the Tier-A pipeline; see the run manifest for the full verification record.`)}`, {
16304
+ const ghOutput = execFileSync("gh", [
16305
+ "pr",
16306
+ "create",
16307
+ "--head",
16308
+ branchName,
16309
+ "--title",
16310
+ `story ${storyKey}: ${_capturedStoryTitle ?? "implementation"}`,
16311
+ "--body",
16312
+ `Substrate story ${storyKey} (commit ${shortSha}). Verified by the Tier-A pipeline; see the run manifest for the full verification record.`
16313
+ ], {
16287
16314
  cwd: projectRoot,
16288
16315
  encoding: "utf-8",
16289
16316
  stdio: [
@@ -16625,6 +16652,26 @@ function createImplementationOrchestrator(deps) {
16625
16652
  continue;
16626
16653
  }
16627
16654
  if (isPhantomReview && timeoutRetried) {
16655
+ const phantomAuthSignature = detectClaudeAuthFailure(reviewResult.error ?? "");
16656
+ if (phantomAuthSignature !== null) {
16657
+ endPhase(storyKey, "code-review");
16658
+ updateStory(storyKey, {
16659
+ phase: "ESCALATED",
16660
+ error: "auth-failure",
16661
+ completedAt: new Date().toISOString()
16662
+ });
16663
+ await writeStoryMetricsBestEffort(storyKey, "escalated", reviewCycles + 1);
16664
+ await emitEscalation({
16665
+ storyKey,
16666
+ lastVerdict: "auth-failure",
16667
+ reviewCycles: reviewCycles + 1,
16668
+ issues: [reviewResult.error ?? "", CLAUDE_AUTH_FAILURE_HINT],
16669
+ escalationReason: "auth-failure"
16670
+ });
16671
+ await triggerAuthFailureHalt(storyKey, phantomAuthSignature);
16672
+ await persistState();
16673
+ return;
16674
+ }
16628
16675
  const isStoryFileMissing = (reviewResult.error ?? "").includes("story-file-missing");
16629
16676
  const escalationReason = isStoryFileMissing ? "story-file-missing" : "consecutive-review-timeouts";
16630
16677
  logger$27.warn({
@@ -16704,6 +16751,25 @@ function createImplementationOrchestrator(deps) {
16704
16751
  } catch (err) {
16705
16752
  const errMsg = err instanceof Error ? err.message : String(err);
16706
16753
  endPhase(storyKey, "code-review");
16754
+ const reviewAuthSignature = detectClaudeAuthFailure(errMsg);
16755
+ if (reviewAuthSignature !== null) {
16756
+ updateStory(storyKey, {
16757
+ phase: "ESCALATED",
16758
+ error: "auth-failure",
16759
+ completedAt: new Date().toISOString()
16760
+ });
16761
+ await writeStoryMetricsBestEffort(storyKey, "failed", reviewCycles);
16762
+ await emitEscalation({
16763
+ storyKey,
16764
+ lastVerdict: "auth-failure",
16765
+ reviewCycles,
16766
+ issues: [errMsg, CLAUDE_AUTH_FAILURE_HINT],
16767
+ escalationReason: "auth-failure"
16768
+ });
16769
+ await triggerAuthFailureHalt(storyKey, reviewAuthSignature);
16770
+ await persistState();
16771
+ return;
16772
+ }
16707
16773
  updateStory(storyKey, {
16708
16774
  phase: "ESCALATED",
16709
16775
  error: errMsg,
@@ -16929,6 +16995,10 @@ function createImplementationOrchestrator(deps) {
16929
16995
  storyKey
16930
16996
  });
16931
16997
  const fixResult = await handle.result;
16998
+ {
16999
+ const fixFiles = fixResult.parsed?.files_modified;
17000
+ if (Array.isArray(fixFiles)) devFilesModified = Array.from(new Set([...devFilesModified, ...fixFiles.filter((f$1) => typeof f$1 === "string")]));
17001
+ }
16932
17002
  eventBus.emit("orchestrator:story-phase-complete", {
16933
17003
  storyKey,
16934
17004
  phase: "IN_MINOR_FIX",
@@ -17136,6 +17206,10 @@ function createImplementationOrchestrator(deps) {
17136
17206
  });
17137
17207
  const fixResult = await handle.result;
17138
17208
  endPhase(storyKey, "fix");
17209
+ {
17210
+ const fixFiles = fixResult.parsed?.files_modified;
17211
+ if (Array.isArray(fixFiles)) devFilesModified = Array.from(new Set([...devFilesModified, ...fixFiles.filter((f$1) => typeof f$1 === "string")]));
17212
+ }
17139
17213
  eventBus.emit("orchestrator:story-phase-complete", {
17140
17214
  storyKey,
17141
17215
  phase: taskType === "minor-fixes" ? "IN_MINOR_FIX" : "IN_MAJOR_FIX",
@@ -47906,7 +47980,7 @@ async function runFullPipeline(options) {
47906
47980
  */
47907
47981
  async function emitPreDispatchVersionAdvisory(currentVersion) {
47908
47982
  if (process.env["SUBSTRATE_NO_UPDATE_CHECK"] === "1") return;
47909
- const { createVersionManager } = await import("./version-manager-impl-f4r2s_Nv.js");
47983
+ const { createVersionManager } = await import("./version-manager-impl-BVcsgUtN.js");
47910
47984
  const vm = createVersionManager();
47911
47985
  const result = await vm.checkForUpdates(true);
47912
47986
  const gap = classifyVersionGap(currentVersion, result.latestVersion);
@@ -48013,4 +48087,4 @@ function registerRunCommand(program, version = "0.0.0", projectRoot = process.cw
48013
48087
 
48014
48088
  //#endregion
48015
48089
  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, 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 };
48016
- //# sourceMappingURL=run-BbgwnFFw.js.map
48090
+ //# sourceMappingURL=run-DurcYzEd.js.map
@@ -1,5 +1,5 @@
1
- import "./dist-Dl3vBZil.js";
1
+ import "./dist-BkhYgJWo.js";
2
2
  import "./version-manager-impl-qFBiO4Eh.js";
3
- import { isGlobalInstall, registerUpgradeCommand, runUpgradeCommand } from "./upgrade-DGqUA_5f.js";
3
+ import { isGlobalInstall, registerUpgradeCommand, runUpgradeCommand } from "./upgrade-S1oUMH5P.js";
4
4
 
5
5
  export { isGlobalInstall, registerUpgradeCommand, runUpgradeCommand };
@@ -1,4 +1,4 @@
1
- import { createVersionManager } from "./dist-Dl3vBZil.js";
1
+ import { createVersionManager } from "./dist-BkhYgJWo.js";
2
2
  import { execSync, spawn } from "child_process";
3
3
  import * as readline from "readline";
4
4
 
@@ -123,4 +123,4 @@ function registerUpgradeCommand(program) {
123
123
 
124
124
  //#endregion
125
125
  export { isGlobalInstall, registerUpgradeCommand, runUpgradeCommand };
126
- //# sourceMappingURL=upgrade-DGqUA_5f.js.map
126
+ //# sourceMappingURL=upgrade-S1oUMH5P.js.map
@@ -1,4 +1,4 @@
1
- import { VersionManagerImpl, createVersionManager } from "./dist-Dl3vBZil.js";
1
+ import { VersionManagerImpl, createVersionManager } from "./dist-BkhYgJWo.js";
2
2
  import "./version-manager-impl-qFBiO4Eh.js";
3
3
 
4
4
  export { createVersionManager };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "substrate-ai",
3
- "version": "0.20.155",
3
+ "version": "0.21.0",
4
4
  "description": "Substrate — multi-agent orchestration daemon for AI coding agents",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1,4 +0,0 @@
1
- import { AdapterRegistry } from "./dist-Dl3vBZil.js";
2
- import "./adapter-registry-DXLMTmfD.js";
3
-
4
- export { AdapterRegistry };