substrate-ai 0.20.96 → 0.20.98

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-CR_3fEG2.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-BxmI1iiM.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-OOK3rjFF.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-Wnxr9Iv7.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-alLrJMOI.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-CR_3fEG2.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-CrxAXEBv.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-BQ0o-M0u.js";
9
- import "../errors-B7lyO1vu.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-6xIFhnb7.js";
9
+ import "../errors-Bd-WQnjg.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-B92MvP8c.js";
14
+ import "../interactive-prompt-CZkKFDXD.js";
15
15
  import "../recovery-engine-BKGBeBnW.js";
16
16
  import "../version-manager-impl-qFBiO4Eh.js";
17
- import { registerUpgradeCommand } from "../upgrade-Cm0n0duM.js";
17
+ import { registerUpgradeCommand } from "../upgrade-BVXcLYQL.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-9KV5kVc6.js");
6890
+ const { inspectProcessTree: inspectProcessTree$1 } = await import("../health-B2rUCaye.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-vPF5Y1yp.js"
7838
+ "../adapter-registry-CAw8hY6r.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-CUgfDVXi.js"
8405
+ "../experimenter-BUdyuKsL.js"
8406
8406
  );
8407
8407
  const { getLatestRun: getLatest } = await import(
8408
8408
  /* @vite-ignore */
8409
- "../decisions-x2lbWuTV.js"
8409
+ "../decisions-DdTaohqm.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-5iG8suoO.js"
8419
+ "../run-CiQed8OE.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-Ih1er-pc.js");
8947
+ const { loadModelRoutingConfig } = await import("../routing-B8rnc4Ns.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-BjTy8F3p.js").then(async () => {
13330
- const { createVersionManager } = await import("../version-manager-impl-C27Gxmkt.js");
13329
+ import("../upgrade-BxiW5XLZ.js").then(async () => {
13330
+ const { createVersionManager } = await import("../version-manager-impl-DUxNv_A5.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-Wnxr9Iv7.js";
1
+ import { addTokenUsage, createDecision, createPipelineRun, createRequirement, getArtifactByTypeForRun, getArtifactsByRun, getDecisionsByCategory, getDecisionsByPhase, getDecisionsByPhaseForRun, getLatestRun, getPipelineRunById, getRunningPipelineRuns, getTokenUsageSummary, listRequirements, registerArtifact, updateDecision, updatePipelineRun, updatePipelineRunConfig, upsertDecision } from "./dist-CR_3fEG2.js";
2
2
  import "./decisions-CzSIEeGP.js";
3
3
 
4
4
  export { getLatestRun };
@@ -2570,17 +2570,6 @@ function createDatabaseAdapter(config = { backend: "auto" }, doltClientFactory)
2570
2570
 
2571
2571
  //#endregion
2572
2572
  //#region packages/core/dist/persistence/core-schema.js
2573
- /**
2574
- * Core schema — orchestrator session/task execution model.
2575
- *
2576
- * Owns: sessions, tasks, task_dependencies, execution_log, cost_entries,
2577
- * session_signals, plans, plan_versions, schema_migrations + ready_tasks view
2578
- * + session_cost_summary view.
2579
- *
2580
- * Extracted from `schema.ts` in Ship 5 (2026-05). DDL preserved byte-for-byte
2581
- * from the pre-split version — any column/type/default change must be a
2582
- * deliberate migration, not an accidental drift.
2583
- */
2584
2573
  async function initCoreSchema(adapter) {
2585
2574
  await adapter.exec(`
2586
2575
  CREATE TABLE IF NOT EXISTS sessions (
@@ -2779,16 +2768,6 @@ async function initCoreViews(adapter) {
2779
2768
 
2780
2769
  //#endregion
2781
2770
  //#region packages/core/dist/persistence/pipeline-schema.js
2782
- /**
2783
- * Pipeline schema — pipeline-run state and metrics.
2784
- *
2785
- * Owns: pipeline_runs, decisions, requirements, constraints, artifacts,
2786
- * token_usage, run_metrics, story_metrics + the mesh-telemetry ALTER for
2787
- * story_metrics.agent/model/dispatch columns.
2788
- *
2789
- * Extracted from `schema.ts` in Ship 5 (2026-05). DDL preserved byte-for-byte
2790
- * from the pre-split version.
2791
- */
2792
2771
  async function initPipelineSchema(adapter) {
2793
2772
  await adapter.exec(`
2794
2773
  CREATE TABLE IF NOT EXISTS pipeline_runs (
@@ -2928,18 +2907,6 @@ async function initPipelineSchema(adapter) {
2928
2907
 
2929
2908
  //#endregion
2930
2909
  //#region packages/core/dist/persistence/monitor-schema.js
2931
- /**
2932
- * Monitor schema — task-level metrics + routing recommendations.
2933
- *
2934
- * Owns: task_metrics, performance_aggregates, routing_recommendations.
2935
- *
2936
- * Note: these same tables are ALSO defined by `monitor-database.ts` for a
2937
- * SEPARATE database (`.substrate/monitor.db`). That instance is managed
2938
- * independently via the synchronous SyncAdapter API; the DDL here applies
2939
- * to the main persistence DB only.
2940
- *
2941
- * Extracted from `schema.ts` in Ship 5 (2026-05). DDL preserved byte-for-byte.
2942
- */
2943
2910
  async function initMonitorSchema(adapter) {
2944
2911
  await adapter.exec(`
2945
2912
  CREATE TABLE IF NOT EXISTS task_metrics (
@@ -2996,22 +2963,10 @@ async function initMonitorSchema(adapter) {
2996
2963
 
2997
2964
  //#endregion
2998
2965
  //#region packages/core/dist/persistence/state-schema.js
2999
- /**
3000
- * Legacy state schema — pre-2026-Q1 orchestrator state tables.
3001
- *
3002
- * Owns: stories, contracts, metrics, dispatch_log, build_results,
3003
- * review_verdicts, _schema_version + the 9 INSERT IGNORE seed rows.
3004
- *
3005
- * Empirical status: these tables had ZERO rows in every audited production
3006
- * project (ynab, quant). The orchestrator wires `FileStateStore` (in-memory),
3007
- * not DoltStateStore — so the write code paths that target these tables never
3008
- * fired in production. Ship 1 excised the corresponding DoltStateStore CRUD
3009
- * methods; Ship 3 ported the DDL out of schema.sql into initSchema; Ship 5
3010
- * (this module) moves them to a dedicated file.
3011
- *
3012
- * Ship 7 will decide their final fate (keep, delete, or repurpose).
3013
- */
3014
2966
  async function initStateSchema(adapter) {
2967
+ try {
2968
+ await adapter.exec("DROP TABLE IF EXISTS _schema_version");
2969
+ } catch {}
3015
2970
  await adapter.exec(`
3016
2971
  CREATE TABLE IF NOT EXISTS stories (
3017
2972
  story_key VARCHAR(100) NOT NULL,
@@ -3084,44 +3039,10 @@ async function initStateSchema(adapter) {
3084
3039
  PRIMARY KEY (story_key, timestamp)
3085
3040
  )
3086
3041
  `);
3087
- await adapter.exec(`
3088
- CREATE TABLE IF NOT EXISTS _schema_version (
3089
- version INT NOT NULL,
3090
- applied_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
3091
- description VARCHAR(500),
3092
- PRIMARY KEY (version)
3093
- )
3094
- `);
3095
- const seeds = [
3096
- [1, "Initial substrate state schema"],
3097
- [2, "Add turn_analysis table (Epic 27-4)"],
3098
- [3, "Add category_stats and consumer_stats tables (Epic 27-5)"],
3099
- [4, "Add recommendations table (Epic 27-7)"],
3100
- [5, "Add repo_map_symbols and repo_map_meta tables (Epic 28-2)"],
3101
- [6, "Add dependencies JSON column to repo_map_symbols (Epic 28-3)"],
3102
- [7, "Add wg_stories, story_dependencies tables and ready_stories view (Epic 31-1)"],
3103
- [8, "Add task_type, phase, dispatch_id columns to turn_analysis (Story 30-1)"],
3104
- [9, "Add dispatch_id, task_type, phase columns to efficiency_scores (Story 30-3)"]
3105
- ];
3106
- for (const [version, description] of seeds) try {
3107
- await adapter.exec(`INSERT IGNORE INTO _schema_version (version, description) VALUES (${version}, '${description.replace(/'/g, "''")}')`);
3108
- } catch {}
3109
3042
  }
3110
3043
 
3111
3044
  //#endregion
3112
3045
  //#region packages/core/dist/persistence/repo-map-schema.js
3113
- /**
3114
- * Repo-map schema — code-symbol index used by the context-engineering layer.
3115
- *
3116
- * Owns: repo_map_symbols, repo_map_meta + their indexes.
3117
- *
3118
- * Consumed by `src/modules/repo-map/storage.ts` (~10 query sites). Production
3119
- * runtime DDL was previously in `dolt-store.ts._runMigrations` (the v5→v6
3120
- * dependencies-column ALTER, which still runs there for repos predating
3121
- * v0.20.94 — Ship 3 ported the CREATE TABLE here from schema.sql).
3122
- *
3123
- * Extracted from `schema.ts` in Ship 5 (2026-05).
3124
- */
3125
3046
  async function initRepoMapSchema(adapter) {
3126
3047
  await adapter.exec(`
3127
3048
  CREATE TABLE IF NOT EXISTS repo_map_symbols (
@@ -3152,17 +3073,6 @@ async function initRepoMapSchema(adapter) {
3152
3073
 
3153
3074
  //#endregion
3154
3075
  //#region packages/core/dist/persistence/telemetry-schema.js
3155
- /**
3156
- * Telemetry schema — per-turn analysis + efficiency scoring + recommendations.
3157
- *
3158
- * Owns: turn_analysis, efficiency_scores, recommendations, category_stats,
3159
- * consumer_stats + their indexes + the Story 30-1/30-3 ALTER migrations
3160
- * (task_type/phase/dispatch_id columns on turn_analysis and efficiency_scores).
3161
- *
3162
- * Extracted from `schema.ts` in Ship 5 (2026-05). Pre-Ship-4 these tables had
3163
- * DDL in 3 places (schema.sql, schema.ts, adapter-persistence.ts). Ship 4
3164
- * consolidated to schema.ts; Ship 5 moves them to this dedicated module.
3165
- */
3166
3076
  async function initTelemetrySchema(adapter) {
3167
3077
  await adapter.exec(`
3168
3078
  CREATE TABLE IF NOT EXISTS turn_analysis (
@@ -3274,24 +3184,6 @@ async function initTelemetrySchema(adapter) {
3274
3184
 
3275
3185
  //#endregion
3276
3186
  //#region packages/core/dist/persistence/work-graph-schema.js
3277
- /**
3278
- * Work-graph schema — planning-level story nodes + dependencies + ready view.
3279
- *
3280
- * Owns: wg_stories, story_dependencies, ready_stories (view) + the v0.12.0
3281
- * `created_at` idempotent ALTER migration.
3282
- *
3283
- * Extracted from `schema.ts` in Ship 5 (2026-05). Previously the schema lived
3284
- * in BOTH `packages/core/src/persistence/schema.ts` (initSchema) AND
3285
- * `src/modules/work-graph/schema.ts` (exported DDL constants). Ship 5
3286
- * consolidates to this single module; the legacy constants file is now a
3287
- * thin re-export shim.
3288
- *
3289
- * Composition root in initSchema MUST call this AFTER all dependent tables
3290
- * exist (currently no dependencies — wg_stories and story_dependencies are
3291
- * standalone). The `ready_stories` view depends on wg_stories +
3292
- * story_dependencies, both created in this module, so the function is
3293
- * fully self-contained.
3294
- */
3295
3187
  async function initWorkGraphSchema(adapter) {
3296
3188
  await adapter.exec(`
3297
3189
  CREATE TABLE IF NOT EXISTS wg_stories (
@@ -11401,4 +11293,4 @@ async function callLLM(params) {
11401
11293
 
11402
11294
  //#endregion
11403
11295
  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 };
11404
- //# sourceMappingURL=dist-Wnxr9Iv7.js.map
11296
+ //# sourceMappingURL=dist-CR_3fEG2.js.map
@@ -1,4 +1,4 @@
1
- import { AdtError } from "./dist-Wnxr9Iv7.js";
1
+ import { AdtError } from "./dist-CR_3fEG2.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-B7lyO1vu.js.map
74
+ //# sourceMappingURL=errors-Bd-WQnjg.js.map
@@ -1,3 +1,3 @@
1
- import { buildAuditLogEntry, buildBranchName, buildModificationDirective, buildPRBody, buildWorktreePath, createExperimenter, determineVerdict, resolvePromptFile } from "./dist-Wnxr9Iv7.js";
1
+ import { buildAuditLogEntry, buildBranchName, buildModificationDirective, buildPRBody, buildWorktreePath, createExperimenter, determineVerdict, resolvePromptFile } from "./dist-CR_3fEG2.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-BxmI1iiM.js";
1
+ import { DEFAULT_STALL_THRESHOLD_SECONDS, getAllDescendantPids, getAutoHealthData, inspectProcessTree, isOrchestratorProcessLine, registerHealthCommand, runHealthAction } from "./health-OOK3rjFF.js";
2
2
  import "./logger-KeHncl-f.js";
3
- import "./dist-Wnxr9Iv7.js";
4
- import "./manifest-read-BQ0o-M0u.js";
3
+ import "./dist-CR_3fEG2.js";
4
+ import "./manifest-read-6xIFhnb7.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-Wnxr9Iv7.js";
3
- import { resolveMainRepoRoot, resolveRunManifest } from "./manifest-read-BQ0o-M0u.js";
2
+ import { DoltClient, DoltQueryError, createDatabaseAdapter$1 as createDatabaseAdapter, getLatestRun, getPipelineRunById, initSchema } from "./dist-CR_3fEG2.js";
3
+ import { resolveMainRepoRoot, resolveRunManifest } from "./manifest-read-6xIFhnb7.js";
4
4
  import { createRequire } from "module";
5
5
  import { dirname, join } from "path";
6
6
  import { existsSync, readFileSync } from "node:fs";
@@ -1231,4 +1231,4 @@ function registerHealthCommand(program, _version = "0.0.0", projectRoot = proces
1231
1231
 
1232
1232
  //#endregion
1233
1233
  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-BxmI1iiM.js.map
1234
+ //# sourceMappingURL=health-OOK3rjFF.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-Wnxr9Iv7.js";
3
+ import { AdapterRegistry, AdtError, ClaudeCodeAdapter, CodexCLIAdapter, ConfigError, ConfigIncompatibleFormatError, GeminiCLIAdapter } from "./dist-CR_3fEG2.js";
4
4
  import "./adapter-registry-DIcrxjH8.js";
5
- import { BudgetExceededError, GitError, RecoveryError, TaskConfigError, TaskGraphCycleError, TaskGraphError, TaskGraphIncompatibleFormatError, WorkerError, WorkerNotFoundError } from "./errors-B7lyO1vu.js";
5
+ import { BudgetExceededError, GitError, RecoveryError, TaskConfigError, TaskGraphCycleError, TaskGraphError, TaskGraphIncompatibleFormatError, WorkerError, WorkerNotFoundError } from "./errors-Bd-WQnjg.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-BQ0o-M0u.js";
2
+ import { readCurrentRunId, resolveMainRepoRoot } from "./manifest-read-6xIFhnb7.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-B92MvP8c.js.map
183
+ //# sourceMappingURL=interactive-prompt-CZkKFDXD.js.map
@@ -1,5 +1,5 @@
1
1
  import { createLogger } from "./logger-KeHncl-f.js";
2
- import { LEARNING_FINDING, createDecision, getDecisionsByCategory } from "./dist-Wnxr9Iv7.js";
2
+ import { LEARNING_FINDING, createDecision, getDecisionsByCategory } from "./dist-CR_3fEG2.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-BQ0o-M0u.js.map
5848
+ //# sourceMappingURL=manifest-read-6xIFhnb7.js.map
@@ -1,6 +1,6 @@
1
1
  import "../../logger-KeHncl-f.js";
2
- import "../../dist-Wnxr9Iv7.js";
3
- import "../../manifest-read-BQ0o-M0u.js";
4
- import { runInteractivePrompt } from "../../interactive-prompt-B92MvP8c.js";
2
+ import "../../dist-CR_3fEG2.js";
3
+ import "../../manifest-read-6xIFhnb7.js";
4
+ import { runInteractivePrompt } from "../../interactive-prompt-CZkKFDXD.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-Wnxr9Iv7.js";
1
+ import { ModelRoutingConfigSchema, ProviderPolicySchema, RoutingConfigError, RoutingRecommender, RoutingResolver, RoutingTelemetry, RoutingTokenAccumulator, RoutingTuner, TASK_TYPE_PHASE_MAP, getModelTier, loadModelRoutingConfig } from "./dist-CR_3fEG2.js";
2
2
  import "./routing-DFxoKHDt.js";
3
3
 
4
4
  export { loadModelRoutingConfig };
@@ -1,14 +1,14 @@
1
- import "./health-BxmI1iiM.js";
1
+ import "./health-OOK3rjFF.js";
2
2
  import "./logger-KeHncl-f.js";
3
3
  import "./helpers-CElYrONe.js";
4
- import "./dist-Wnxr9Iv7.js";
5
- import { normalizeGraphSummaryToStatus, registerRunCommand, resolveMaxReviewCycles, resolveProbeAuthorStateIntegrating, runRunAction, wireNdjsonEmitter } from "./run-alLrJMOI.js";
6
- import "./manifest-read-BQ0o-M0u.js";
4
+ import "./dist-CR_3fEG2.js";
5
+ import { normalizeGraphSummaryToStatus, registerRunCommand, resolveMaxReviewCycles, resolveProbeAuthorStateIntegrating, runRunAction, wireNdjsonEmitter } from "./run-CrxAXEBv.js";
6
+ import "./manifest-read-6xIFhnb7.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-B92MvP8c.js";
11
+ import "./interactive-prompt-CZkKFDXD.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-BxmI1iiM.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-OOK3rjFF.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-Wnxr9Iv7.js";
5
- import { FindingsInjector, RunManifest, RuntimeProbeListSchema, applyConfigToGraph, createDefaultVerificationPipeline, createGraphOrchestrator, createSdlcCodeReviewHandler, createSdlcCreateStoryHandler, createSdlcDevStoryHandler, createSdlcPhaseHandler, detectsEventDrivenAC, detectsStateIntegratingAC, extractTargetFilesFromStoryContent, renderFindings, resolveGraphPath, resolveMainRepoRoot, runAcTraceabilityCheck, runStaleVerificationRecovery } from "./manifest-read-BQ0o-M0u.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-CR_3fEG2.js";
5
+ import { FindingsInjector, RunManifest, RuntimeProbeListSchema, applyConfigToGraph, createDefaultVerificationPipeline, createGraphOrchestrator, createSdlcCodeReviewHandler, createSdlcCreateStoryHandler, createSdlcDevStoryHandler, createSdlcPhaseHandler, detectsEventDrivenAC, detectsStateIntegratingAC, extractTargetFilesFromStoryContent, renderFindings, resolveGraphPath, resolveMainRepoRoot, runAcTraceabilityCheck, runStaleVerificationRecovery } from "./manifest-read-6xIFhnb7.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-B92MvP8c.js";
8
+ import { runInteractivePrompt } from "./interactive-prompt-CZkKFDXD.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-C27Gxmkt.js");
47140
+ const { createVersionManager } = await import("./version-manager-impl-DUxNv_A5.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-alLrJMOI.js.map
47237
+ //# sourceMappingURL=run-CrxAXEBv.js.map
@@ -1,4 +1,4 @@
1
- import { createVersionManager } from "./dist-Wnxr9Iv7.js";
1
+ import { createVersionManager } from "./dist-CR_3fEG2.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-Cm0n0duM.js.map
126
+ //# sourceMappingURL=upgrade-BVXcLYQL.js.map
@@ -1,5 +1,5 @@
1
- import "./dist-Wnxr9Iv7.js";
1
+ import "./dist-CR_3fEG2.js";
2
2
  import "./version-manager-impl-qFBiO4Eh.js";
3
- import { isGlobalInstall, registerUpgradeCommand, runUpgradeCommand } from "./upgrade-Cm0n0duM.js";
3
+ import { isGlobalInstall, registerUpgradeCommand, runUpgradeCommand } from "./upgrade-BVXcLYQL.js";
4
4
 
5
5
  export { isGlobalInstall, registerUpgradeCommand, runUpgradeCommand };
@@ -1,4 +1,4 @@
1
- import { VersionManagerImpl, createVersionManager } from "./dist-Wnxr9Iv7.js";
1
+ import { VersionManagerImpl, createVersionManager } from "./dist-CR_3fEG2.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.96",
3
+ "version": "0.20.98",
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-Wnxr9Iv7.js";
2
- import "./adapter-registry-DIcrxjH8.js";
3
-
4
- export { AdapterRegistry };