substrate-ai 0.20.155 → 0.20.156
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 +6 -6
- package/dist/{health-DtcROhq3.js → health-CoJWnndU.js} +2 -2
- package/dist/{health-C4ussodZ.js → health-D_taFoP2.js} +2 -2
- package/dist/{interactive-prompt-D-xBHKiP.js → interactive-prompt-BuoVYIgS.js} +2 -2
- package/dist/{manifest-read-B2Tn8bvh.js → manifest-read-DFpujDzP.js} +16 -6
- package/dist/modules/interactive-prompt/index.js +2 -2
- package/dist/{run-DjjG9wNI.js → run-DJ7P6y4z.js} +4 -4
- package/dist/{run-BbgwnFFw.js → run-hO_G3pBQ.js} +86 -12
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
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-
|
|
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-CoJWnndU.js";
|
|
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, createGitWorktreeManager, 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-Dl3vBZil.js";
|
|
6
6
|
import "../adapter-registry-DXLMTmfD.js";
|
|
7
|
-
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-
|
|
8
|
-
import { AdapterTelemetryPersistence, AppError, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, EpicIngester, GLOBSTAR, GitClient, GrammarLoader, Minimatch, Minipass, RepoMapInjector, RepoMapModule, RepoMapQueryEngine, RepoMapStorage, SymbolParser, createContextCompiler, createDispatcher, createEventEmitter, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStopAfterGate, createTelemetryAdvisor, escape, formatPhaseCompletionSummary, getFactoryRunSummaries, getScenarioResultsForRun, getTwinRunsForRun, listGraphRuns, registerExportCommand, registerFactoryCommand, registerRunCommand, registerScenariosCommand, resolveStoryKeys, runAnalysisPhase, runPlanningPhase, runProbeAuthor, runSolutioningPhase, unescape, validateStopAfterFromConflict } from "../run-
|
|
7
|
+
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-DFpujDzP.js";
|
|
8
|
+
import { AdapterTelemetryPersistence, AppError, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, EpicIngester, GLOBSTAR, GitClient, GrammarLoader, Minimatch, Minipass, RepoMapInjector, RepoMapModule, RepoMapQueryEngine, RepoMapStorage, SymbolParser, createContextCompiler, createDispatcher, createEventEmitter, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStopAfterGate, createTelemetryAdvisor, escape, formatPhaseCompletionSummary, getFactoryRunSummaries, getScenarioResultsForRun, getTwinRunsForRun, listGraphRuns, registerExportCommand, registerFactoryCommand, registerRunCommand, registerScenariosCommand, resolveStoryKeys, runAnalysisPhase, runPlanningPhase, runProbeAuthor, runSolutioningPhase, unescape, validateStopAfterFromConflict } from "../run-hO_G3pBQ.js";
|
|
9
9
|
import "../errors-Dyyei2ah.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-BAPpON_C.js";
|
|
14
|
-
import "../interactive-prompt-
|
|
14
|
+
import "../interactive-prompt-BuoVYIgS.js";
|
|
15
15
|
import "../recovery-engine-BKGBeBnW.js";
|
|
16
16
|
import "../version-manager-impl-qFBiO4Eh.js";
|
|
17
17
|
import { registerUpgradeCommand } from "../upgrade-DGqUA_5f.js";
|
|
@@ -7126,7 +7126,7 @@ async function runStatusAction(options) {
|
|
|
7126
7126
|
logger$15.debug({ err }, "Work graph query failed, continuing without work graph data");
|
|
7127
7127
|
}
|
|
7128
7128
|
if (run === void 0) {
|
|
7129
|
-
const { inspectProcessTree: inspectProcessTree$1 } = await import("../health-
|
|
7129
|
+
const { inspectProcessTree: inspectProcessTree$1 } = await import("../health-D_taFoP2.js");
|
|
7130
7130
|
const substrateDirPath = join(projectRoot, ".substrate");
|
|
7131
7131
|
const processInfo = inspectProcessTree$1({
|
|
7132
7132
|
projectRoot,
|
|
@@ -8655,7 +8655,7 @@ async function runSupervisorAction(options, deps = {}) {
|
|
|
8655
8655
|
await initSchema(expAdapter);
|
|
8656
8656
|
const { runRunAction: runPipeline } = await import(
|
|
8657
8657
|
/* @vite-ignore */
|
|
8658
|
-
"../run-
|
|
8658
|
+
"../run-DJ7P6y4z.js"
|
|
8659
8659
|
);
|
|
8660
8660
|
const runStoryFn = async (opts) => {
|
|
8661
8661
|
const exitCode = await runPipeline({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createLogger } from "./logger-KeHncl-f.js";
|
|
2
2
|
import { DoltClient, DoltQueryError, createDatabaseAdapter$1 as createDatabaseAdapter, getLatestRun, getPipelineRunById, initSchema } from "./dist-Dl3vBZil.js";
|
|
3
|
-
import { resolveMainRepoRoot, resolveRunManifest } from "./manifest-read-
|
|
3
|
+
import { resolveMainRepoRoot, resolveRunManifest } from "./manifest-read-DFpujDzP.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-
|
|
1003
|
+
//# sourceMappingURL=health-CoJWnndU.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DEFAULT_STALL_THRESHOLD_SECONDS, getAllDescendantPids, getAutoHealthData, inspectProcessTree, isOrchestratorProcessLine, registerHealthCommand, runHealthAction } from "./health-
|
|
1
|
+
import { DEFAULT_STALL_THRESHOLD_SECONDS, getAllDescendantPids, getAutoHealthData, inspectProcessTree, isOrchestratorProcessLine, registerHealthCommand, runHealthAction } from "./health-CoJWnndU.js";
|
|
2
2
|
import "./logger-KeHncl-f.js";
|
|
3
3
|
import "./dist-Dl3vBZil.js";
|
|
4
|
-
import "./manifest-read-
|
|
4
|
+
import "./manifest-read-DFpujDzP.js";
|
|
5
5
|
import "./work-graph-repository-DZyJv5pV.js";
|
|
6
6
|
import "./decisions-CzSIEeGP.js";
|
|
7
7
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createLogger } from "./logger-KeHncl-f.js";
|
|
2
|
-
import { readCurrentRunId, resolveMainRepoRoot } from "./manifest-read-
|
|
2
|
+
import { readCurrentRunId, resolveMainRepoRoot } from "./manifest-read-DFpujDzP.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-
|
|
183
|
+
//# sourceMappingURL=interactive-prompt-BuoVYIgS.js.map
|
|
@@ -2244,10 +2244,10 @@ function detectTestCommand(workingDir) {
|
|
|
2244
2244
|
* do not mask their own exit code, so this is a tampering signal, not a style
|
|
2245
2245
|
* nit. Note: cannot catch arbitrary in-language masking (e.g. `python -c
|
|
2246
2246
|
* "...sys.exit(0)"`) — the trusted-profile read is the primary defense; this is
|
|
2247
|
-
* belt-and-braces for
|
|
2247
|
+
* belt-and-braces for common shell-wrapper masks; NOT a complete parser.
|
|
2248
2248
|
*/
|
|
2249
2249
|
function detectsExitCodeLaundering(command) {
|
|
2250
|
-
return /(\|\||;)\s*(true|:|exit\s+0)(\s
|
|
2250
|
+
return /(\|\||;)\s*(true|:|exit\s+0|return\s+0|exec\s+true)(?!\w)/.test(command) || /\{\s*(exit\s+0|true|:)\s*;?\s*\}/.test(command);
|
|
2251
2251
|
}
|
|
2252
2252
|
var TestSuiteCheck = class {
|
|
2253
2253
|
name = "test-suite";
|
|
@@ -2428,7 +2428,9 @@ const LANGUAGE_EXTENSIONS = {
|
|
|
2428
2428
|
".cc",
|
|
2429
2429
|
".cxx",
|
|
2430
2430
|
".hpp",
|
|
2431
|
-
".hh"
|
|
2431
|
+
".hh",
|
|
2432
|
+
".h",
|
|
2433
|
+
".hxx"
|
|
2432
2434
|
],
|
|
2433
2435
|
c: [".c", ".h"],
|
|
2434
2436
|
swift: [".swift"],
|
|
@@ -2460,8 +2462,6 @@ const ALWAYS_DENY_SEGMENTS = [
|
|
|
2460
2462
|
".venv",
|
|
2461
2463
|
"venv",
|
|
2462
2464
|
"__pycache__",
|
|
2463
|
-
"vendor",
|
|
2464
|
-
"target",
|
|
2465
2465
|
".gradle",
|
|
2466
2466
|
".tox",
|
|
2467
2467
|
".mypy_cache",
|
|
@@ -2520,6 +2520,16 @@ function classifyContamination(changedFiles, allowedLanguages) {
|
|
|
2520
2520
|
droppings.push(file);
|
|
2521
2521
|
continue;
|
|
2522
2522
|
}
|
|
2523
|
+
const allowGoVendor = allowedLanguages.includes("go");
|
|
2524
|
+
const allowJvmTarget = allowedLanguages.some((l) => l === "rust" || l === "java" || l === "kotlin" || l === "scala");
|
|
2525
|
+
if (!allowGoVendor && segments.includes("vendor")) {
|
|
2526
|
+
droppings.push(file);
|
|
2527
|
+
continue;
|
|
2528
|
+
}
|
|
2529
|
+
if (!allowJvmTarget && segments.includes("target")) {
|
|
2530
|
+
droppings.push(file);
|
|
2531
|
+
continue;
|
|
2532
|
+
}
|
|
2523
2533
|
const base = segments[segments.length - 1] ?? "";
|
|
2524
2534
|
if (!allowJs && JS_TOOLCHAIN_MANIFESTS.includes(base)) {
|
|
2525
2535
|
foreignToolchainManifests.push(file);
|
|
@@ -6372,4 +6382,4 @@ async function resolveRunManifest(dbRoot, runId) {
|
|
|
6372
6382
|
|
|
6373
6383
|
//#endregion
|
|
6374
6384
|
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 };
|
|
6375
|
-
//# sourceMappingURL=manifest-read-
|
|
6385
|
+
//# sourceMappingURL=manifest-read-DFpujDzP.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../logger-KeHncl-f.js";
|
|
2
2
|
import "../../dist-Dl3vBZil.js";
|
|
3
|
-
import "../../manifest-read-
|
|
4
|
-
import { runInteractivePrompt } from "../../interactive-prompt-
|
|
3
|
+
import "../../manifest-read-DFpujDzP.js";
|
|
4
|
+
import { runInteractivePrompt } from "../../interactive-prompt-BuoVYIgS.js";
|
|
5
5
|
|
|
6
6
|
export { runInteractivePrompt };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import "./health-
|
|
1
|
+
import "./health-CoJWnndU.js";
|
|
2
2
|
import "./logger-KeHncl-f.js";
|
|
3
3
|
import "./helpers-CElYrONe.js";
|
|
4
4
|
import "./dist-Dl3vBZil.js";
|
|
5
|
-
import "./manifest-read-
|
|
6
|
-
import { normalizeGraphSummaryToStatus, registerRunCommand, resolveMaxReviewCycles, resolveProbeAuthorStateIntegrating, runRunAction, wireNdjsonEmitter } from "./run-
|
|
5
|
+
import "./manifest-read-DFpujDzP.js";
|
|
6
|
+
import { normalizeGraphSummaryToStatus, registerRunCommand, resolveMaxReviewCycles, resolveProbeAuthorStateIntegrating, runRunAction, wireNdjsonEmitter } from "./run-hO_G3pBQ.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-BAPpON_C.js";
|
|
11
|
-
import "./interactive-prompt-
|
|
11
|
+
import "./interactive-prompt-BuoVYIgS.js";
|
|
12
12
|
import "./recovery-engine-BKGBeBnW.js";
|
|
13
13
|
|
|
14
14
|
export { runRunAction };
|
|
@@ -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-
|
|
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-CoJWnndU.js";
|
|
2
2
|
import { createLogger } from "./logger-KeHncl-f.js";
|
|
3
3
|
import { TypedEventBusImpl, createEventBus, createTuiApp, isTuiCapable, printNonTtyWarning, sleep } from "./helpers-CElYrONe.js";
|
|
4
4
|
import { ADVISORY_NOTES, BRANCH_PREFIX, CLAUDE_AUTH_FAILURE_HINT, 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, createGitWorktreeManager, createPipelineRun, createRequirement, detectClaudeAuthFailure, 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-Dl3vBZil.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-
|
|
5
|
+
import { FindingsInjector, RunManifest, RuntimeProbeListSchema, applyConfigToGraph, createDefaultVerificationPipeline, createGraphOrchestrator, createSdlcCodeReviewHandler, createSdlcCreateStoryHandler, createSdlcDevStoryHandler, createSdlcPhaseHandler, detectsEventDrivenAC, detectsStateIntegratingAC, extractTargetFilesFromStoryContent, parseRuntimeProbes, renderFindings, resolveGraphPath, resolveMainRepoRoot, runAcTraceabilityCheck, runStaleVerificationRecovery } from "./manifest-read-DFpujDzP.js";
|
|
6
6
|
import { WorkGraphRepository, detectCycles } from "./work-graph-repository-DZyJv5pV.js";
|
|
7
7
|
import { deriveExitCode, routeDecision } from "./decision-router-BAPpON_C.js";
|
|
8
|
-
import { runInteractivePrompt } from "./interactive-prompt-
|
|
8
|
+
import { runInteractivePrompt } from "./interactive-prompt-BuoVYIgS.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";
|
|
@@ -5340,7 +5340,7 @@ function checkGitModifiedTrackedFiles(workingDir = process.cwd(), baselineSha) {
|
|
|
5340
5340
|
return [];
|
|
5341
5341
|
}
|
|
5342
5342
|
const diffs = ["git diff --name-only HEAD", "git diff --cached --name-only"];
|
|
5343
|
-
if (baselineSha !== void 0 && baselineSha.length > 0) diffs.push(`git diff --name-only --diff-filter=
|
|
5343
|
+
if (baselineSha !== void 0 && baselineSha.length > 0) diffs.push(`git diff --name-only --diff-filter=MDR ${baselineSha}..HEAD`);
|
|
5344
5344
|
for (const args of diffs) try {
|
|
5345
5345
|
execSync(args, {
|
|
5346
5346
|
cwd: workingDir,
|
|
@@ -6901,8 +6901,12 @@ async function commitDevStoryOutput(storyKey, storyTitle, filesModified, working
|
|
|
6901
6901
|
const COMMIT_DENY_SEGMENTS = [
|
|
6902
6902
|
"node_modules",
|
|
6903
6903
|
".venv",
|
|
6904
|
+
"venv",
|
|
6904
6905
|
"__pycache__",
|
|
6905
|
-
".substrate-worktrees"
|
|
6906
|
+
".substrate-worktrees",
|
|
6907
|
+
".mypy_cache",
|
|
6908
|
+
".pytest_cache",
|
|
6909
|
+
".ruff_cache"
|
|
6906
6910
|
];
|
|
6907
6911
|
const insideWorktree = [];
|
|
6908
6912
|
for (const p of filesModified) {
|
|
@@ -6931,7 +6935,7 @@ async function commitDevStoryOutput(storyKey, storyTitle, filesModified, working
|
|
|
6931
6935
|
reason: "no-files-inside-worktree"
|
|
6932
6936
|
};
|
|
6933
6937
|
try {
|
|
6934
|
-
|
|
6938
|
+
execFileSync("git", ["add", ...insideWorktree], {
|
|
6935
6939
|
cwd: workingDir,
|
|
6936
6940
|
stdio: [
|
|
6937
6941
|
"ignore",
|
|
@@ -6970,7 +6974,11 @@ async function commitDevStoryOutput(storyKey, storyTitle, filesModified, working
|
|
|
6970
6974
|
const title = storyTitle ?? "implementation";
|
|
6971
6975
|
const message = `feat(story-${storyKey}): ${title}`;
|
|
6972
6976
|
try {
|
|
6973
|
-
|
|
6977
|
+
execFileSync("git", [
|
|
6978
|
+
"commit",
|
|
6979
|
+
"-m",
|
|
6980
|
+
message
|
|
6981
|
+
], {
|
|
6974
6982
|
cwd: workingDir,
|
|
6975
6983
|
stdio: [
|
|
6976
6984
|
"ignore",
|
|
@@ -7074,7 +7082,12 @@ async function checkpointStoryWorktree(storyKey, reason, workingDir) {
|
|
|
7074
7082
|
const cleanReason = (reason.split("\n")[0] ?? "checkpoint").split("").filter((ch) => ch.charCodeAt(0) >= 32).join("").slice(0, 100);
|
|
7075
7083
|
const message = `wip(story-${storyKey}): ${cleanReason}`;
|
|
7076
7084
|
try {
|
|
7077
|
-
|
|
7085
|
+
execFileSync("git", [
|
|
7086
|
+
"commit",
|
|
7087
|
+
"--no-verify",
|
|
7088
|
+
"-m",
|
|
7089
|
+
message
|
|
7090
|
+
], {
|
|
7078
7091
|
cwd: workingDir,
|
|
7079
7092
|
stdio: [
|
|
7080
7093
|
"ignore",
|
|
@@ -15835,7 +15848,7 @@ function createImplementationOrchestrator(deps) {
|
|
|
15835
15848
|
outputTokenCount: devOutputTokenCount,
|
|
15836
15849
|
sourceEpicContent,
|
|
15837
15850
|
...effectiveProjectRoot !== void 0 ? { changedFiles: recaptureChangedFiles(effectiveProjectRoot) } : {},
|
|
15838
|
-
...
|
|
15851
|
+
...effectiveProjectRoot !== void 0 ? { modifiedTrackedFiles: checkGitModifiedTrackedFiles(effectiveProjectRoot, baselineHeadSha) } : {},
|
|
15839
15852
|
runId: config.pipelineRunId
|
|
15840
15853
|
});
|
|
15841
15854
|
const retryVerifSummary = await verificationPipeline.run(retryVerifContext, "A");
|
|
@@ -16273,7 +16286,12 @@ function createImplementationOrchestrator(deps) {
|
|
|
16273
16286
|
if (finalizationMode === "branch" || finalizationMode === "pr") {
|
|
16274
16287
|
let prUrl;
|
|
16275
16288
|
if (finalizationMode === "pr") try {
|
|
16276
|
-
|
|
16289
|
+
execFileSync("git", [
|
|
16290
|
+
"push",
|
|
16291
|
+
"-u",
|
|
16292
|
+
"origin",
|
|
16293
|
+
branchName
|
|
16294
|
+
], {
|
|
16277
16295
|
cwd: projectRoot,
|
|
16278
16296
|
stdio: [
|
|
16279
16297
|
"ignore",
|
|
@@ -16283,7 +16301,16 @@ function createImplementationOrchestrator(deps) {
|
|
|
16283
16301
|
timeout: 6e4
|
|
16284
16302
|
});
|
|
16285
16303
|
const shortSha = (storyDeliverableSha ?? "").slice(0, 10);
|
|
16286
|
-
const ghOutput =
|
|
16304
|
+
const ghOutput = execFileSync("gh", [
|
|
16305
|
+
"pr",
|
|
16306
|
+
"create",
|
|
16307
|
+
"--head",
|
|
16308
|
+
branchName,
|
|
16309
|
+
"--title",
|
|
16310
|
+
`story ${storyKey}: ${_capturedStoryTitle ?? "implementation"}`,
|
|
16311
|
+
"--body",
|
|
16312
|
+
`Substrate story ${storyKey} (commit ${shortSha}). Verified by the Tier-A pipeline; see the run manifest for the full verification record.`
|
|
16313
|
+
], {
|
|
16287
16314
|
cwd: projectRoot,
|
|
16288
16315
|
encoding: "utf-8",
|
|
16289
16316
|
stdio: [
|
|
@@ -16625,6 +16652,26 @@ function createImplementationOrchestrator(deps) {
|
|
|
16625
16652
|
continue;
|
|
16626
16653
|
}
|
|
16627
16654
|
if (isPhantomReview && timeoutRetried) {
|
|
16655
|
+
const phantomAuthSignature = detectClaudeAuthFailure(reviewResult.error ?? "");
|
|
16656
|
+
if (phantomAuthSignature !== null) {
|
|
16657
|
+
endPhase(storyKey, "code-review");
|
|
16658
|
+
updateStory(storyKey, {
|
|
16659
|
+
phase: "ESCALATED",
|
|
16660
|
+
error: "auth-failure",
|
|
16661
|
+
completedAt: new Date().toISOString()
|
|
16662
|
+
});
|
|
16663
|
+
await writeStoryMetricsBestEffort(storyKey, "escalated", reviewCycles + 1);
|
|
16664
|
+
await emitEscalation({
|
|
16665
|
+
storyKey,
|
|
16666
|
+
lastVerdict: "auth-failure",
|
|
16667
|
+
reviewCycles: reviewCycles + 1,
|
|
16668
|
+
issues: [reviewResult.error ?? "", CLAUDE_AUTH_FAILURE_HINT],
|
|
16669
|
+
escalationReason: "auth-failure"
|
|
16670
|
+
});
|
|
16671
|
+
await triggerAuthFailureHalt(storyKey, phantomAuthSignature);
|
|
16672
|
+
await persistState();
|
|
16673
|
+
return;
|
|
16674
|
+
}
|
|
16628
16675
|
const isStoryFileMissing = (reviewResult.error ?? "").includes("story-file-missing");
|
|
16629
16676
|
const escalationReason = isStoryFileMissing ? "story-file-missing" : "consecutive-review-timeouts";
|
|
16630
16677
|
logger$27.warn({
|
|
@@ -16704,6 +16751,25 @@ function createImplementationOrchestrator(deps) {
|
|
|
16704
16751
|
} catch (err) {
|
|
16705
16752
|
const errMsg = err instanceof Error ? err.message : String(err);
|
|
16706
16753
|
endPhase(storyKey, "code-review");
|
|
16754
|
+
const reviewAuthSignature = detectClaudeAuthFailure(errMsg);
|
|
16755
|
+
if (reviewAuthSignature !== null) {
|
|
16756
|
+
updateStory(storyKey, {
|
|
16757
|
+
phase: "ESCALATED",
|
|
16758
|
+
error: "auth-failure",
|
|
16759
|
+
completedAt: new Date().toISOString()
|
|
16760
|
+
});
|
|
16761
|
+
await writeStoryMetricsBestEffort(storyKey, "failed", reviewCycles);
|
|
16762
|
+
await emitEscalation({
|
|
16763
|
+
storyKey,
|
|
16764
|
+
lastVerdict: "auth-failure",
|
|
16765
|
+
reviewCycles,
|
|
16766
|
+
issues: [errMsg, CLAUDE_AUTH_FAILURE_HINT],
|
|
16767
|
+
escalationReason: "auth-failure"
|
|
16768
|
+
});
|
|
16769
|
+
await triggerAuthFailureHalt(storyKey, reviewAuthSignature);
|
|
16770
|
+
await persistState();
|
|
16771
|
+
return;
|
|
16772
|
+
}
|
|
16707
16773
|
updateStory(storyKey, {
|
|
16708
16774
|
phase: "ESCALATED",
|
|
16709
16775
|
error: errMsg,
|
|
@@ -16929,6 +16995,10 @@ function createImplementationOrchestrator(deps) {
|
|
|
16929
16995
|
storyKey
|
|
16930
16996
|
});
|
|
16931
16997
|
const fixResult = await handle.result;
|
|
16998
|
+
{
|
|
16999
|
+
const fixFiles = fixResult.parsed?.files_modified;
|
|
17000
|
+
if (Array.isArray(fixFiles)) devFilesModified = Array.from(new Set([...devFilesModified, ...fixFiles.filter((f$1) => typeof f$1 === "string")]));
|
|
17001
|
+
}
|
|
16932
17002
|
eventBus.emit("orchestrator:story-phase-complete", {
|
|
16933
17003
|
storyKey,
|
|
16934
17004
|
phase: "IN_MINOR_FIX",
|
|
@@ -17136,6 +17206,10 @@ function createImplementationOrchestrator(deps) {
|
|
|
17136
17206
|
});
|
|
17137
17207
|
const fixResult = await handle.result;
|
|
17138
17208
|
endPhase(storyKey, "fix");
|
|
17209
|
+
{
|
|
17210
|
+
const fixFiles = fixResult.parsed?.files_modified;
|
|
17211
|
+
if (Array.isArray(fixFiles)) devFilesModified = Array.from(new Set([...devFilesModified, ...fixFiles.filter((f$1) => typeof f$1 === "string")]));
|
|
17212
|
+
}
|
|
17139
17213
|
eventBus.emit("orchestrator:story-phase-complete", {
|
|
17140
17214
|
storyKey,
|
|
17141
17215
|
phase: taskType === "minor-fixes" ? "IN_MINOR_FIX" : "IN_MAJOR_FIX",
|
|
@@ -48013,4 +48087,4 @@ function registerRunCommand(program, version = "0.0.0", projectRoot = process.cw
|
|
|
48013
48087
|
|
|
48014
48088
|
//#endregion
|
|
48015
48089
|
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, 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 };
|
|
48016
|
-
//# sourceMappingURL=run-
|
|
48090
|
+
//# sourceMappingURL=run-hO_G3pBQ.js.map
|