substrate-ai 0.20.82 → 0.20.84

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli/index.js CHANGED
@@ -3,7 +3,7 @@ import { FileStateStore, SUBSTRATE_OWNED_SETTINGS_KEYS, VALID_PHASES, buildPipel
3
3
  import { createLogger } from "../logger-KeHncl-f.js";
4
4
  import { createEventBus } from "../helpers-CElYrONe.js";
5
5
  import { AdapterRegistry, BudgetConfigSchema, CURRENT_CONFIG_FORMAT_VERSION, CURRENT_TASK_GRAPH_VERSION, ConfigError, CostTrackerConfigSchema, DEFAULT_CONFIG, DoltClient, DoltNotInstalled, GlobalSettingsSchema, InMemoryDatabaseAdapter, IngestionServer, MonitorDatabaseImpl, OPERATIONAL_FINDING, PartialGlobalSettingsSchema, PartialProviderConfigSchema, ProvidersSchema, RoutingRecommender, STORY_METRICS, TelemetryConfigSchema, addTokenUsage, aggregateTokenUsageForRun, checkDoltInstalled, compareRunMetrics, createAmendmentRun, createConfigSystem, createDecision, createDoltClient, createPipelineRun, getActiveDecisions, getAllCostEntriesFiltered, getBaselineRunMetrics, getDecisionsByCategory, getDecisionsByPhaseForRun, getLatestCompletedRun, getLatestRun, getPipelineRunById, getPlanningCostTotal, getRetryableEscalations, getRunMetrics, getRunningPipelineRuns, getSessionCostSummary, getSessionCostSummaryFiltered, getStoryMetricsForRun, getTokenUsageSummary, incrementRunRestarts, initSchema, initializeDolt, listRunMetrics, loadParentRunDecisions, supersedeDecision, swallowDebug, tagRunAsBaseline, updatePipelineRun } from "../dist-DCBSXUiX.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-DsETRdG0.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-DsiQdegK.js";
7
7
  import "../adapter-registry-DIcrxjH8.js";
8
8
  import { RunManifest, SupervisorLock, ZERO_FINDINGS_BY_AUTHOR, ZERO_FINDING_COUNTS, ZERO_PROBE_AUTHOR_METRICS, aggregateProbeAuthorMetrics, parseRuntimeProbes, readCurrentRunId, resolveMainRepoRoot, resolveRunManifest, rollupFindingCounts, rollupFindingsByAuthor, rollupProbeAuthorByClass, rollupProbeAuthorMetrics, runAcTraceabilityCheck } from "../manifest-read-Boipz5aP.js";
9
9
  import "../errors-D7xD-utp.js";
@@ -8129,7 +8129,7 @@ async function handleStallRecovery(health, state, config, deps, io) {
8129
8129
  const newRestartCount = state.restartCount + 1;
8130
8130
  if (health.run_id !== null) {
8131
8131
  await incrementRestarts(health.run_id, projectRoot);
8132
- RunManifest.open(health.run_id, join(projectRoot, ".substrate", "runs")).update({ restart_count: newRestartCount }).catch(() => {});
8132
+ RunManifest.open(health.run_id, join(projectRoot, ".substrate", "runs")).update({ restart_count: newRestartCount }).catch(swallowDebug("supervisor-restart"));
8133
8133
  }
8134
8134
  emitEvent({
8135
8135
  type: "supervisor:restart",
@@ -8242,7 +8242,7 @@ async function runSupervisorAction(options, deps = {}) {
8242
8242
  await manifest.update({ cli_flags: {
8243
8243
  ...existingFlags,
8244
8244
  stall_thresholds: DEFAULT_STALL_THRESHOLDS
8245
- } }).catch(() => {});
8245
+ } }).catch(swallowDebug("supervisor-cli-flags"));
8246
8246
  stallThresholds = DEFAULT_STALL_THRESHOLDS;
8247
8247
  }
8248
8248
  } catch {}
