substrate-ai 0.20.97 → 0.20.99

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-Dy27RUJl.js";
2
+ import "./adapter-registry-DIcrxjH8.js";
3
+
4
+ export { AdapterRegistry };
package/dist/cli/index.js CHANGED
@@ -1,20 +1,20 @@
1
1
  #!/usr/bin/env node
2
- import { FileStateStore, SUBSTRATE_OWNED_SETTINGS_KEYS, VALID_PHASES, buildPipelineStatusOutput, createDatabaseAdapter, createDoltOperatorReader, createStateStore, findPackageRoot, formatOutput, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, inspectProcessTree, parseDbTimestampAsUtc, registerHealthCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion } from "../health-DmvwKjP5.js";
2
+ import { FileStateStore, SUBSTRATE_OWNED_SETTINGS_KEYS, VALID_PHASES, buildPipelineStatusOutput, createDatabaseAdapter, createDoltOperatorReader, createStateStore, findPackageRoot, formatOutput, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, inspectProcessTree, parseDbTimestampAsUtc, registerHealthCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion } from "../health-KJ62gMft.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, swallowDebug, tagRunAsBaseline, updatePipelineRun } from "../dist-DnVfCiro.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-BONrtCkE.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, swallowDebug, tagRunAsBaseline, updatePipelineRun } from "../dist-Dy27RUJl.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-DM7ZJ1g9.js";
7
7
  import "../adapter-registry-DIcrxjH8.js";
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-96wMXd5A.js";
9
- import "../errors-7UL0-Lga.js";
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-Pk6vQ-2e.js";
9
+ import "../errors-B6IWIdxG.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-DblHY8se.js";
14
- import "../interactive-prompt-El7WVSY2.js";
14
+ import "../interactive-prompt-C3qr42Ed.js";
15
15
  import "../recovery-engine-BKGBeBnW.js";
16
16
  import "../version-manager-impl-qFBiO4Eh.js";
17
- import { registerUpgradeCommand } from "../upgrade-DalCYA_U.js";
17
+ import { registerUpgradeCommand } from "../upgrade-Cwzu8GX8.js";
18
18
  import { Command } from "commander";
19
19
  import { fileURLToPath } from "url";
20
20
  import { dirname, join, resolve } from "path";
@@ -6887,7 +6887,7 @@ async function runStatusAction(options) {
6887
6887
  logger$15.debug({ err }, "Work graph query failed, continuing without work graph data");
6888
6888
  }
