substrate-ai 0.20.133 → 0.20.134

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-FYMixuGN.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 { FileKvStore, SUBSTRATE_OWNED_SETTINGS_KEYS, VALID_PHASES, buildPipelineStatusOutput, createDatabaseAdapter, createDoltOperatorReader, findPackageRoot, formatOutput, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, inspectProcessTree, parseDbTimestampAsUtc, registerHealthCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion } from "../health-BtNrnj3J.js";
2
+ import { FileKvStore, SUBSTRATE_OWNED_SETTINGS_KEYS, VALID_PHASES, buildPipelineStatusOutput, createDatabaseAdapter, createDoltOperatorReader, findPackageRoot, formatOutput, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, inspectProcessTree, parseDbTimestampAsUtc, registerHealthCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion } from "../health-DiT_FlpE.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, createPipelineRun, createStderrLogger, getActiveDecisions, getAllCostEntriesFiltered, getBaselineRunMetrics, getDecisionsByCategory, getDecisionsByPhaseForRun, getLatestCompletedRun, getLatestRun, getPipelineRunById, getPlanningCostTotal, getRetryableEscalations, getRunMetrics, getRunningPipelineRuns, getSessionCostSummary, getSessionCostSummaryFiltered, getStoryMetricsForRun, getTokenUsageSummary, incrementRunRestarts, initSchema, initWorkGraphSchema, initializeDolt, listRunMetrics, loadParentRunDecisions, supersedeDecision, swallowDebug, tagRunAsBaseline, updatePipelineRun } from "../dist-BUDAiEaH.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-DAb4BgAO.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, createPipelineRun, createStderrLogger, getActiveDecisions, getAllCostEntriesFiltered, getBaselineRunMetrics, getDecisionsByCategory, getDecisionsByPhaseForRun, getLatestCompletedRun, getLatestRun, getPipelineRunById, getPlanningCostTotal, getRetryableEscalations, getRunMetrics, getRunningPipelineRuns, getSessionCostSummary, getSessionCostSummaryFiltered, getStoryMetricsForRun, getTokenUsageSummary, incrementRunRestarts, initSchema, initWorkGraphSchema, initializeDolt, listRunMetrics, loadParentRunDecisions, supersedeDecision, swallowDebug, tagRunAsBaseline, updatePipelineRun } from "../dist-FYMixuGN.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-C0h5CjUK.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-CKmTZKA5.js";
9
- import "../errors-pJaYVCUJ.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-BCnoRvTV.js";
9
+ import "../errors-Qqm59kND.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-DKNFNQ7u.js";
14
+ import "../interactive-prompt-CHWGblJe.js";
15
15
  import "../recovery-engine-BKGBeBnW.js";
16
16
  import "../version-manager-impl-qFBiO4Eh.js";
17
- import { registerUpgradeCommand } from "../upgrade-BApZ1sPK.js";
17
+ import { registerUpgradeCommand } from "../upgrade-DWzAWGtt.js";
18
18
  import { Command } from "commander";
19
19
  import { fileURLToPath } from "url";
20
20
  import { dirname, join, resolve } from "path";
@@ -1893,12 +1893,14 @@ function syncSkillsToTarget(srcSkillsDir, destSkillsDir, ownershipPrefixes, name
1893
1893
  }
1894
1894
  }
1895
1895
  if (failures.length > 0 && count === 0) {
1896
- const dominantErr = failures[0].err;
1896
+ const first = failures[0];
1897
1897
  logger$18.warn({
1898
1898
  destSkillsDir,
1899
1899
  attempted: failures.length,
1900
- dominantErr
1901
- }, `All ${String(failures.length)} skills failed under ${destSkillsDir} (e.g. ${dominantErr}). Check that the directory and its parent are writable by the current user.`);
1900
+ dominantStage: first.op,
1901
+ dominantSkill: first.skill,
1902
+ dominantErr: first.err
1903
+ }, `All ${String(failures.length)} skills failed under ${destSkillsDir} (first: ${first.op} on '${first.skill}' — ${first.err}). Check that ${destSkillsDir} and its parent are writable; on macOS look for restrictive permissions, extended attributes (xattr), or immutable flags. To skip Codex scaffolding entirely, set SUBSTRATE_NO_CODEX_SCAFFOLD=1.`);
1902
1904
  }
1903
1905
  return count;
1904
1906
  }
@@ -1917,6 +1919,11 @@ const PROJECT_OWNERSHIP_PREFIXES = ["bmad-", "substrate-"];
1917
1919
  * a plugin) are left alone.
1918
1920
  */
