substrate-ai 0.19.22 → 0.19.24

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
@@ -4,7 +4,7 @@ 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, IngestionServer, MonitorDatabaseImpl, OPERATIONAL_FINDING, PartialGlobalSettingsSchema, PartialProviderConfigSchema, ProvidersSchema, RoutingRecommender, STORY_METRICS, TelemetryConfigSchema, addTokenUsage, aggregateTokenUsageForRun, checkDoltInstalled, compareRunMetrics, createAmendmentRun, createConfigSystem, createDecision, createDoltClient, createPipelineRun, getActiveDecisions, getAllCostEntriesFiltered, getBaselineRunMetrics, getDecisionsByCategory, getDecisionsByPhaseForRun, getLatestCompletedRun, getLatestRun, getPipelineRunById, getPlanningCostTotal, getRetryableEscalations, getRunMetrics, getRunningPipelineRuns, getSessionCostSummary, getSessionCostSummaryFiltered, getStoryMetricsForRun, getTokenUsageSummary, incrementRunRestarts, initSchema, initializeDolt, listRunMetrics, loadParentRunDecisions, supersedeDecision, tagRunAsBaseline, updatePipelineRun } from "../dist-DmhbWZ0f.js";
6
6
  import "../adapter-registry-DXLMTmfD.js";
7
- import { AdapterTelemetryPersistence, AppError, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, EpicIngester, GitClient, GrammarLoader, RepoMapInjector, RepoMapModule, RepoMapQueryEngine, RepoMapStorage, SymbolParser, createContextCompiler, createDispatcher, createEventEmitter, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStopAfterGate, createTelemetryAdvisor, formatPhaseCompletionSummary, getFactoryRunSummaries, getScenarioResultsForRun, getTwinRunsForRun, listGraphRuns, registerExportCommand, registerFactoryCommand, registerRunCommand, registerScenariosCommand, resolveStoryKeys, runAnalysisPhase, runPlanningPhase, runSolutioningPhase, validateStopAfterFromConflict } from "../run-DSj4ebow.js";
7
+ import { AdapterTelemetryPersistence, AppError, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, EpicIngester, GitClient, GrammarLoader, RepoMapInjector, RepoMapModule, RepoMapQueryEngine, RepoMapStorage, SymbolParser, createContextCompiler, createDispatcher, createEventEmitter, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStopAfterGate, createTelemetryAdvisor, formatPhaseCompletionSummary, getFactoryRunSummaries, getScenarioResultsForRun, getTwinRunsForRun, listGraphRuns, registerExportCommand, registerFactoryCommand, registerRunCommand, registerScenariosCommand, resolveStoryKeys, runAnalysisPhase, runPlanningPhase, runSolutioningPhase, validateStopAfterFromConflict } from "../run-BO_GDvvR.js";
8
8
  import "../errors-CrFWBvB4.js";
9
9
  import "../routing-CcBOCuC9.js";
10
10
  import "../decisions-C0pz9Clx.js";
@@ -1304,13 +1304,23 @@ async function detectSingleProjectStack(dir) {
1304
1304
  }
1305
1305
  if (marker.file === "pyproject.toml") {
1306
1306
  const hasPoetry = await fileExists(path$1.join(dir, "poetry.lock"));
1307
+ if (hasPoetry) return {
1308
+ path: dir,
1309
+ language: "python",
1310
+ buildTool: "poetry",
1311
+ buildCommand: "poetry build",
1312
+ testCommand: "poetry run pytest",
1313
+ installCommand: "poetry add <package>"
1314
+ };
1315
+ const hasVenv = await fileExists(path$1.join(dir, ".venv", "bin", "activate"));
1316
+ const venvPrefix = hasVenv ? "source .venv/bin/activate && " : "";
1307
1317
  return {
1308
1318
  path: dir,
1309
1319
  language: "python",
1310
- buildTool: hasPoetry ? "poetry" : "pip",
1311
- buildCommand: hasPoetry ? "poetry build" : "pip install -e .",
1312
- testCommand: "pytest",
1313
- installCommand: hasPoetry ? "poetry add <package>" : "pip install <package>"
1320
+ buildTool: "pip",
1321
+ buildCommand: `${venvPrefix}pip install -e .`,
1322
+ testCommand: `${venvPrefix}pytest`,
1323
+ installCommand: `${venvPrefix}pip install <package>`
1314
1324
  };
1315
1325
  }