6889
6889
  if (run === void 0) {
6890
- const { inspectProcessTree: inspectProcessTree$1 } = await import("../health-CQuQJ7OQ.js");
6890
+ const { inspectProcessTree: inspectProcessTree$1 } = await import("../health-CQMl6YP3.js");
6891
6891
  const substrateDirPath = join(projectRoot, ".substrate");
6892
6892
  const processInfo = inspectProcessTree$1({
6893
6893
  projectRoot,
@@ -7835,7 +7835,7 @@ function defaultSupervisorDeps() {
7835
7835
  if (cached === null) {
7836
7836
  const { AdapterRegistry: AR } = await import(
7837
7837
  /* @vite-ignore */
7838
- "../adapter-registry-elGgGcQB.js"
7838
+ "../adapter-registry-BBJO3LkW.js"
7839
7839
  );
7840
7840
  cached = new AR();
7841
7841
  await cached.discoverAndRegister();
@@ -8402,11 +8402,11 @@ async function runSupervisorAction(options, deps = {}) {
8402
8402
  try {
8403
8403
  const { createExperimenter } = await import(
8404
8404
  /* @vite-ignore */
8405
- "../experimenter--Oe0guH8.js"
8405
+ "../experimenter-C1IdVatx.js"
8406
8406
  );
8407
8407
  const { getLatestRun: getLatest } = await import(
8408
8408
  /* @vite-ignore */
8409
- "../decisions-DsoOrBZE.js"
8409
+ "../decisions-7Bv5uob4.js"
8410
8410
  );
8411
8411
  const expAdapter = createDatabaseAdapter({
8412
8412
  backend: "auto",
@@ -8416,7 +8416,7 @@ async function runSupervisorAction(options, deps = {}) {
8416
8416
  await initSchema(expAdapter);
8417
8417
  const { runRunAction: runPipeline } = await import(
8418
8418
  /* @vite-ignore */
8419
- "../run-DfBzTNKC.js"
8419
+ "../run-BpIMRmZ9.js"
8420
8420
  );
8421
8421
  const runStoryFn = async (opts) => {
8422
8422
  const exitCode = await runPipeline({
@@ -8944,7 +8944,7 @@ async function runMetricsAction(options) {
8944
8944
  const routingConfigPath = join(dbDir, "routing.yml");
8945
8945
  let routingConfig = null;
8946
8946
  if (existsSync$1(routingConfigPath)) try {
8947
- const { loadModelRoutingConfig } = await import("../routing-jFYm30zp.js");
8947
+ const { loadModelRoutingConfig } = await import("../routing-IyC_c-r2.js");
8948
8948
  routingConfig = loadModelRoutingConfig(routingConfigPath);
8949
8949
  } catch {}
8950
8950
  if (routingConfig === null) routingConfig = {
@@ -13326,8 +13326,8 @@ async function createProgram() {
13326
13326
  /** Fire-and-forget startup version check (story 8.3, AC3/AC5) */
13327
13327
  function checkForUpdatesInBackground(currentVersion) {
13328
13328
  if (process.env.SUBSTRATE_NO_UPDATE_CHECK === "1") return;
13329
- import("../upgrade-BAG_bSYf.js").then(async () => {
13330
- const { createVersionManager } = await import("../version-manager-impl-bWaGssmZ.js");
13329
+ import("../upgrade-DY_oXnjI.js").then(async () => {
13330
+ const { createVersionManager } = await import("../version-manager-impl-DnnXTOS7.js");
13331
13331
  const vm = createVersionManager();
13332
13332
  const result = await vm.checkForUpdates();
13333
13333
  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-DnVfCiro.js";
1
+ import { addTokenUsage, createDecision, createPipelineRun, createRequirement, getArtifactByTypeForRun, getArtifactsByRun, getDecisionsByCategory, getDecisionsByPhase, getDecisionsByPhaseForRun, getLatestRun, getPipelineRunById, getRunningPipelineRuns, getTokenUsageSummary, listRequirements, registerArtifact, updateDecision, updatePipelineRun, updatePipelineRunConfig, upsertDecision } from "./dist-Dy27RUJl.js";
2
2
  import "./decisions-CzSIEeGP.js";
3
3
 
4
4
  export { getLatestRun };
@@ -2963,100 +2963,41 @@ async function initMonitorSchema(adapter) {
2963
2963
 
2964
2964
  //#endregion
2965
2965
  //#region packages/core/dist/persistence/state-schema.js
2966
+ /**
2967
+ * Legacy state-table cleanup — pre-2026-Q1 orchestrator state tables.
2968
+ *
2969
+ * Historical context: `stories`, `contracts`, `metrics`, `dispatch_log`,
2970
+ * `build_results`, `review_verdicts` (+ vestigial `_schema_version`) were
2971
+ * defined as the substrate-state surface in `schema.sql`. Ship 1 (v0.20.92)
2972
+ * excised the corresponding DoltStateStore CRUD methods after auditing every
2973
+ * production project (ynab, quant) and finding all six tables empty — the
2974
+ * orchestrator wires `FileStateStore` (in-memory), so DoltStateStore's write
2975
+ * methods never fired and these tables were perpetually empty.
2976
+ *
2977
+ * Ship 7 (v0.20.98) deleted the vestigial `_schema_version` table the same
2978
+ * way; Ship 8 (v0.20.99) extends that pattern to the remaining six legacy
2979
+ * tables. This module owns NO tables now — it survives only to drop the
2980
+ * legacy tables on existing repos (ynab, quant) at next `substrate run`.
2981
+ *
2982
+ * Fresh repos never see any of these tables; existing repos lose them on
2983
+ * next init via the DROP TABLE IF EXISTS block below.
2984
+ *
2985
+ * Note: monitor.db's `_schema_version` (in `.substrate/monitor.db`) is
2986
+ * intentionally distinct from the substrate-state `_schema_version` we
2987
+ * dropped — see monitor-database.ts.
2988
+ */
2989
+ const LEGACY_TABLES = [
2990
+ "_schema_version",
2991
+ "stories",
2992
+ "contracts",
2993
+ "metrics",
2994
+ "dispatch_log",
2995
+ "build_results",
2996
+ "review_verdicts"
2997
+ ];
2966
2998
  async function initStateSchema(adapter) {
2967
- await adapter.exec(`
2968
- CREATE TABLE IF NOT EXISTS stories (
2969
- story_key VARCHAR(100) NOT NULL,
2970
- sprint VARCHAR(50),
2971
- status VARCHAR(30) NOT NULL DEFAULT 'PENDING',
2972
- phase VARCHAR(30) NOT NULL DEFAULT 'PENDING',
2973
- ac_results JSON,
2974
- error_message TEXT,
2975
- created_at DATETIME,
2976
- updated_at DATETIME,
2977
- completed_at DATETIME,
2978
- PRIMARY KEY (story_key)
2979
- )
2980
- `);
2981
- await adapter.exec(`
2982
- CREATE TABLE IF NOT EXISTS contracts (
2983
- story_key VARCHAR(100) NOT NULL,
2984
- name VARCHAR(200) NOT NULL,
2985
- direction VARCHAR(20) NOT NULL,
2986
- schema_path VARCHAR(500),
2987
- transport VARCHAR(200),
2988
- recorded_at DATETIME,
2989
- PRIMARY KEY (story_key, name, direction)
2990
- )
2991
- `);
2992
- await adapter.exec(`
2993
- CREATE TABLE IF NOT EXISTS metrics (
2994
- story_key VARCHAR(100) NOT NULL,
2995
- task_type VARCHAR(100) NOT NULL,
2996
- recorded_at DATETIME NOT NULL,
2997
- model VARCHAR(100),
2998
- tokens_in BIGINT NOT NULL DEFAULT 0,
2999
- tokens_out BIGINT NOT NULL DEFAULT 0,
3000
- cache_read_tokens BIGINT NOT NULL DEFAULT 0,
3001
- cost_usd DECIMAL(10,6) NOT NULL DEFAULT 0,
3002
- wall_clock_ms BIGINT NOT NULL DEFAULT 0,
3003
- review_cycles INT NOT NULL DEFAULT 0,
3004
- stall_count INT NOT NULL DEFAULT 0,
3005
- result VARCHAR(30),
3006
- PRIMARY KEY (story_key, task_type, recorded_at)
3007
- )
3008
- `);
3009
- await adapter.exec(`
3010
- CREATE TABLE IF NOT EXISTS dispatch_log (
3011
- story_key VARCHAR(100) NOT NULL,
3012
- dispatched_at DATETIME NOT NULL,
3013
- branch VARCHAR(200),
3014
- worker_id VARCHAR(100),
3015
- result VARCHAR(30),
3016
- PRIMARY KEY (story_key, dispatched_at)
3017
- )
3018
- `);
3019
- await adapter.exec(`
3020
- CREATE TABLE IF NOT EXISTS build_results (
3021
- story_key VARCHAR(100) NOT NULL,
3022
- timestamp DATETIME NOT NULL,
3023
- command VARCHAR(500),
3024
- exit_code INT,
3025
- stdout_hash VARCHAR(64),
3026
- PRIMARY KEY (story_key, timestamp)
3027
- )
3028
- `);
3029
- await adapter.exec(`
3030
- CREATE TABLE IF NOT EXISTS review_verdicts (
3031
- story_key VARCHAR(100) NOT NULL,
3032
- timestamp DATETIME NOT NULL,
3033
- verdict VARCHAR(30),
3034
- issues_count INT NOT NULL DEFAULT 0,
3035
- notes TEXT,
3036
- PRIMARY KEY (story_key, timestamp)
3037
- )
3038
- `);
3039
- await adapter.exec(`
3040
- CREATE TABLE IF NOT EXISTS _schema_version (
3041
- version INT NOT NULL,
3042
- applied_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
3043
- description VARCHAR(500),
3044
- PRIMARY KEY (version)
3045
- )
3046
- `);
3047
- const seeds = [
3048
- [1, "Initial substrate state schema"],
3049
- [2, "Add turn_analysis table (Epic 27-4)"],
3050
- [3, "Add category_stats and consumer_stats tables (Epic 27-5)"],
3051
- [4, "Add recommendations table (Epic 27-7)"],
3052
- [5, "Add repo_map_symbols and repo_map_meta tables (Epic 28-2)"],
3053
- [6, "Add dependencies JSON column to repo_map_symbols (Epic 28-3)"],
3054
- [7, "Add wg_stories, story_dependencies tables and ready_stories view (Epic 31-1)"],
3055
- [8, "Add task_type, phase, dispatch_id columns to turn_analysis (Story 30-1)"],
3056
- [9, "Add dispatch_id, task_type, phase columns to efficiency_scores (Story 30-3)"]
3057
- ];
3058
- for (const [version, description] of seeds) try {
3059
- await adapter.exec(`INSERT IGNORE INTO _schema_version (version, description) VALUES (${version}, '${description.replace(/'/g, "''")}')`);
2999
+ for (const table of LEGACY_TABLES) try {
3000
+ await adapter.exec(`DROP TABLE IF EXISTS ${table}`);
3060
3001
  } catch {}
3061
3002
  }
3062
3003
 
@@ -11312,4 +11253,4 @@ async function callLLM(params) {
11312
11253
 
11313
11254
  //#endregion
11314
11255
  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, classifyVersionGap, 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, swallowDebug, tagRunAsBaseline, updateDecision, updatePipelineRun, updatePipelineRunConfig, upsertDecision, writeRunMetrics, writeStoryMetrics };
11315
- //# sourceMappingURL=dist-DnVfCiro.js.map
11256
+ //# sourceMappingURL=dist-Dy27RUJl.js.map
@@ -1,4 +1,4 @@
1
- import { AdtError } from "./dist-DnVfCiro.js";
1
+ import { AdtError } from "./dist-Dy27RUJl.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-7UL0-Lga.js.map
74
+ //# sourceMappingURL=errors-B6IWIdxG.js.map
@@ -1,3 +1,3 @@
1
- import { buildAuditLogEntry, buildBranchName, buildModificationDirective, buildPRBody, buildWorktreePath, createExperimenter, determineVerdict, resolvePromptFile } from "./dist-DnVfCiro.js";
1
+ import { buildAuditLogEntry, buildBranchName, buildModificationDirective, buildPRBody, buildWorktreePath, createExperimenter, determineVerdict, resolvePromptFile } from "./dist-Dy27RUJl.js";
2
2
 
3
3
  export { createExperimenter };
@@ -1,7 +1,7 @@
1
- import { DEFAULT_STALL_THRESHOLD_SECONDS, getAllDescendantPids, getAutoHealthData, inspectProcessTree, isOrchestratorProcessLine, registerHealthCommand, runHealthAction } from "./health-DmvwKjP5.js";
1
+ import { DEFAULT_STALL_THRESHOLD_SECONDS, getAllDescendantPids, getAutoHealthData, inspectProcessTree, isOrchestratorProcessLine, registerHealthCommand, runHealthAction } from "./health-KJ62gMft.js";
2
2
  import "./logger-KeHncl-f.js";
3
- import "./dist-DnVfCiro.js";
4
- import "./manifest-read-96wMXd5A.js";
3
+ import "./dist-Dy27RUJl.js";
4
+ import "./manifest-read-Pk6vQ-2e.js";
5
5
  import "./work-graph-repository-DZyJv5pV.js";
6
6
  import "./decisions-CzSIEeGP.js";
7
7
 
@@ -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-DnVfCiro.js";
3
- import { resolveMainRepoRoot, resolveRunManifest } from "./manifest-read-96wMXd5A.js";
2
+ import { DoltClient, DoltQueryError, createDatabaseAdapter$1 as createDatabaseAdapter, getLatestRun, getPipelineRunById, initSchema } from "./dist-Dy27RUJl.js";
3
+ import { resolveMainRepoRoot, resolveRunManifest } from "./manifest-read-Pk6vQ-2e.js";
4
4
  import { createRequire } from "module";
5
5
  import { dirname, join } from "path";
6
6
  import { existsSync, readFileSync } from "node:fs";
@@ -556,36 +556,12 @@ var DoltStateStore = class {
556
556
  }
557
557
  async initialize() {
558
558
  await this._client.connect();
559
- await this._runMigrations();
560
- await this.flush("substrate: schema migrations");
561
559
  log.debug("DoltStateStore initialized at %s", this._repoPath);
562
560
  }
563
561
  async close() {
564
562
  await this._client.close();
565
563
  }
566
564
  /**
567
- * Idempotent runtime migration: add `repo_map_symbols.dependencies` JSON column
568
- * if the table exists and the column doesn't. Skips silently when the table
569
- * is absent (fresh DB or non-Dolt env).
570
- */
571
- async _runMigrations() {
572
- try {
573
- const colRows = await this._client.query(`SHOW COLUMNS FROM repo_map_symbols LIKE 'dependencies'`);
574
- if (colRows.length === 0) {
575
- await this._client.query(`ALTER TABLE repo_map_symbols ADD COLUMN dependencies JSON`);
576
- log.info({
577
- component: "dolt-state",
578
- migration: "v5-to-v6",
579
- column: "dependencies",
580
- table: "repo_map_symbols"
581
- }, "Applied migration v5-to-v6: added dependencies column to repo_map_symbols");
582
- }
583
- } catch {
584
- log.debug("Skipping repo_map_symbols migration: table not yet created");
585
- }
586
- log.debug("Schema migrations applied");
587
- }
588
- /**
589
565
  * Commit pending Dolt changes on the current branch.
590
566
  * Callers can invoke this after a batch of writes for explicit durability.
591
567
  */
@@ -1231,4 +1207,4 @@ function registerHealthCommand(program, _version = "0.0.0", projectRoot = proces
1231
1207
 
1232
1208
  //#endregion
1233
1209
  export { BMAD_BASELINE_TOKENS_FULL, DEFAULT_STALL_THRESHOLD_SECONDS, DoltMergeConflict, FileStateStore, STOP_AFTER_VALID_PHASES, STORY_KEY_PATTERN$1 as STORY_KEY_PATTERN, SUBSTRATE_OWNED_SETTINGS_KEYS, VALID_PHASES, __commonJS, __require, __toESM, buildPipelineStatusOutput, createDatabaseAdapter$1 as createDatabaseAdapter, createDoltOperatorReader, createStateStore, findPackageRoot, formatOutput, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, inspectProcessTree, isOrchestratorProcessLine, parseDbTimestampAsUtc, registerHealthCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion, runHealthAction, validateStoryKey };
1234
- //# sourceMappingURL=health-DmvwKjP5.js.map
1210
+ //# sourceMappingURL=health-KJ62gMft.js.map
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-DnVfCiro.js";
3
+ import { AdapterRegistry, AdtError, ClaudeCodeAdapter, CodexCLIAdapter, ConfigError, ConfigIncompatibleFormatError, GeminiCLIAdapter } from "./dist-Dy27RUJl.js";
4
4
  import "./adapter-registry-DIcrxjH8.js";
5
- import { BudgetExceededError, GitError, RecoveryError, TaskConfigError, TaskGraphCycleError, TaskGraphError, TaskGraphIncompatibleFormatError, WorkerError, WorkerNotFoundError } from "./errors-7UL0-Lga.js";
5
+ import { BudgetExceededError, GitError, RecoveryError, TaskConfigError, TaskGraphCycleError, TaskGraphError, TaskGraphIncompatibleFormatError, WorkerError, WorkerNotFoundError } from "./errors-B6IWIdxG.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-96wMXd5A.js";
2
+ import { readCurrentRunId, resolveMainRepoRoot } from "./manifest-read-Pk6vQ-2e.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-El7WVSY2.js.map
183
+ //# sourceMappingURL=interactive-prompt-C3qr42Ed.js.map
@@ -1,5 +1,5 @@
1
1
  import { createLogger } from "./logger-KeHncl-f.js";
2
- import { LEARNING_FINDING, createDecision, getDecisionsByCategory } from "./dist-DnVfCiro.js";
2
+ import { LEARNING_FINDING, createDecision, getDecisionsByCategory } from "./dist-Dy27RUJl.js";
3
3
  import * as path$1 from "path";
4
4
  import { join } from "path";
5
5
  import { readFile } from "fs/promises";
@@ -5845,4 +5845,4 @@ async function resolveRunManifest(dbRoot, runId) {
5845
5845
 
5846
5846
  //#endregion
5847
5847
  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 };
5848
- //# sourceMappingURL=manifest-read-96wMXd5A.js.map
5848
+ //# sourceMappingURL=manifest-read-Pk6vQ-2e.js.map
@@ -1,6 +1,6 @@
1
1
  import "../../logger-KeHncl-f.js";
2
- import "../../dist-DnVfCiro.js";
3
- import "../../manifest-read-96wMXd5A.js";
4
- import { runInteractivePrompt } from "../../interactive-prompt-El7WVSY2.js";
2
+ import "../../dist-Dy27RUJl.js";
3
+ import "../../manifest-read-Pk6vQ-2e.js";
4
+ import { runInteractivePrompt } from "../../interactive-prompt-C3qr42Ed.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-DnVfCiro.js";
1
+ import { ModelRoutingConfigSchema, ProviderPolicySchema, RoutingConfigError, RoutingRecommender, RoutingResolver, RoutingTelemetry, RoutingTokenAccumulator, RoutingTuner, TASK_TYPE_PHASE_MAP, getModelTier, loadModelRoutingConfig } from "./dist-Dy27RUJl.js";
2
2
  import "./routing-DFxoKHDt.js";
3
3
 
4
4
  export { loadModelRoutingConfig };
@@ -1,14 +1,14 @@
1
- import "./health-DmvwKjP5.js";
1
+ import "./health-KJ62gMft.js";
2
2
  import "./logger-KeHncl-f.js";
3
3
  import "./helpers-CElYrONe.js";
4
- import "./dist-DnVfCiro.js";
5
- import { normalizeGraphSummaryToStatus, registerRunCommand, resolveMaxReviewCycles, resolveProbeAuthorStateIntegrating, runRunAction, wireNdjsonEmitter } from "./run-BONrtCkE.js";
6
- import "./manifest-read-96wMXd5A.js";
4
+ import "./dist-Dy27RUJl.js";
5
+ import { normalizeGraphSummaryToStatus, registerRunCommand, resolveMaxReviewCycles, resolveProbeAuthorStateIntegrating, runRunAction, wireNdjsonEmitter } from "./run-DM7ZJ1g9.js";
6
+ import "./manifest-read-Pk6vQ-2e.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-DblHY8se.js";
11
- import "./interactive-prompt-El7WVSY2.js";
11
+ import "./interactive-prompt-C3qr42Ed.js";
12
12
  import "./recovery-engine-BKGBeBnW.js";
13
13
 
14
14
  export { runRunAction };
@@ -1,11 +1,11 @@
1
- import { BMAD_BASELINE_TOKENS_FULL, DoltMergeConflict, FileStateStore, STOP_AFTER_VALID_PHASES, STORY_KEY_PATTERN, VALID_PHASES, __commonJS, __require, __toESM, buildPipelineStatusOutput, createDatabaseAdapter, formatOutput, formatPipelineSummary, formatTokenTelemetry, inspectProcessTree, parseDbTimestampAsUtc, validateStoryKey } from "./health-DmvwKjP5.js";
1
+ import { BMAD_BASELINE_TOKENS_FULL, DoltMergeConflict, FileStateStore, STOP_AFTER_VALID_PHASES, STORY_KEY_PATTERN, VALID_PHASES, __commonJS, __require, __toESM, buildPipelineStatusOutput, createDatabaseAdapter, formatOutput, formatPipelineSummary, formatTokenTelemetry, inspectProcessTree, parseDbTimestampAsUtc, validateStoryKey } from "./health-KJ62gMft.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, 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, detectInterfaceChanges, getArtifactByTypeForRun, getArtifactsByRun, getDecisionsByCategory, getDecisionsByPhase, getDecisionsByPhaseForRun, getLatestRun, getPipelineRunById, getRunMetrics, getRunningPipelineRuns, getStoryMetricsForRun, getTokenUsageSummary, initSchema, listRequirements, loadModelRoutingConfig, registerArtifact, swallowDebug, updatePipelineRun, updatePipelineRunConfig, upsertDecision, writeRunMetrics, writeStoryMetrics } from "./dist-DnVfCiro.js";
5
- import { FindingsInjector, RunManifest, RuntimeProbeListSchema, applyConfigToGraph, createDefaultVerificationPipeline, createGraphOrchestrator, createSdlcCodeReviewHandler, createSdlcCreateStoryHandler, createSdlcDevStoryHandler, createSdlcPhaseHandler, detectsEventDrivenAC, detectsStateIntegratingAC, extractTargetFilesFromStoryContent, renderFindings, resolveGraphPath, resolveMainRepoRoot, runAcTraceabilityCheck, runStaleVerificationRecovery } from "./manifest-read-96wMXd5A.js";
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, detectInterfaceChanges, getArtifactByTypeForRun, getArtifactsByRun, getDecisionsByCategory, getDecisionsByPhase, getDecisionsByPhaseForRun, getLatestRun, getPipelineRunById, getRunMetrics, getRunningPipelineRuns, getStoryMetricsForRun, getTokenUsageSummary, initSchema, listRequirements, loadModelRoutingConfig, registerArtifact, swallowDebug, updatePipelineRun, updatePipelineRunConfig, upsertDecision, writeRunMetrics, writeStoryMetrics } from "./dist-Dy27RUJl.js";
5
+ import { FindingsInjector, RunManifest, RuntimeProbeListSchema, applyConfigToGraph, createDefaultVerificationPipeline, createGraphOrchestrator, createSdlcCodeReviewHandler, createSdlcCreateStoryHandler, createSdlcDevStoryHandler, createSdlcPhaseHandler, detectsEventDrivenAC, detectsStateIntegratingAC, extractTargetFilesFromStoryContent, renderFindings, resolveGraphPath, resolveMainRepoRoot, runAcTraceabilityCheck, runStaleVerificationRecovery } from "./manifest-read-Pk6vQ-2e.js";
6
6
  import { WorkGraphRepository, detectCycles } from "./work-graph-repository-DZyJv5pV.js";
7
7
  import { deriveExitCode, routeDecision } from "./decision-router-DblHY8se.js";
8
- import { runInteractivePrompt } from "./interactive-prompt-El7WVSY2.js";
8
+ import { runInteractivePrompt } from "./interactive-prompt-C3qr42Ed.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";
@@ -47137,7 +47137,7 @@ async function runFullPipeline(options) {
47137
47137
  */
47138
47138
  async function emitPreDispatchVersionAdvisory(currentVersion) {
47139
47139
  if (process.env["SUBSTRATE_NO_UPDATE_CHECK"] === "1") return;
47140
- const { createVersionManager } = await import("./version-manager-impl-bWaGssmZ.js");
47140
+ const { createVersionManager } = await import("./version-manager-impl-DnnXTOS7.js");
47141
47141
  const vm = createVersionManager();
47142
47142
  const result = await vm.checkForUpdates(true);
47143
47143
  const gap = classifyVersionGap(currentVersion, result.latestVersion);
@@ -47234,4 +47234,4 @@ function registerRunCommand(program, version = "0.0.0", projectRoot = process.cw
47234
47234
 
47235
47235
  //#endregion
47236
47236
  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 };
47237
- //# sourceMappingURL=run-BONrtCkE.js.map
47237
+ //# sourceMappingURL=run-DM7ZJ1g9.js.map
@@ -1,4 +1,4 @@
1
- import { createVersionManager } from "./dist-DnVfCiro.js";
1
+ import { createVersionManager } from "./dist-Dy27RUJl.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-DalCYA_U.js.map
126
+ //# sourceMappingURL=upgrade-Cwzu8GX8.js.map
@@ -1,5 +1,5 @@
1
- import "./dist-DnVfCiro.js";
1
+ import "./dist-Dy27RUJl.js";
2
2
  import "./version-manager-impl-qFBiO4Eh.js";
3
- import { isGlobalInstall, registerUpgradeCommand, runUpgradeCommand } from "./upgrade-DalCYA_U.js";
3
+ import { isGlobalInstall, registerUpgradeCommand, runUpgradeCommand } from "./upgrade-Cwzu8GX8.js";
4
4
 
5
5
  export { isGlobalInstall, registerUpgradeCommand, runUpgradeCommand };
@@ -1,4 +1,4 @@
1
- import { VersionManagerImpl, createVersionManager } from "./dist-DnVfCiro.js";
1
+ import { VersionManagerImpl, createVersionManager } from "./dist-Dy27RUJl.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.97",
3
+ "version": "0.20.99",
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-DnVfCiro.js";
2
- import "./adapter-registry-DIcrxjH8.js";
3
-
4
- export { AdapterRegistry };