1919
1921
  function scaffoldCodexProject(projectRoot, outputFormat) {
1922
+ if (process.env["SUBSTRATE_NO_CODEX_SCAFFOLD"] === "1") {
1923
+ if (outputFormat !== "json") process.stdout.write(" Skipping .codex/ scaffolding (SUBSTRATE_NO_CODEX_SCAFFOLD=1)\n");
1924
+ logger$18.debug("SUBSTRATE_NO_CODEX_SCAFFOLD=1 — skipping .codex/ scaffolding");
1925
+ return;
1926
+ }
1920
1927
  const claudeCommandsDir = join(projectRoot, ".claude", "commands");
1921
1928
  const claudeSkillsDir = join(projectRoot, ".claude", "skills");
1922
1929
  const codexDir = join(projectRoot, ".codex");
@@ -1952,6 +1959,11 @@ function scaffoldCodexProject(projectRoot, outputFormat) {
1952
1959
  * are never touched.
1953
1960
  */
1954
1961
  function scaffoldCodexUser(projectRoot, homeDir, outputFormat) {
1962
+ if (process.env["SUBSTRATE_NO_CODEX_SCAFFOLD"] === "1") {
1963
+ if (outputFormat !== "json") process.stdout.write(" Skipping ~/.codex/ scaffolding (SUBSTRATE_NO_CODEX_SCAFFOLD=1)\n");
1964
+ logger$18.debug("SUBSTRATE_NO_CODEX_SCAFFOLD=1 — skipping ~/.codex/ scaffolding");
1965
+ return;
1966
+ }
1955
1967
  const claudeCommandsDir = join(projectRoot, ".claude", "commands");
1956
1968
  const claudeSkillsDir = join(projectRoot, ".claude", "skills");
1957
1969
  const userCodexDir = join(homeDir, ".codex");
@@ -7011,7 +7023,7 @@ async function runStatusAction(options) {
7011
7023
  logger$15.debug({ err }, "Work graph query failed, continuing without work graph data");
7012
7024
  }
7013
7025
  if (run === void 0) {
7014
- const { inspectProcessTree: inspectProcessTree$1 } = await import("../health-Cb4jPuRd.js");
7026
+ const { inspectProcessTree: inspectProcessTree$1 } = await import("../health-CmwLEwMG.js");
7015
7027
  const substrateDirPath = join(projectRoot, ".substrate");
7016
7028
  const processInfo = inspectProcessTree$1({
7017
7029
  projectRoot,
@@ -7959,7 +7971,7 @@ function defaultSupervisorDeps() {
7959
7971
  if (cached === null) {
7960
7972
  const { AdapterRegistry: AR } = await import(
7961
7973
  /* @vite-ignore */
7962
- "../adapter-registry-D70o7g1c.js"
7974
+ "../adapter-registry-61HN97Pb.js"
7963
7975
  );
7964
7976
  cached = new AR();
7965
7977
  await cached.discoverAndRegister();
@@ -8526,11 +8538,11 @@ async function runSupervisorAction(options, deps = {}) {
8526
8538
  try {
8527
8539
  const { createExperimenter } = await import(
8528
8540
  /* @vite-ignore */
8529
- "../experimenter-CpnxTV5m.js"
8541
+ "../experimenter-Dwti5ZXb.js"
8530
8542
  );
8531
8543
  const { getLatestRun: getLatest } = await import(
8532
8544
  /* @vite-ignore */
8533
- "../decisions-DAuvU4q9.js"
8545
+ "../decisions-B2ColN4E.js"
8534
8546
  );
8535
8547
  const expAdapter = createDatabaseAdapter({
8536
8548
  backend: "auto",
@@ -8540,7 +8552,7 @@ async function runSupervisorAction(options, deps = {}) {
8540
8552
  await initSchema(expAdapter);
8541
8553
  const { runRunAction: runPipeline } = await import(
8542
8554
  /* @vite-ignore */
8543
- "../run-BMx6kY0E.js"
8555
+ "../run-CniiJHAS.js"
8544
8556
  );
8545
8557
  const runStoryFn = async (opts) => {
8546
8558
  const exitCode = await runPipeline({
@@ -9065,7 +9077,7 @@ async function runMetricsAction(options) {
9065
9077
  const routingConfigPath = join(dbDir, "routing.yml");
9066
9078
  let routingConfig = null;
9067
9079
  if (existsSync$1(routingConfigPath)) try {
9068
- const { loadModelRoutingConfig } = await import("../routing-CEd36PVz.js");
9080
+ const { loadModelRoutingConfig } = await import("../routing-Bl3LFjFs.js");
9069
9081
  routingConfig = loadModelRoutingConfig(routingConfigPath);
9070
9082
  } catch {}
9071
9083
  if (routingConfig === null) routingConfig = {
@@ -13375,8 +13387,8 @@ async function createProgram() {
13375
13387
  /** Fire-and-forget startup version check (story 8.3, AC3/AC5) */
13376
13388
  function checkForUpdatesInBackground(currentVersion) {
13377
13389
  if (process.env.SUBSTRATE_NO_UPDATE_CHECK === "1") return;
13378
- import("../upgrade-D4Dj7rjQ.js").then(async () => {
13379
- const { createVersionManager } = await import("../version-manager-impl-Bi05jQ9s.js");
13390
+ import("../upgrade-Bq4SRZgH.js").then(async () => {
13391
+ const { createVersionManager } = await import("../version-manager-impl-CZKVyewX.js");
13380
13392
  const vm = createVersionManager();
13381
13393
  const result = await vm.checkForUpdates();
13382
13394
  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-BUDAiEaH.js";
1
+ import { addTokenUsage, createDecision, createPipelineRun, createRequirement, getArtifactByTypeForRun, getArtifactsByRun, getDecisionsByCategory, getDecisionsByPhase, getDecisionsByPhaseForRun, getLatestRun, getPipelineRunById, getRunningPipelineRuns, getTokenUsageSummary, listRequirements, registerArtifact, updateDecision, updatePipelineRun, updatePipelineRunConfig, upsertDecision } from "./dist-FYMixuGN.js";
2
2
  import "./decisions-CzSIEeGP.js";
3
3
 
4
4
  export { getLatestRun };
@@ -9784,12 +9784,24 @@ var CodexCLIAdapter = class {
9784
9784
  * Build spawn command for a coding task.
9785
9785
  * Uses: `codex exec` with prompt delivered via stdin.
9786
9786
  *
9787
- * `--sandbox workspace-write --ask-for-approval never` is required so the
9788
- * non-interactive `codex exec` can actually write files. Without flags, exec
9787
+ * `--sandbox workspace-write -c approval_policy=never` is required so the
9788
+ * non-interactive `codex exec` can actually write files. Without these, exec
9789
9789
  * defaults to a read-only sandbox + an approval policy that escalates to the
9790
9790
  * user — but exec has no one to approve, so file writes fail with
9791
9791
  * "file change approval is not supported in exec mode" (→ create-story-no-file).
9792
- * `never` is exactly what Codex's own docs recommend for non-interactive runs,
9792
+ *
9793
+ * Why `-c approval_policy=never` instead of `--ask-for-approval never`:
9794
+ * `-a`/`--ask-for-approval` is a TOP-LEVEL flag in modern Codex CLI
9795
+ * versions — it must appear BEFORE the `exec` subcommand. Placing it after
9796
+ * `exec` errors out with `unexpected argument '--ask-for-approval' found`,
9797
+ * which is what bit substrate v0.20.131–133. The `-c key=value` override
9798
+ * IS a documented `exec` flag in every version (it overrides any
9799
+ * `~/.codex/config.toml` setting via dotted-path), and `approval_policy`
9800
+ * is the same underlying setting `-a` writes. The TOML value `never` falls
9801
+ * back to a literal string when bare-keyword parsing fails (per Codex's
9802
+ * own `-c` documentation), so the unquoted form is portable across shells.
9803
+ *
9804
+ * `never` is exactly what Codex's docs recommend for non-interactive runs,
9793
9805
  * and this is normal automation mode — NOT the
9794
9806
  * `--dangerously-bypass-approvals-and-sandbox` flag (which some org policies
9795
9807
  * forbid). The planning command stays read-only (it must not write).
@@ -9803,8 +9815,8 @@ var CodexCLIAdapter = class {
9803
9815
  "exec",
9804
9816
  "--sandbox",
9805
9817
  "workspace-write",
9806
- "--ask-for-approval",
9807
- "never"
9818
+ "-c",
9819
+ "approval_policy=never"
9808
9820
  ];
9809
9821
  if (options.additionalFlags && options.additionalFlags.length > 0) args.push(...options.additionalFlags);
9810
9822
  const envEntries = {};
@@ -11319,4 +11331,4 @@ async function callLLM(params) {
11319
11331
 
11320
11332
  //#endregion
11321
11333
  export { ADVISORY_NOTES, AdapterRegistry, AdtError, BudgetConfigSchema, CODEX_SANDBOX_BLOCK_HINT, CURRENT_CONFIG_FORMAT_VERSION, CURRENT_TASK_GRAPH_VERSION, Categorizer, ClaudeCodeAdapter, CodexCLIAdapter, ConfigError, ConfigIncompatibleFormatError, ConsumerAnalyzer, CostTrackerConfigSchema, DEFAULT_CONFIG, DEFAULT_GLOBAL_SETTINGS, DispatcherImpl, DoltClient, DoltNotInstalled, DoltQueryError, ESCALATION_DIAGNOSIS, EXPERIMENT_RESULT, EfficiencyScorer, GeminiCLIAdapter, GlobalSettingsSchema, InMemoryDatabaseAdapter, IngestionServer, LEARNING_FINDING, LogTurnAnalyzer, ModelRoutingConfigSchema, MonitorDatabaseImpl, OPERATIONAL_FINDING, PartialGlobalSettingsSchema, PartialProviderConfigSchema, ProviderPolicySchema, ProvidersSchema, Recommender, RoutingConfigError, RoutingRecommender, RoutingResolver, RoutingTelemetry, RoutingTokenAccumulator, RoutingTuner, STORY_METRICS, STORY_OUTCOME, SubstrateConfigSchema, TASK_TYPE_PHASE_MAP, TEST_EXPANSION_FINDING, TEST_PLAN, TelemetryConfigSchema, TelemetryNormalizer, TelemetryPipeline, TurnAnalyzer, VersionManagerImpl, addTokenUsage, aggregateTokenUsageForRun, aggregateTokenUsageForStory, buildAuditLogEntry, buildBranchName, buildModificationDirective, buildPRBody, buildWorktreePath, callLLM, checkDoltInstalled, classifyVersionGap, compareRunMetrics, createAmendmentRun, createConfigSystem, createDatabaseAdapter as createDatabaseAdapter$1, createDecision, createExperimenter, createPipelineRun, createRequirement, createStderrLogger, createVersionManager, detectCodexSandboxBlock, detectInterfaceChanges, determineVerdict, getActiveDecisions, getAllCostEntriesFiltered, getArtifactByTypeForRun, getArtifactsByRun, getBaselineRunMetrics, getDecisionsByCategory, getDecisionsByPhase, getDecisionsByPhaseForRun, getLatestCompletedRun, getLatestRun, getModelTier, getPipelineRunById, getPlanningCostTotal, getRetryableEscalations, getRunMetrics, getRunningPipelineRuns, getSessionCostSummary, getSessionCostSummaryFiltered, getStoryMetricsForRun, getTokenUsageSummary, incrementRunRestarts, initSchema, initWorkGraphSchema, initializeDolt, listRequirements, listRunMetrics, loadModelRoutingConfig, loadParentRunDecisions, registerArtifact, resolvePromptFile, supersedeDecision, swallowDebug, tagRunAsBaseline, updateDecision, updatePipelineRun, updatePipelineRunConfig, upsertDecision, writeRunMetrics, writeStoryMetrics };
11322
- //# sourceMappingURL=dist-BUDAiEaH.js.map
11334
+ //# sourceMappingURL=dist-FYMixuGN.js.map
@@ -1,4 +1,4 @@
1
- import { AdtError } from "./dist-BUDAiEaH.js";
1
+ import { AdtError } from "./dist-FYMixuGN.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-pJaYVCUJ.js.map
74
+ //# sourceMappingURL=errors-Qqm59kND.js.map
@@ -1,3 +1,3 @@
1
- import { buildAuditLogEntry, buildBranchName, buildModificationDirective, buildPRBody, buildWorktreePath, createExperimenter, determineVerdict, resolvePromptFile } from "./dist-BUDAiEaH.js";
1
+ import { buildAuditLogEntry, buildBranchName, buildModificationDirective, buildPRBody, buildWorktreePath, createExperimenter, determineVerdict, resolvePromptFile } from "./dist-FYMixuGN.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-BtNrnj3J.js";
1
+ import { DEFAULT_STALL_THRESHOLD_SECONDS, getAllDescendantPids, getAutoHealthData, inspectProcessTree, isOrchestratorProcessLine, registerHealthCommand, runHealthAction } from "./health-DiT_FlpE.js";
2
2
  import "./logger-KeHncl-f.js";
3
- import "./dist-BUDAiEaH.js";
4
- import "./manifest-read-CKmTZKA5.js";
3
+ import "./dist-FYMixuGN.js";
4
+ import "./manifest-read-BCnoRvTV.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-BUDAiEaH.js";
3
- import { resolveMainRepoRoot, resolveRunManifest } from "./manifest-read-CKmTZKA5.js";
2
+ import { DoltClient, DoltQueryError, createDatabaseAdapter$1 as createDatabaseAdapter, getLatestRun, getPipelineRunById, initSchema } from "./dist-FYMixuGN.js";
3
+ import { resolveMainRepoRoot, resolveRunManifest } from "./manifest-read-BCnoRvTV.js";
4
4
  import { createRequire } from "module";
5
5
  import { dirname, join } from "path";
6
6
  import { existsSync, readFileSync } from "node:fs";
@@ -1000,4 +1000,4 @@ function registerHealthCommand(program, _version = "0.0.0", projectRoot = proces
1000
1000
 
1001
1001
  //#endregion
1002
1002
  export { BMAD_BASELINE_TOKENS_FULL, DEFAULT_STALL_THRESHOLD_SECONDS, FileKvStore, STOP_AFTER_VALID_PHASES, STORY_KEY_PATTERN, SUBSTRATE_OWNED_SETTINGS_KEYS, VALID_PHASES, __commonJS, __require, __toESM, buildPipelineStatusOutput, createDatabaseAdapter$1 as createDatabaseAdapter, createDoltOperatorReader, findPackageRoot, formatOutput, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, inspectProcessTree, isOrchestratorProcessLine, parseDbTimestampAsUtc, registerHealthCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion, runHealthAction, validateStoryKey };
1003
- //# sourceMappingURL=health-BtNrnj3J.js.map
1003
+ //# sourceMappingURL=health-DiT_FlpE.js.map
@@ -1333,12 +1333,24 @@ declare class CodexCLIAdapter implements WorkerAdapter {
1333
1333
  * Build spawn command for a coding task.
1334
1334
  * Uses: `codex exec` with prompt delivered via stdin.
1335
1335
  *
1336
- * `--sandbox workspace-write --ask-for-approval never` is required so the
1337
- * non-interactive `codex exec` can actually write files. Without flags, exec
1336
+ * `--sandbox workspace-write -c approval_policy=never` is required so the
1337
+ * non-interactive `codex exec` can actually write files. Without these, exec
1338
1338
  * defaults to a read-only sandbox + an approval policy that escalates to the
1339
1339
  * user — but exec has no one to approve, so file writes fail with
1340
1340
  * "file change approval is not supported in exec mode" (→ create-story-no-file).
1341
- * `never` is exactly what Codex's own docs recommend for non-interactive runs,
1341
+ *
1342
+ * Why `-c approval_policy=never` instead of `--ask-for-approval never`:
1343
+ * `-a`/`--ask-for-approval` is a TOP-LEVEL flag in modern Codex CLI
1344
+ * versions — it must appear BEFORE the `exec` subcommand. Placing it after
1345
+ * `exec` errors out with `unexpected argument '--ask-for-approval' found`,
1346
+ * which is what bit substrate v0.20.131–133. The `-c key=value` override
1347
+ * IS a documented `exec` flag in every version (it overrides any
1348
+ * `~/.codex/config.toml` setting via dotted-path), and `approval_policy`
1349
+ * is the same underlying setting `-a` writes. The TOML value `never` falls
1350
+ * back to a literal string when bare-keyword parsing fails (per Codex's
1351
+ * own `-c` documentation), so the unquoted form is portable across shells.
1352
+ *
1353
+ * `never` is exactly what Codex's docs recommend for non-interactive runs,
1342
1354
  * and this is normal automation mode — NOT the
1343
1355
  * `--dangerously-bypass-approvals-and-sandbox` flag (which some org policies
1344
1356
  * forbid). The planning command stays read-only (it must not write).
@@ -1449,4 +1461,4 @@ interface Recommendation {
1449
1461
 
1450
1462
  //#endregion
1451
1463
  export { AdapterDiscoveryResult, AdapterRegistry as AdapterRegistry$1, AdtError as AdtError$1, ClaudeCodeAdapter as ClaudeCodeAdapter$1, CodexCLIAdapter as CodexCLIAdapter$1, ConfigError as ConfigError$1, ConfigIncompatibleFormatError as ConfigIncompatibleFormatError$1, CoreEvents, DatabaseAdapter, DiscoveryReport, GeminiCLIAdapter as GeminiCLIAdapter$1, Recommendation, TypedEventBus };
1452
- //# sourceMappingURL=index-CyQhVXLB.d.ts.map
1464
+ //# sourceMappingURL=index-CO-wmVvJ.d.ts.map
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { AdapterDiscoveryResult, AdapterRegistry$1 as AdapterRegistry, AdtError$1 as AdtError, ClaudeCodeAdapter$1 as ClaudeCodeAdapter, CodexCLIAdapter$1 as CodexCLIAdapter, ConfigError$1 as ConfigError, ConfigIncompatibleFormatError$1 as ConfigIncompatibleFormatError, DiscoveryReport, GeminiCLIAdapter$1 as GeminiCLIAdapter, Recommendation, TypedEventBus } from "./index-CyQhVXLB.js";
1
+ import { AdapterDiscoveryResult, AdapterRegistry$1 as AdapterRegistry, AdtError$1 as AdtError, ClaudeCodeAdapter$1 as ClaudeCodeAdapter, CodexCLIAdapter$1 as CodexCLIAdapter, ConfigError$1 as ConfigError, ConfigIncompatibleFormatError$1 as ConfigIncompatibleFormatError, DiscoveryReport, GeminiCLIAdapter$1 as GeminiCLIAdapter, Recommendation, TypedEventBus } from "./index-CO-wmVvJ.js";
2
2
  import pino from "pino";
3
3
  import { z } from "zod";
4
4
  import { Readable, Writable } from "node:stream";
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-BUDAiEaH.js";
3
+ import { AdapterRegistry, AdtError, ClaudeCodeAdapter, CodexCLIAdapter, ConfigError, ConfigIncompatibleFormatError, GeminiCLIAdapter } from "./dist-FYMixuGN.js";
4
4
  import "./adapter-registry-DIcrxjH8.js";
5
- import { BudgetExceededError, GitError, RecoveryError, TaskConfigError, TaskGraphCycleError, TaskGraphError, TaskGraphIncompatibleFormatError, WorkerError, WorkerNotFoundError } from "./errors-pJaYVCUJ.js";
5
+ import { BudgetExceededError, GitError, RecoveryError, TaskConfigError, TaskGraphCycleError, TaskGraphError, TaskGraphIncompatibleFormatError, WorkerError, WorkerNotFoundError } from "./errors-Qqm59kND.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-CKmTZKA5.js";
2
+ import { readCurrentRunId, resolveMainRepoRoot } from "./manifest-read-BCnoRvTV.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-DKNFNQ7u.js.map
183
+ //# sourceMappingURL=interactive-prompt-CHWGblJe.js.map
@@ -1,5 +1,5 @@
1
1
  import { createLogger } from "./logger-KeHncl-f.js";
2
- import { LEARNING_FINDING, createDecision, getDecisionsByCategory } from "./dist-BUDAiEaH.js";
2
+ import { LEARNING_FINDING, createDecision, getDecisionsByCategory } from "./dist-FYMixuGN.js";
3
3
  import * as path$1 from "path";
4
4
  import { join } from "path";
5
5
  import { readFile } from "fs/promises";
@@ -5851,4 +5851,4 @@ async function resolveRunManifest(dbRoot, runId) {
5851
5851
 
5852
5852
  //#endregion
5853
5853
  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 };
5854
- //# sourceMappingURL=manifest-read-CKmTZKA5.js.map
5854
+ //# sourceMappingURL=manifest-read-BCnoRvTV.js.map
@@ -1,6 +1,6 @@
1
1
  import "../../logger-KeHncl-f.js";
2
- import "../../dist-BUDAiEaH.js";
3
- import "../../manifest-read-CKmTZKA5.js";
4
- import { runInteractivePrompt } from "../../interactive-prompt-DKNFNQ7u.js";
2
+ import "../../dist-FYMixuGN.js";
3
+ import "../../manifest-read-BCnoRvTV.js";
4
+ import { runInteractivePrompt } from "../../interactive-prompt-CHWGblJe.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-BUDAiEaH.js";
1
+ import { ModelRoutingConfigSchema, ProviderPolicySchema, RoutingConfigError, RoutingRecommender, RoutingResolver, RoutingTelemetry, RoutingTokenAccumulator, RoutingTuner, TASK_TYPE_PHASE_MAP, getModelTier, loadModelRoutingConfig } from "./dist-FYMixuGN.js";
2
2
  import "./routing-DFxoKHDt.js";
3
3
 
4
4
  export { loadModelRoutingConfig };
@@ -1,11 +1,11 @@
1
- import { BMAD_BASELINE_TOKENS_FULL, FileKvStore, STOP_AFTER_VALID_PHASES, STORY_KEY_PATTERN, VALID_PHASES, __commonJS, __require, __toESM, buildPipelineStatusOutput, createDatabaseAdapter, formatOutput, formatPipelineSummary, formatTokenTelemetry, inspectProcessTree, parseDbTimestampAsUtc, validateStoryKey } from "./health-BtNrnj3J.js";
1
+ import { BMAD_BASELINE_TOKENS_FULL, FileKvStore, STOP_AFTER_VALID_PHASES, STORY_KEY_PATTERN, VALID_PHASES, __commonJS, __require, __toESM, buildPipelineStatusOutput, createDatabaseAdapter, formatOutput, formatPipelineSummary, formatTokenTelemetry, inspectProcessTree, parseDbTimestampAsUtc, validateStoryKey } from "./health-DiT_FlpE.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, CODEX_SANDBOX_BLOCK_HINT, Categorizer, ConsumerAnalyzer, DEFAULT_GLOBAL_SETTINGS, DispatcherImpl, DoltClient, ESCALATION_DIAGNOSIS, EXPERIMENT_RESULT, EfficiencyScorer, IngestionServer, LogTurnAnalyzer, OPERATIONAL_FINDING, Recommender, RoutingRecommender, RoutingResolver, RoutingTelemetry, RoutingTokenAccumulator, RoutingTuner, STORY_METRICS, STORY_OUTCOME, SubstrateConfigSchema, TEST_EXPANSION_FINDING, TEST_PLAN, TelemetryNormalizer, TelemetryPipeline, TurnAnalyzer, addTokenUsage, aggregateTokenUsageForRun, aggregateTokenUsageForStory, callLLM, classifyVersionGap, createConfigSystem, createDatabaseAdapter$1, createDecision, createPipelineRun, createRequirement, createStderrLogger, detectCodexSandboxBlock, detectInterfaceChanges, getArtifactByTypeForRun, getArtifactsByRun, getDecisionsByCategory, getDecisionsByPhase, getDecisionsByPhaseForRun, getLatestRun, getPipelineRunById, getRunMetrics, getRunningPipelineRuns, getStoryMetricsForRun, getTokenUsageSummary, initSchema, listRequirements, loadModelRoutingConfig, registerArtifact, swallowDebug, updatePipelineRun, updatePipelineRunConfig, upsertDecision, writeRunMetrics, writeStoryMetrics } from "./dist-BUDAiEaH.js";
5
- import { FindingsInjector, RunManifest, RuntimeProbeListSchema, applyConfigToGraph, createDefaultVerificationPipeline, createGraphOrchestrator, createSdlcCodeReviewHandler, createSdlcCreateStoryHandler, createSdlcDevStoryHandler, createSdlcPhaseHandler, detectsEventDrivenAC, detectsStateIntegratingAC, extractTargetFilesFromStoryContent, parseRuntimeProbes, renderFindings, resolveGraphPath, resolveMainRepoRoot, runAcTraceabilityCheck, runStaleVerificationRecovery } from "./manifest-read-CKmTZKA5.js";
4
+ import { ADVISORY_NOTES, CODEX_SANDBOX_BLOCK_HINT, Categorizer, ConsumerAnalyzer, DEFAULT_GLOBAL_SETTINGS, DispatcherImpl, DoltClient, ESCALATION_DIAGNOSIS, EXPERIMENT_RESULT, EfficiencyScorer, IngestionServer, LogTurnAnalyzer, OPERATIONAL_FINDING, Recommender, RoutingRecommender, RoutingResolver, RoutingTelemetry, RoutingTokenAccumulator, RoutingTuner, STORY_METRICS, STORY_OUTCOME, SubstrateConfigSchema, TEST_EXPANSION_FINDING, TEST_PLAN, TelemetryNormalizer, TelemetryPipeline, TurnAnalyzer, addTokenUsage, aggregateTokenUsageForRun, aggregateTokenUsageForStory, callLLM, classifyVersionGap, createConfigSystem, createDatabaseAdapter$1, createDecision, createPipelineRun, createRequirement, createStderrLogger, detectCodexSandboxBlock, detectInterfaceChanges, getArtifactByTypeForRun, getArtifactsByRun, getDecisionsByCategory, getDecisionsByPhase, getDecisionsByPhaseForRun, getLatestRun, getPipelineRunById, getRunMetrics, getRunningPipelineRuns, getStoryMetricsForRun, getTokenUsageSummary, initSchema, listRequirements, loadModelRoutingConfig, registerArtifact, swallowDebug, updatePipelineRun, updatePipelineRunConfig, upsertDecision, writeRunMetrics, writeStoryMetrics } from "./dist-FYMixuGN.js";
5
+ import { FindingsInjector, RunManifest, RuntimeProbeListSchema, applyConfigToGraph, createDefaultVerificationPipeline, createGraphOrchestrator, createSdlcCodeReviewHandler, createSdlcCreateStoryHandler, createSdlcDevStoryHandler, createSdlcPhaseHandler, detectsEventDrivenAC, detectsStateIntegratingAC, extractTargetFilesFromStoryContent, parseRuntimeProbes, renderFindings, resolveGraphPath, resolveMainRepoRoot, runAcTraceabilityCheck, runStaleVerificationRecovery } from "./manifest-read-BCnoRvTV.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-DKNFNQ7u.js";
8
+ import { runInteractivePrompt } from "./interactive-prompt-CHWGblJe.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";
@@ -47441,7 +47441,7 @@ async function runFullPipeline(options) {
47441
47441
  */
47442
47442
  async function emitPreDispatchVersionAdvisory(currentVersion) {
47443
47443
  if (process.env["SUBSTRATE_NO_UPDATE_CHECK"] === "1") return;
47444
- const { createVersionManager } = await import("./version-manager-impl-Bi05jQ9s.js");
47444
+ const { createVersionManager } = await import("./version-manager-impl-CZKVyewX.js");
47445
47445
  const vm = createVersionManager();
47446
47446
  const result = await vm.checkForUpdates(true);
47447
47447
  const gap = classifyVersionGap(currentVersion, result.latestVersion);
@@ -47538,4 +47538,4 @@ function registerRunCommand(program, version = "0.0.0", projectRoot = process.cw
47538
47538
 
47539
47539
  //#endregion
47540
47540
  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 };
47541
- //# sourceMappingURL=run-DAb4BgAO.js.map
47541
+ //# sourceMappingURL=run-C0h5CjUK.js.map
@@ -1,14 +1,14 @@
1
- import "./health-BtNrnj3J.js";
1
+ import "./health-DiT_FlpE.js";
2
2
  import "./logger-KeHncl-f.js";
3
3
  import "./helpers-CElYrONe.js";
4
- import "./dist-BUDAiEaH.js";
5
- import { normalizeGraphSummaryToStatus, registerRunCommand, resolveMaxReviewCycles, resolveProbeAuthorStateIntegrating, runRunAction, wireNdjsonEmitter } from "./run-DAb4BgAO.js";
6
- import "./manifest-read-CKmTZKA5.js";
4
+ import "./dist-FYMixuGN.js";
5
+ import { normalizeGraphSummaryToStatus, registerRunCommand, resolveMaxReviewCycles, resolveProbeAuthorStateIntegrating, runRunAction, wireNdjsonEmitter } from "./run-C0h5CjUK.js";
6
+ import "./manifest-read-BCnoRvTV.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-DKNFNQ7u.js";
11
+ import "./interactive-prompt-CHWGblJe.js";
12
12
  import "./recovery-engine-BKGBeBnW.js";
13
13
 
14
14
  export { runRunAction };
@@ -1,4 +1,4 @@
1
- import { CoreEvents, DatabaseAdapter, TypedEventBus } from "../../../index-CyQhVXLB.js";
1
+ import { CoreEvents, DatabaseAdapter, TypedEventBus } from "../../../index-CO-wmVvJ.js";
2
2
  import { z } from "zod";
3
3
 
4
4
  //#region packages/sdlc/dist/verification/findings.d.ts
@@ -1,5 +1,5 @@
1
- import "./dist-BUDAiEaH.js";
1
+ import "./dist-FYMixuGN.js";
2
2
  import "./version-manager-impl-qFBiO4Eh.js";
3
- import { isGlobalInstall, registerUpgradeCommand, runUpgradeCommand } from "./upgrade-BApZ1sPK.js";
3
+ import { isGlobalInstall, registerUpgradeCommand, runUpgradeCommand } from "./upgrade-DWzAWGtt.js";
4
4
 
5
5
  export { isGlobalInstall, registerUpgradeCommand, runUpgradeCommand };
@@ -1,4 +1,4 @@
1
- import { createVersionManager } from "./dist-BUDAiEaH.js";
1
+ import { createVersionManager } from "./dist-FYMixuGN.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-BApZ1sPK.js.map
126
+ //# sourceMappingURL=upgrade-DWzAWGtt.js.map
@@ -1,4 +1,4 @@
1
- import { VersionManagerImpl, createVersionManager } from "./dist-BUDAiEaH.js";
1
+ import { VersionManagerImpl, createVersionManager } from "./dist-FYMixuGN.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.133",
3
+ "version": "0.20.134",
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-BUDAiEaH.js";
2
- import "./adapter-registry-DIcrxjH8.js";
3
-
4
- export { AdapterRegistry };