1316
1326
  return {
@@ -4561,7 +4571,7 @@ async function runSupervisorAction(options, deps = {}) {
4561
4571
  await initSchema(expAdapter);
4562
4572
  const { runRunAction: runPipeline } = await import(
4563
4573
  /* @vite-ignore */
4564
- "../run-Zkr2v7uB.js"
4574
+ "../run-CqF8Powf.js"
4565
4575
  );
4566
4576
  const runStoryFn = async (opts) => {
4567
4577
  const exitCode = await runPipeline({
@@ -7493,8 +7503,8 @@ async function runCancelAction(options) {
7493
7503
  await initSchema(adapter);
7494
7504
  const runningRuns = await getRunningPipelineRuns(adapter);
7495
7505
  for (const run of runningRuns) {
7496
- await updatePipelineRun(adapter, run.id, { status: "cancelled" });
7497
- if (outputFormat === "human") process.stdout.write(`Marked pipeline run ${run.id} as cancelled.\n`);
7506
+ await updatePipelineRun(adapter, run.id, { status: "stopped" });
7507
+ if (outputFormat === "human") process.stdout.write(`Marked pipeline run ${run.id} as stopped.\n`);
7498
7508
  }
7499
7509
  } finally {
7500
7510
  await adapter.close();
@@ -4711,7 +4711,8 @@ function runBuildVerification(options) {
4711
4711
  const stdout = execSync(cmd, {
4712
4712
  cwd: projectRoot,
4713
4713
  timeout: timeoutMs,
4714
- encoding: "utf-8"
4714
+ encoding: "utf-8",
4715
+ shell: process.env.SHELL || "/bin/bash"
4715
4716
  });
4716
4717
  return {
4717
4718
  status: "passed",
@@ -4744,6 +4745,16 @@ function runBuildVerification(options) {
4744
4745
  reason: "build-script-not-found"
4745
4746
  };
4746
4747
  }
4748
+ const pep668Pattern = /externally-managed-environment|This environment is externally managed/i;
4749
+ if (pep668Pattern.test(combinedOutput)) {
4750
+ logger$20.warn("PEP 668: pip blocked by externally-managed-environment — skipping pre-flight. Create a .venv to resolve.");
4751
+ return {
4752
+ status: "skipped",
4753
+ exitCode,
4754
+ output: combinedOutput,
4755
+ reason: "pep-668-externally-managed"
4756
+ };
4757
+ }
4747
4758
  return {
4748
4759
  status: "failed",
4749
4760
  exitCode,
@@ -41834,4 +41845,4 @@ function registerRunCommand(program, _version = "0.0.0", projectRoot = process.c
41834
41845
 
41835
41846
  //#endregion
41836
41847
  export { AdapterTelemetryPersistence, AppError, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, EpicIngester, GitClient, GrammarLoader, RepoMapInjector, RepoMapModule, RepoMapQueryEngine, RepoMapStorage, SymbolParser, createContextCompiler, createDispatcher, createEventEmitter, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStopAfterGate, createTelemetryAdvisor, formatPhaseCompletionSummary, getFactoryRunSummaries, getScenarioResultsForRun, getTwinRunsForRun, listGraphRuns, normalizeGraphSummaryToStatus, registerExportCommand, registerFactoryCommand, registerRunCommand, registerScenariosCommand, resolveMaxReviewCycles, resolveStoryKeys, runAnalysisPhase, runPlanningPhase, runRunAction, runSolutioningPhase, validateStopAfterFromConflict };
41837
- //# sourceMappingURL=run-DSj4ebow.js.map
41848
+ //# sourceMappingURL=run-BO_GDvvR.js.map
@@ -2,7 +2,7 @@ import "./health-DezAZoGb.js";
2
2
  import "./logger-KeHncl-f.js";
3
3
  import "./helpers-CElYrONe.js";
4
4
  import "./dist-DmhbWZ0f.js";
5
- import { normalizeGraphSummaryToStatus, registerRunCommand, resolveMaxReviewCycles, runRunAction } from "./run-DSj4ebow.js";
5
+ import { normalizeGraphSummaryToStatus, registerRunCommand, resolveMaxReviewCycles, runRunAction } from "./run-BO_GDvvR.js";
6
6
  import "./routing-CcBOCuC9.js";
7
7
  import "./decisions-C0pz9Clx.js";
8
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "substrate-ai",
3
- "version": "0.19.22",
3
+ "version": "0.19.24",
4
4
  "description": "Substrate — multi-agent orchestration daemon for AI coding agents",
5
5
  "type": "module",
6
6
  "license": "MIT",