substrate-ai 0.20.151 → 0.20.152
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-BERxzeG-.js → health-Bj5OYB7r.js} +2 -2
- package/dist/{health-CoJ3nBWL.js → health-DK5Kk5Bi.js} +2 -2
- package/dist/{interactive-prompt-UWLccCqL.js → interactive-prompt-Du_Yt_N4.js} +2 -2
- package/dist/{manifest-read-BOvY53EG.js → manifest-read-BAN_-QKy.js} +29 -2
- package/dist/modules/interactive-prompt/index.js +2 -2
- package/dist/{run-Csg27VHs.js → run-BbXX6gY5.js} +4 -4
- package/dist/{run-Dgqfz9HY.js → run-DbT2-Wzg.js} +24 -7
- 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-Bj5OYB7r.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-90byyGPp.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-BAN_-QKy.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-DbT2-Wzg.js";
|
|
9
9
|
import "../errors-ST3E8qWc.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-Du_Yt_N4.js";
|
|
15
15
|
import "../recovery-engine-BKGBeBnW.js";
|
|
16
16
|
import "../version-manager-impl-qFBiO4Eh.js";
|
|
17
17
|
import { registerUpgradeCommand } from "../upgrade-Dw6jKkH3.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-DK5Kk5Bi.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-BbXX6gY5.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-90byyGPp.js";
|
|
3
|
-
import { resolveMainRepoRoot, resolveRunManifest } from "./manifest-read-
|
|
3
|
+
import { resolveMainRepoRoot, resolveRunManifest } from "./manifest-read-BAN_-QKy.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-Bj5OYB7r.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-Bj5OYB7r.js";
|
|
2
2
|
import "./logger-KeHncl-f.js";
|
|
3
3
|
import "./dist-90byyGPp.js";
|
|
4
|
-
import "./manifest-read-
|
|
4
|
+
import "./manifest-read-BAN_-QKy.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-BAN_-QKy.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-Du_Yt_N4.js.map
|
|
@@ -2235,6 +2235,20 @@ function detectTestCommand(workingDir) {
|
|
|
2235
2235
|
} catch {}
|
|
2236
2236
|
return void 0;
|
|
2237
2237
|
}
|
|
2238
|
+
/**
|
|
2239
|
+
* H7 (trust-boundary hardening): detect exit-code LAUNDERING in a resolved test
|
|
2240
|
+
* command — a wrapper that forces exit 0 regardless of the real suite result
|
|
2241
|
+
* (`… || true`, `… || :`, `… || exit 0`, `… ; true`, `… ; exit 0`). A
|
|
2242
|
+
* reward-hacking agent used this to make a genuinely-red suite report pass
|
|
2243
|
+
* (verified against compiled dist in the red-team review). Legitimate commands
|
|
2244
|
+
* do not mask their own exit code, so this is a tampering signal, not a style
|
|
2245
|
+
* nit. Note: cannot catch arbitrary in-language masking (e.g. `python -c
|
|
2246
|
+
* "...sys.exit(0)"`) — the trusted-profile read is the primary defense; this is
|
|
2247
|
+
* belt-and-braces for the shell-wrapper class and the --no-worktree path.
|
|
2248
|
+
*/
|
|
2249
|
+
function detectsExitCodeLaundering(command) {
|
|
2250
|
+
return /(\|\||;)\s*(true|:|exit\s+0)(\s|;|$)/.test(command);
|
|
2251
|
+
}
|
|
2238
2252
|
var TestSuiteCheck = class {
|
|
2239
2253
|
name = "test-suite";
|
|
2240
2254
|
tier = "A";
|
|
@@ -2255,6 +2269,19 @@ var TestSuiteCheck = class {
|
|
|
2255
2269
|
findings
|
|
2256
2270
|
};
|
|
2257
2271
|
}
|
|
2272
|
+
if (cmd !== void 0 && cmd !== "" && detectsExitCodeLaundering(cmd)) {
|
|
2273
|
+
const findings = [{
|
|
2274
|
+
category: "test-command-tampered",
|
|
2275
|
+
severity: "error",
|
|
2276
|
+
message: `test command masks its own exit code (\`${cmd}\`) — a wrapper like \`|| true\` / \`; exit 0\` forces a pass regardless of the real suite result. Remove the exit-code mask; the suite must fail the story when tests fail.`
|
|
2277
|
+
}];
|
|
2278
|
+
return {
|
|
2279
|
+
status: "fail",
|
|
2280
|
+
details: renderFindings(findings),
|
|
2281
|
+
duration_ms: Date.now() - start,
|
|
2282
|
+
findings
|
|
2283
|
+
};
|
|
2284
|
+
}
|
|
2258
2285
|
if (cmd === void 0 || cmd === "") {
|
|
2259
2286
|
const findings = [{
|
|
2260
2287
|
category: "test-suite-skip",
|
|
@@ -2486,7 +2513,7 @@ var ContaminationCheck = class {
|
|
|
2486
2513
|
duration_ms: Date.now() - start,
|
|
2487
2514
|
findings: []
|
|
2488
2515
|
};
|
|
2489
|
-
const allowedLanguages = readProfileLanguages(context.workingDir);
|
|
2516
|
+
const allowedLanguages = context.trustedLanguages ?? readProfileLanguages(context.workingDir);
|
|
2490
2517
|
if (allowedLanguages.length === 0) {
|
|
2491
2518
|
const findings$1 = [{
|
|
2492
2519
|
category: "contamination-skip",
|
|
@@ -6304,4 +6331,4 @@ async function resolveRunManifest(dbRoot, runId) {
|
|
|
6304
6331
|
|
|
6305
6332
|
//#endregion
|
|
6306
6333
|
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 };
|
|
6307
|
-
//# sourceMappingURL=manifest-read-
|
|
6334
|
+
//# sourceMappingURL=manifest-read-BAN_-QKy.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../logger-KeHncl-f.js";
|
|
2
2
|
import "../../dist-90byyGPp.js";
|
|
3
|
-
import "../../manifest-read-
|
|
4
|
-
import { runInteractivePrompt } from "../../interactive-prompt-
|
|
3
|
+
import "../../manifest-read-BAN_-QKy.js";
|
|
4
|
+
import { runInteractivePrompt } from "../../interactive-prompt-Du_Yt_N4.js";
|
|
5
5
|
|
|
6
6
|
export { runInteractivePrompt };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import "./health-
|
|
1
|
+
import "./health-Bj5OYB7r.js";
|
|
2
2
|
import "./logger-KeHncl-f.js";
|
|
3
3
|
import "./helpers-CElYrONe.js";
|
|
4
4
|
import "./dist-90byyGPp.js";
|
|
5
|
-
import "./manifest-read-
|
|
6
|
-
import { normalizeGraphSummaryToStatus, registerRunCommand, resolveMaxReviewCycles, resolveProbeAuthorStateIntegrating, runRunAction, wireNdjsonEmitter } from "./run-
|
|
5
|
+
import "./manifest-read-BAN_-QKy.js";
|
|
6
|
+
import { normalizeGraphSummaryToStatus, registerRunCommand, resolveMaxReviewCycles, resolveProbeAuthorStateIntegrating, runRunAction, wireNdjsonEmitter } from "./run-DbT2-Wzg.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-Du_Yt_N4.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-Bj5OYB7r.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-90byyGPp.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-BAN_-QKy.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-Du_Yt_N4.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";
|
|
@@ -12090,8 +12090,10 @@ function assembleVerificationContext(opts) {
|
|
|
12090
12090
|
} catch {
|
|
12091
12091
|
commitSha = "unknown";
|
|
12092
12092
|
}
|
|
12093
|
-
const
|
|
12094
|
-
const
|
|
12093
|
+
const trustedDir = opts.trustedProfileDir ?? opts.workingDir;
|
|
12094
|
+
const profileBuildCommand = readProfileKey(trustedDir, "buildCommand");
|
|
12095
|
+
const profileTestCommand = readProfileKey(trustedDir, "testCommand");
|
|
12096
|
+
const trustedLanguages = readProfileLanguagesLocal(trustedDir);
|
|
12095
12097
|
return {
|
|
12096
12098
|
storyKey: opts.storyKey,
|
|
12097
12099
|
workingDir: opts.workingDir,
|
|
@@ -12106,13 +12108,26 @@ function assembleVerificationContext(opts) {
|
|
|
12106
12108
|
...opts.changedFiles !== void 0 ? { changedFiles: opts.changedFiles } : {},
|
|
12107
12109
|
...opts.modifiedTrackedFiles !== void 0 ? { modifiedTrackedFiles: opts.modifiedTrackedFiles } : {},
|
|
12108
12110
|
...profileBuildCommand !== void 0 ? { buildCommand: profileBuildCommand } : {},
|
|
12109
|
-
...profileTestCommand !== void 0 ? { testCommand: profileTestCommand } : {}
|
|
12111
|
+
...profileTestCommand !== void 0 ? { testCommand: profileTestCommand } : {},
|
|
12112
|
+
...trustedLanguages.length > 0 ? { trustedLanguages } : {}
|
|
12110
12113
|
};
|
|
12111
12114
|
}
|
|
12112
12115
|
/**
|
|
12113
12116
|
* Read a single `<key>: value` line from `.substrate/project-profile.yaml`
|
|
12114
12117
|
* under `workingDir` (H1.2). Line-based parse — no yaml dependency.
|
|
12115
12118
|
*/
|
|
12119
|
+
function readProfileLanguagesLocal(dir) {
|
|
12120
|
+
const profilePath = join$1(dir, ".substrate", "project-profile.yaml");
|
|
12121
|
+
if (!existsSync(profilePath)) return [];
|
|
12122
|
+
try {
|
|
12123
|
+
const content = readFileSync(profilePath, "utf-8");
|
|
12124
|
+
const langs = new Set();
|
|
12125
|
+
for (const m of content.matchAll(/^\s*(?:-\s+)?language:\s*['"]?([a-z]+)['"]?\s*$/gm)) if (m[1] !== void 0) langs.add(m[1]);
|
|
12126
|
+
return [...langs];
|
|
12127
|
+
} catch {
|
|
12128
|
+
return [];
|
|
12129
|
+
}
|
|
12130
|
+
}
|
|
12116
12131
|
function readProfileKey(workingDir, key) {
|
|
12117
12132
|
const profilePath = join$1(workingDir, ".substrate", "project-profile.yaml");
|
|
12118
12133
|
if (!existsSync(profilePath)) return void 0;
|
|
@@ -15640,6 +15655,7 @@ function createImplementationOrchestrator(deps) {
|
|
|
15640
15655
|
const verifContext = assembleVerificationContext({
|
|
15641
15656
|
storyKey,
|
|
15642
15657
|
workingDir: effectiveProjectRoot ?? process.cwd(),
|
|
15658
|
+
...projectRoot !== void 0 ? { trustedProfileDir: projectRoot } : {},
|
|
15643
15659
|
reviewResult: latestReviewSignals,
|
|
15644
15660
|
storyContent: storyContentForVerification,
|
|
15645
15661
|
devStoryResult: devStorySignals,
|
|
@@ -15730,6 +15746,7 @@ function createImplementationOrchestrator(deps) {
|
|
|
15730
15746
|
const retryVerifContext = assembleVerificationContext({
|
|
15731
15747
|
storyKey,
|
|
15732
15748
|
workingDir: effectiveProjectRoot ?? process.cwd(),
|
|
15749
|
+
...projectRoot !== void 0 ? { trustedProfileDir: projectRoot } : {},
|
|
15733
15750
|
reviewResult: latestReviewSignals,
|
|
15734
15751
|
storyContent: storyContentForVerification,
|
|
15735
15752
|
devStoryResult: devStorySignals,
|
|
@@ -47886,4 +47903,4 @@ function registerRunCommand(program, version = "0.0.0", projectRoot = process.cw
|
|
|
47886
47903
|
|
|
47887
47904
|
//#endregion
|
|
47888
47905
|
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 };
|
|
47889
|
-
//# sourceMappingURL=run-
|
|
47906
|
+
//# sourceMappingURL=run-DbT2-Wzg.js.map
|