@@ -8436,7 +8436,7 @@ async function runSupervisorAction(options, deps = {}) {
8436
8436
  await initSchema(expAdapter);
8437
8437
  const { runRunAction: runPipeline } = await import(
8438
8438
  /* @vite-ignore */
8439
- "../run-DhRYsOEH.js"
8439
+ "../run-C3XJLgze.js"
8440
8440
  );
8441
8441
  const runStoryFn = async (opts) => {
8442
8442
  const exitCode = await runPipeline({
@@ -11421,7 +11421,7 @@ async function runCancelAction(options) {
11421
11421
  const runningRuns = await getRunningPipelineRuns(adapter);
11422
11422
  for (const run of runningRuns) {
11423
11423
  await updatePipelineRun(adapter, run.id, { status: "stopped" });
11424
- RunManifest.open(run.id, join(dbRoot, "runs")).update({ run_status: "stopped" }).catch(() => {});
11424
+ RunManifest.open(run.id, join(dbRoot, "runs")).update({ run_status: "stopped" }).catch(swallowDebug("manifest-stop"));
11425
11425
  if (outputFormat === "human") process.stdout.write(`Marked pipeline run ${run.id} as stopped.\n`);
11426
11426
  }
11427
11427
  } finally {
@@ -12730,7 +12730,7 @@ async function runReconcileFromDiskAction(options) {
12730
12730
  } catch {
12731
12731
  logger$2.debug("Dolt fallback failed during run-id resolution");
12732
12732
  } finally {
12733
- await probeAdapter.close().catch(() => {});
12733
+ await probeAdapter.close().catch(swallowDebug("reconcile-probe-close"));
12734
12734
  }
12735
12735
  }
12736
12736
  if (!resolvedRunId) {
@@ -12872,7 +12872,7 @@ async function runReconcileFromDiskAction(options) {
12872
12872
  affectedStories: reconcilableRecords.map((r) => r.storyKey)
12873
12873
  }, "reconcile-from-disk: Dolt update complete");
12874
12874
  } finally {
12875
- await adapter.close().catch(() => {});
12875
+ await adapter.close().catch(swallowDebug("reconcile-adapter-close"));
12876
12876
  }
12877
12877
  const durationMs = Date.now() - startMs;
12878
12878
  const affectedStoryKeys = reconcilableRecords.map((r) => r.storyKey);
@@ -13359,7 +13359,7 @@ async function resolveLatestRunId(dbRoot) {
13359
13359
  logger$1.debug("Dolt fallback failed during run-id resolution");
13360
13360
  return null;
13361
13361
  } finally {
13362
- await probeAdapter.close().catch(() => {});
13362
+ await probeAdapter.close().catch(swallowDebug("report-probe-close"));
13363
13363
  }
13364
13364
  }
13365
13365
  async function runReportAction(options) {
@@ -2,7 +2,7 @@ import "./health-CuKzY0Fn.js";
2
2
  import "./logger-KeHncl-f.js";
3
3
  import "./helpers-CElYrONe.js";
4
4
  import "./dist-DCBSXUiX.js";
5
- import { normalizeGraphSummaryToStatus, registerRunCommand, resolveMaxReviewCycles, resolveProbeAuthorStateIntegrating, runRunAction, wireNdjsonEmitter } from "./run-DsETRdG0.js";
5
+ import { normalizeGraphSummaryToStatus, registerRunCommand, resolveMaxReviewCycles, resolveProbeAuthorStateIntegrating, runRunAction, wireNdjsonEmitter } from "./run-DsiQdegK.js";
6
6
  import "./manifest-read-Boipz5aP.js";
7
7
  import "./routing-DFxoKHDt.js";
8
8
  import "./work-graph-repository-DZyJv5pV.js";
@@ -339,6 +339,17 @@ async function getMergedFiles(cwd) {
339
339
 
340
340
  //#endregion
341
341
  //#region packages/core/dist/git/git-worktree-manager-impl.js
342
+ /**
343
+ * Branch name prefix for substrate per-story branches.
344
+ *
345
+ * Exported as the canonical source of truth so consumers (orchestrator,
346
+ * integration tests, tooling) can compose branch names without
347
+ * independently encoding the prefix. v0.20.82 production bug:
348
+ * `orchestrator-impl.ts:4290` hardcoded `substrate/story-${storyKey}`
349
+ * while this module created `substrate/task-${taskId}` — the resulting
350
+ * merge-to-main looked at a non-existent branch. Recurrence prevention:
351
+ * all branch-name construction MUST import this constant.
352
+ */
342
353
  const BRANCH_PREFIX = "substrate/story-";
343
354
  const DEFAULT_WORKTREE_BASE = ".substrate-worktrees";
344
355
  var GitWorktreeManagerImpl = class {
@@ -15389,7 +15400,7 @@ function createImplementationOrchestrator(deps) {
15389
15400
  modifiedInterfaces: icResult.modifiedInterfaces,
15390
15401
  potentiallyAffectedTests: icResult.potentiallyAffectedTests
15391
15402
  })
15392
- }).catch(() => {});
15403
+ }).catch(swallowDebug("orchestrator-best-effort"));
15393
15404
  }
15394
15405
  }
15395
15406
  } catch {}
@@ -16015,7 +16026,7 @@ function createImplementationOrchestrator(deps) {
16015
16026
  }, "Test expansion failed — story verdict unchanged");
16016
16027
  }
16017
16028
  if (!noWorktree && _worktreeManager !== void 0 && _orchestratorStartBranch !== void 0 && projectRoot !== void 0) {
16018
- const branchName = `substrate/story-${storyKey}`;
16029
+ const branchName = `${BRANCH_PREFIX}${storyKey}`;
16019
16030
  logger$27.info({
16020
16031
  storyKey,
16021
16032
  branchName,
@@ -46935,7 +46946,7 @@ async function runFullPipeline(options) {
46935
46946
  const stopCountRows = await adapter.query(`SELECT COUNT(*) as cnt FROM decisions WHERE pipeline_run_id = ?`, [runId]);
46936
46947
  const decisionsCount$1 = stopCountRows[0]?.cnt ?? 0;
46937
46948
  await updatePipelineRun(adapter, runId, { status: "stopped" });
46938
- RunManifest.open(runId, join(dbDir, "runs")).update({ run_status: "stopped" }).catch(() => {});
46949
+ RunManifest.open(runId, join(dbDir, "runs")).update({ run_status: "stopped" }).catch(swallowDebug("run-manifest-stop"));
46939
46950
  const phaseStartedAt = new Date(startedAt).toISOString();
46940
46951
  const phaseCompletedAt = new Date().toISOString();
46941
46952
  const summary = formatPhaseCompletionSummary({
@@ -47125,4 +47136,4 @@ function registerRunCommand(program, version = "0.0.0", projectRoot = process.cw
47125
47136
 
47126
47137
  //#endregion
47127
47138
  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 };
47128
- //# sourceMappingURL=run-DsETRdG0.js.map
47139
+ //# sourceMappingURL=run-DsiQdegK.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "substrate-ai",
3
- "version": "0.20.82",
3
+ "version": "0.20.84",
4
4
  "description": "Substrate — multi-agent orchestration daemon for AI coding agents",
5
5
  "type": "module",
6
6
  "license": "MIT",