substrate-ai 0.19.36 → 0.19.38
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/adapter-registry-l9wysBOr.js +4 -0
- package/dist/cli/index.js +13 -13
- package/dist/{decisions-8djApJK3.js → decisions-Cy3hK4HO.js} +1 -1
- package/dist/{dist-6ETBV23_.js → dist-BUcEqXA1.js} +20 -6
- package/dist/{errors-QZ2_FzOB.js → errors-BZnrgeyp.js} +2 -2
- package/dist/{experimenter-BuEVrH4r.js → experimenter-DivOnzd-.js} +1 -1
- package/dist/{health-B28gVggH.js → health-CINTkPJp.js} +2 -2
- package/dist/{health-Ckl2VOPW.js → health-DMu0MJ-N.js} +2 -2
- package/dist/index.js +2 -2
- package/dist/{routing-CvFTGTH-.js → routing-CfkRvmSE.js} +1 -1
- package/dist/{run-BnYv46or.js → run-D_863wfb.js} +33 -7
- package/dist/{run-V2hA6nZZ.js → run-mGdGxU_1.js} +3 -3
- package/dist/{upgrade-Bid6Q1G2.js → upgrade-B5faf8E9.js} +2 -2
- package/dist/{upgrade-CUs8N7Sc.js → upgrade-CABZfjn_.js} +2 -2
- package/dist/{version-manager-impl-BdRRhlI6.js → version-manager-impl-C-lKxyO_.js} +1 -1
- package/package.json +1 -1
- package/dist/adapter-registry-TGAj9NRP.js +0 -4
package/dist/cli/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { FileStateStore, RunManifest, SUBSTRATE_OWNED_SETTINGS_KEYS, SupervisorLock, VALID_PHASES, WorkGraphRepository, buildPipelineStatusOutput, createDatabaseAdapter, createStateStore, findPackageRoot, formatOutput, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, inspectProcessTree, parseDbTimestampAsUtc, registerHealthCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion, resolveMainRepoRoot, resolveRunManifest } from "../health-
|
|
2
|
+
import { FileStateStore, RunManifest, SUBSTRATE_OWNED_SETTINGS_KEYS, SupervisorLock, VALID_PHASES, WorkGraphRepository, buildPipelineStatusOutput, createDatabaseAdapter, createStateStore, findPackageRoot, formatOutput, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, inspectProcessTree, parseDbTimestampAsUtc, registerHealthCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion, resolveMainRepoRoot, resolveRunManifest } from "../health-DMu0MJ-N.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, 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-
|
|
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-BUcEqXA1.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-
|
|
8
|
-
import "../errors-
|
|
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-D_863wfb.js";
|
|
8
|
+
import "../errors-BZnrgeyp.js";
|
|
9
9
|
import "../routing-CcBOCuC9.js";
|
|
10
10
|
import "../decisions-C0pz9Clx.js";
|
|
11
11
|
import "../version-manager-impl-BmOWu8ml.js";
|
|
12
|
-
import { registerUpgradeCommand } from "../upgrade-
|
|
12
|
+
import { registerUpgradeCommand } from "../upgrade-CABZfjn_.js";
|
|
13
13
|
import { Command } from "commander";
|
|
14
14
|
import { fileURLToPath } from "url";
|
|
15
15
|
import { dirname, join, resolve } from "path";
|
|
@@ -3307,7 +3307,7 @@ async function runStatusAction(options) {
|
|
|
3307
3307
|
logger$12.debug({ err }, "Work graph query failed, continuing without work graph data");
|
|
3308
3308
|
}
|
|
3309
3309
|
if (run === void 0) {
|
|
3310
|
-
const { inspectProcessTree: inspectProcessTree$1 } = await import("../health-
|
|
3310
|
+
const { inspectProcessTree: inspectProcessTree$1 } = await import("../health-CINTkPJp.js");
|
|
3311
3311
|
const substrateDirPath = join(projectRoot, ".substrate");
|
|
3312
3312
|
const processInfo = inspectProcessTree$1({
|
|
3313
3313
|
projectRoot,
|
|
@@ -4252,7 +4252,7 @@ function defaultSupervisorDeps() {
|
|
|
4252
4252
|
if (cached === null) {
|
|
4253
4253
|
const { AdapterRegistry: AR } = await import(
|
|
4254
4254
|
/* @vite-ignore */
|
|
4255
|
-
"../adapter-registry-
|
|
4255
|
+
"../adapter-registry-l9wysBOr.js"
|
|
4256
4256
|
);
|
|
4257
4257
|
cached = new AR();
|
|
4258
4258
|
await cached.discoverAndRegister();
|
|
@@ -4819,11 +4819,11 @@ async function runSupervisorAction(options, deps = {}) {
|
|
|
4819
4819
|
try {
|
|
4820
4820
|
const { createExperimenter } = await import(
|
|
4821
4821
|
/* @vite-ignore */
|
|
4822
|
-
"../experimenter-
|
|
4822
|
+
"../experimenter-DivOnzd-.js"
|
|
4823
4823
|
);
|
|
4824
4824
|
const { getLatestRun: getLatest } = await import(
|
|
4825
4825
|
/* @vite-ignore */
|
|
4826
|
-
"../decisions-
|
|
4826
|
+
"../decisions-Cy3hK4HO.js"
|
|
4827
4827
|
);
|
|
4828
4828
|
const expAdapter = createDatabaseAdapter({
|
|
4829
4829
|
backend: "auto",
|
|
@@ -4833,7 +4833,7 @@ async function runSupervisorAction(options, deps = {}) {
|
|
|
4833
4833
|
await initSchema(expAdapter);
|
|
4834
4834
|
const { runRunAction: runPipeline } = await import(
|
|
4835
4835
|
/* @vite-ignore */
|
|
4836
|
-
"../run-
|
|
4836
|
+
"../run-mGdGxU_1.js"
|
|
4837
4837
|
);
|
|
4838
4838
|
const runStoryFn = async (opts) => {
|
|
4839
4839
|
const exitCode = await runPipeline({
|
|
@@ -5365,7 +5365,7 @@ async function runMetricsAction(options) {
|
|
|
5365
5365
|
const routingConfigPath = join(dbDir, "routing.yml");
|
|
5366
5366
|
let routingConfig = null;
|
|
5367
5367
|
if (existsSync$1(routingConfigPath)) try {
|
|
5368
|
-
const { loadModelRoutingConfig } = await import("../routing-
|
|
5368
|
+
const { loadModelRoutingConfig } = await import("../routing-CfkRvmSE.js");
|
|
5369
5369
|
routingConfig = loadModelRoutingConfig(routingConfigPath);
|
|
5370
5370
|
} catch {}
|
|
5371
5371
|
if (routingConfig === null) routingConfig = {
|
|
@@ -8620,8 +8620,8 @@ async function createProgram() {
|
|
|
8620
8620
|
/** Fire-and-forget startup version check (story 8.3, AC3/AC5) */
|
|
8621
8621
|
function checkForUpdatesInBackground(currentVersion) {
|
|
8622
8622
|
if (process.env.SUBSTRATE_NO_UPDATE_CHECK === "1") return;
|
|
8623
|
-
import("../upgrade-
|
|
8624
|
-
const { createVersionManager } = await import("../version-manager-impl-
|
|
8623
|
+
import("../upgrade-B5faf8E9.js").then(async () => {
|
|
8624
|
+
const { createVersionManager } = await import("../version-manager-impl-C-lKxyO_.js");
|
|
8625
8625
|
const vm = createVersionManager();
|
|
8626
8626
|
const result = await vm.checkForUpdates();
|
|
8627
8627
|
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-
|
|
1
|
+
import { addTokenUsage, createDecision, createPipelineRun, createRequirement, getArtifactByTypeForRun, getArtifactsByRun, getDecisionsByCategory, getDecisionsByPhase, getDecisionsByPhaseForRun, getLatestRun, getPipelineRunById, getRunningPipelineRuns, getTokenUsageSummary, listRequirements, registerArtifact, updateDecision, updatePipelineRun, updatePipelineRunConfig, upsertDecision } from "./dist-BUcEqXA1.js";
|
|
2
2
|
import "./decisions-C0pz9Clx.js";
|
|
3
3
|
|
|
4
4
|
export { getLatestRun };
|
|
@@ -1264,7 +1264,9 @@ var DispatcherImpl = class {
|
|
|
1264
1264
|
output: stdout,
|
|
1265
1265
|
inputTokens,
|
|
1266
1266
|
outputTokens: Math.ceil(stdout.length / CHARS_PER_TOKEN$3),
|
|
1267
|
-
qualityScore: quality$1.qualityScore
|
|
1267
|
+
qualityScore: quality$1.qualityScore,
|
|
1268
|
+
agent,
|
|
1269
|
+
...effectiveModel !== void 0 && { model: effectiveModel }
|
|
1268
1270
|
});
|
|
1269
1271
|
this._logger.warn({
|
|
1270
1272
|
id,
|
|
@@ -1308,7 +1310,9 @@ var DispatcherImpl = class {
|
|
|
1308
1310
|
output: stdout,
|
|
1309
1311
|
inputTokens,
|
|
1310
1312
|
outputTokens: Math.ceil(stdout.length / CHARS_PER_TOKEN$3),
|
|
1311
|
-
qualityScore: quality.qualityScore
|
|
1313
|
+
qualityScore: quality.qualityScore,
|
|
1314
|
+
agent,
|
|
1315
|
+
...effectiveModel !== void 0 && { model: effectiveModel }
|
|
1312
1316
|
});
|
|
1313
1317
|
this._logger.debug({
|
|
1314
1318
|
id,
|
|
@@ -2747,6 +2751,13 @@ async function initSchema(adapter) {
|
|
|
2747
2751
|
UNIQUE(run_id, story_key)
|
|
2748
2752
|
)
|
|
2749
2753
|
`);
|
|
2754
|
+
for (const col of [
|
|
2755
|
+
"primary_agent_id VARCHAR(64)",
|
|
2756
|
+
"primary_model VARCHAR(128)",
|
|
2757
|
+
"dispatch_agents_json TEXT"
|
|
2758
|
+
]) try {
|
|
2759
|
+
await adapter.exec(`ALTER TABLE story_metrics ADD COLUMN ${col}`);
|
|
2760
|
+
} catch {}
|
|
2750
2761
|
await adapter.exec(`
|
|
2751
2762
|
CREATE TABLE IF NOT EXISTS task_metrics (
|
|
2752
2763
|
task_id VARCHAR(255) NOT NULL,
|
|
@@ -3924,8 +3935,8 @@ async function writeStoryMetrics(adapter, input) {
|
|
|
3924
3935
|
await tx.query(`INSERT INTO story_metrics (
|
|
3925
3936
|
run_id, story_key, result, phase_durations_json, started_at, completed_at,
|
|
3926
3937
|
wall_clock_seconds, input_tokens, output_tokens, cost_usd,
|
|
3927
|
-
review_cycles, dispatches
|
|
3928
|
-
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`, [
|
|
3938
|
+
review_cycles, dispatches, primary_agent_id, primary_model, dispatch_agents_json
|
|
3939
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`, [
|
|
3929
3940
|
input.run_id,
|
|
3930
3941
|
input.story_key,
|
|
3931
3942
|
input.result,
|
|
@@ -3937,7 +3948,10 @@ async function writeStoryMetrics(adapter, input) {
|
|
|
3937
3948
|
input.output_tokens ?? 0,
|
|
3938
3949
|
input.cost_usd ?? 0,
|
|
3939
3950
|
input.review_cycles ?? 0,
|
|
3940
|
-
input.dispatches ?? 0
|
|
3951
|
+
input.dispatches ?? 0,
|
|
3952
|
+
input.primary_agent_id ?? null,
|
|
3953
|
+
input.primary_model ?? null,
|
|
3954
|
+
input.dispatch_agents_json ?? null
|
|
3941
3955
|
]);
|
|
3942
3956
|
});
|
|
3943
3957
|
}
|
|
@@ -10794,4 +10808,4 @@ async function callLLM(params) {
|
|
|
10794
10808
|
|
|
10795
10809
|
//#endregion
|
|
10796
10810
|
export { ADVISORY_NOTES, AdapterRegistry, AdtError, BudgetConfigSchema, 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, 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, compareRunMetrics, createAmendmentRun, createConfigSystem, createDatabaseAdapter as createDatabaseAdapter$1, createDecision, createDoltClient, createExperimenter, createPipelineRun, createRequirement, createVersionManager, detectInterfaceChanges, determineVerdict, getActiveDecisions, getAllCostEntriesFiltered, getArtifactByTypeForRun, getArtifactsByRun, getBaselineRunMetrics, getDecisionsByCategory, getDecisionsByPhase, getDecisionsByPhaseForRun, getLatestCompletedRun, getLatestRun, getModelTier, getPipelineRunById, getPlanningCostTotal, getRetryableEscalations, getRunMetrics, getRunningPipelineRuns, getSessionCostSummary, getSessionCostSummaryFiltered, getStoryMetricsForRun, getTokenUsageSummary, incrementRunRestarts, initSchema, initializeDolt, listRequirements, listRunMetrics, loadModelRoutingConfig, loadParentRunDecisions, registerArtifact, resolvePromptFile, supersedeDecision, tagRunAsBaseline, updateDecision, updatePipelineRun, updatePipelineRunConfig, upsertDecision, writeRunMetrics, writeStoryMetrics };
|
|
10797
|
-
//# sourceMappingURL=dist-
|
|
10811
|
+
//# sourceMappingURL=dist-BUcEqXA1.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AdtError } from "./dist-
|
|
1
|
+
import { AdtError } from "./dist-BUcEqXA1.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-
|
|
74
|
+
//# sourceMappingURL=errors-BZnrgeyp.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { buildAuditLogEntry, buildBranchName, buildModificationDirective, buildPRBody, buildWorktreePath, createExperimenter, determineVerdict, resolvePromptFile } from "./dist-
|
|
1
|
+
import { buildAuditLogEntry, buildBranchName, buildModificationDirective, buildPRBody, buildWorktreePath, createExperimenter, determineVerdict, resolvePromptFile } from "./dist-BUcEqXA1.js";
|
|
2
2
|
|
|
3
3
|
export { createExperimenter };
|
|
@@ -1,6 +1,6 @@
|
|
|
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-DMu0MJ-N.js";
|
|
2
2
|
import "./logger-KeHncl-f.js";
|
|
3
|
-
import "./dist-
|
|
3
|
+
import "./dist-BUcEqXA1.js";
|
|
4
4
|
import "./decisions-C0pz9Clx.js";
|
|
5
5
|
|
|
6
6
|
export { inspectProcessTree };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createLogger } from "./logger-KeHncl-f.js";
|
|
2
|
-
import { DoltClient, DoltQueryError, LEARNING_FINDING, createDatabaseAdapter$1 as createDatabaseAdapter, createDecision, getDecisionsByCategory, getLatestRun, getPipelineRunById, initSchema } from "./dist-
|
|
2
|
+
import { DoltClient, DoltQueryError, LEARNING_FINDING, createDatabaseAdapter$1 as createDatabaseAdapter, createDecision, getDecisionsByCategory, getLatestRun, getPipelineRunById, initSchema } from "./dist-BUcEqXA1.js";
|
|
3
3
|
import { createRequire } from "module";
|
|
4
4
|
import { dirname, join } from "path";
|
|
5
5
|
import { readFile } from "fs/promises";
|
|
@@ -4253,4 +4253,4 @@ function registerHealthCommand(program, _version = "0.0.0", projectRoot = proces
|
|
|
4253
4253
|
|
|
4254
4254
|
//#endregion
|
|
4255
4255
|
export { BMAD_BASELINE_TOKENS_FULL, DEFAULT_STALL_THRESHOLD_SECONDS, DoltMergeConflict, FileStateStore, FindingsInjector, RunManifest, STOP_AFTER_VALID_PHASES, STORY_KEY_PATTERN$1 as STORY_KEY_PATTERN, SUBSTRATE_OWNED_SETTINGS_KEYS, SupervisorLock, VALID_PHASES, WorkGraphRepository, __commonJS, __require, __toESM, applyConfigToGraph, buildPipelineStatusOutput, createDatabaseAdapter$1 as createDatabaseAdapter, createGraphOrchestrator, createSdlcCodeReviewHandler, createSdlcCreateStoryHandler, createSdlcDevStoryHandler, createSdlcPhaseHandler, createStateStore, detectCycles, extractTargetFilesFromStoryContent, findPackageRoot, formatOutput, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, inspectProcessTree, isOrchestratorProcessLine, parseDbTimestampAsUtc, registerHealthCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion, resolveGraphPath, resolveMainRepoRoot, resolveRunManifest, runHealthAction, validateStoryKey };
|
|
4256
|
-
//# sourceMappingURL=health-
|
|
4256
|
+
//# sourceMappingURL=health-DMu0MJ-N.js.map
|
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-
|
|
3
|
+
import { AdapterRegistry, AdtError, ClaudeCodeAdapter, CodexCLIAdapter, ConfigError, ConfigIncompatibleFormatError, GeminiCLIAdapter } from "./dist-BUcEqXA1.js";
|
|
4
4
|
import "./adapter-registry-DXLMTmfD.js";
|
|
5
|
-
import { BudgetExceededError, GitError, RecoveryError, TaskConfigError, TaskGraphCycleError, TaskGraphError, TaskGraphIncompatibleFormatError, WorkerError, WorkerNotFoundError } from "./errors-
|
|
5
|
+
import { BudgetExceededError, GitError, RecoveryError, TaskConfigError, TaskGraphCycleError, TaskGraphError, TaskGraphIncompatibleFormatError, WorkerError, WorkerNotFoundError } from "./errors-BZnrgeyp.js";
|
|
6
6
|
|
|
7
7
|
//#region src/core/di.ts
|
|
8
8
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ModelRoutingConfigSchema, ProviderPolicySchema, RoutingConfigError, RoutingRecommender, RoutingResolver, RoutingTelemetry, RoutingTokenAccumulator, RoutingTuner, TASK_TYPE_PHASE_MAP, getModelTier, loadModelRoutingConfig } from "./dist-
|
|
1
|
+
import { ModelRoutingConfigSchema, ProviderPolicySchema, RoutingConfigError, RoutingRecommender, RoutingResolver, RoutingTelemetry, RoutingTokenAccumulator, RoutingTuner, TASK_TYPE_PHASE_MAP, getModelTier, loadModelRoutingConfig } from "./dist-BUcEqXA1.js";
|
|
2
2
|
import "./routing-CcBOCuC9.js";
|
|
3
3
|
|
|
4
4
|
export { loadModelRoutingConfig };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BMAD_BASELINE_TOKENS_FULL, DoltMergeConflict, FileStateStore, FindingsInjector, RunManifest, STOP_AFTER_VALID_PHASES, STORY_KEY_PATTERN, VALID_PHASES, WorkGraphRepository, __commonJS, __require, __toESM, applyConfigToGraph, buildPipelineStatusOutput, createDatabaseAdapter, createGraphOrchestrator, createSdlcCodeReviewHandler, createSdlcCreateStoryHandler, createSdlcDevStoryHandler, createSdlcPhaseHandler, detectCycles, extractTargetFilesFromStoryContent, formatOutput, formatPipelineSummary, formatTokenTelemetry, inspectProcessTree, parseDbTimestampAsUtc, resolveGraphPath, resolveMainRepoRoot, validateStoryKey } from "./health-
|
|
1
|
+
import { BMAD_BASELINE_TOKENS_FULL, DoltMergeConflict, FileStateStore, FindingsInjector, RunManifest, STOP_AFTER_VALID_PHASES, STORY_KEY_PATTERN, VALID_PHASES, WorkGraphRepository, __commonJS, __require, __toESM, applyConfigToGraph, buildPipelineStatusOutput, createDatabaseAdapter, createGraphOrchestrator, createSdlcCodeReviewHandler, createSdlcCreateStoryHandler, createSdlcDevStoryHandler, createSdlcPhaseHandler, detectCycles, extractTargetFilesFromStoryContent, formatOutput, formatPipelineSummary, formatTokenTelemetry, inspectProcessTree, parseDbTimestampAsUtc, resolveGraphPath, resolveMainRepoRoot, validateStoryKey } from "./health-DMu0MJ-N.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, 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, createConfigSystem, createDatabaseAdapter$1, createDecision, createPipelineRun, createRequirement, detectInterfaceChanges, getArtifactByTypeForRun, getArtifactsByRun, getDecisionsByCategory, getDecisionsByPhase, getDecisionsByPhaseForRun, getLatestRun, getPipelineRunById, getRunMetrics, getRunningPipelineRuns, getStoryMetricsForRun, getTokenUsageSummary, initSchema, listRequirements, loadModelRoutingConfig, registerArtifact, updatePipelineRun, updatePipelineRunConfig, upsertDecision, writeRunMetrics, writeStoryMetrics } from "./dist-
|
|
4
|
+
import { ADVISORY_NOTES, 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, createConfigSystem, createDatabaseAdapter$1, createDecision, createPipelineRun, createRequirement, detectInterfaceChanges, getArtifactByTypeForRun, getArtifactsByRun, getDecisionsByCategory, getDecisionsByPhase, getDecisionsByPhaseForRun, getLatestRun, getPipelineRunById, getRunMetrics, getRunningPipelineRuns, getStoryMetricsForRun, getTokenUsageSummary, initSchema, listRequirements, loadModelRoutingConfig, registerArtifact, updatePipelineRun, updatePipelineRunConfig, upsertDecision, writeRunMetrics, writeStoryMetrics } from "./dist-BUcEqXA1.js";
|
|
5
5
|
import { basename, dirname, extname, join } from "path";
|
|
6
6
|
import { access, readFile, readdir, stat } from "fs/promises";
|
|
7
7
|
import { EventEmitter } from "node:events";
|
|
@@ -4891,11 +4891,17 @@ function runBuildVerification(options) {
|
|
|
4891
4891
|
}
|
|
4892
4892
|
const timeoutMs = verifyTimeoutMs ?? DEFAULT_VERIFY_TIMEOUT_MS;
|
|
4893
4893
|
try {
|
|
4894
|
+
const binPath = join$1(projectRoot, "node_modules", ".bin");
|
|
4895
|
+
const envPath = `${binPath}${process.platform === "win32" ? ";" : ":"}${process.env.PATH ?? ""}`;
|
|
4894
4896
|
const stdout = execSync(cmd, {
|
|
4895
4897
|
cwd: projectRoot,
|
|
4896
4898
|
timeout: timeoutMs,
|
|
4897
4899
|
encoding: "utf-8",
|
|
4898
|
-
shell: process.env.SHELL || "/bin/bash"
|
|
4900
|
+
shell: process.env.SHELL || "/bin/bash",
|
|
4901
|
+
env: {
|
|
4902
|
+
...process.env,
|
|
4903
|
+
PATH: envPath
|
|
4904
|
+
}
|
|
4899
4905
|
});
|
|
4900
4906
|
return {
|
|
4901
4907
|
status: "passed",
|
|
@@ -11519,6 +11525,7 @@ function createImplementationOrchestrator(deps) {
|
|
|
11519
11525
|
const _phaseStartMs = new Map();
|
|
11520
11526
|
const _phaseEndMs = new Map();
|
|
11521
11527
|
const _storyDispatches = new Map();
|
|
11528
|
+
const _storyAgents = new Map();
|
|
11522
11529
|
const _storyRetryCount = new Map();
|
|
11523
11530
|
let _completedDispatches = 0;
|
|
11524
11531
|
let _maxConcurrentActual = 0;
|
|
@@ -11549,6 +11556,14 @@ function createImplementationOrchestrator(deps) {
|
|
|
11549
11556
|
function incrementDispatches(storyKey) {
|
|
11550
11557
|
_storyDispatches.set(storyKey, (_storyDispatches.get(storyKey) ?? 0) + 1);
|
|
11551
11558
|
}
|
|
11559
|
+
function recordDispatchAgent(storyKey, phase, agent, model) {
|
|
11560
|
+
if (!_storyAgents.has(storyKey)) _storyAgents.set(storyKey, []);
|
|
11561
|
+
_storyAgents.get(storyKey).push({
|
|
11562
|
+
agent,
|
|
11563
|
+
phase,
|
|
11564
|
+
...model !== void 0 && { model }
|
|
11565
|
+
});
|
|
11566
|
+
}
|
|
11552
11567
|
/**
|
|
11553
11568
|
* Initialize `_storyRetryCount` from the run manifest for crash-recovery durability (AC6, Story 53-4).
|
|
11554
11569
|
* Reads persisted retry_count so that budget gate correctly accounts for prior-session retries.
|
|
@@ -11600,7 +11615,7 @@ function createImplementationOrchestrator(deps) {
|
|
|
11600
11615
|
}
|
|
11601
11616
|
return JSON.stringify(durations);
|
|
11602
11617
|
}
|
|
11603
|
-
async function writeStoryMetricsBestEffort(storyKey, result, reviewCycles) {
|
|
11618
|
+
async function writeStoryMetricsBestEffort(storyKey, result, reviewCycles, storyAgentId) {
|
|
11604
11619
|
if (config.pipelineRunId === void 0) return;
|
|
11605
11620
|
try {
|
|
11606
11621
|
const storyState = _stories.get(storyKey);
|
|
@@ -11626,7 +11641,9 @@ function createImplementationOrchestrator(deps) {
|
|
|
11626
11641
|
output_tokens: tokenAgg.output,
|
|
11627
11642
|
cost_usd: tokenAgg.cost,
|
|
11628
11643
|
review_cycles: reviewCycles,
|
|
11629
|
-
dispatches: _storyDispatches.get(storyKey) ?? 0
|
|
11644
|
+
dispatches: _storyDispatches.get(storyKey) ?? 0,
|
|
11645
|
+
primary_agent_id: storyAgentId ?? agentId ?? void 0,
|
|
11646
|
+
dispatch_agents_json: _storyAgents.has(storyKey) ? JSON.stringify(_storyAgents.get(storyKey)) : void 0
|
|
11630
11647
|
});
|
|
11631
11648
|
if (stateStore !== void 0) stateStore.recordMetric({
|
|
11632
11649
|
storyKey,
|
|
@@ -18489,7 +18506,16 @@ async function buildRunReport(adapter, runId, opts) {
|
|
|
18489
18506
|
verificationStatus: vr.status,
|
|
18490
18507
|
verificationChecks: vr.checks
|
|
18491
18508
|
},
|
|
18492
|
-
...qualityScore !== void 0 && { qualityScore }
|
|
18509
|
+
...qualityScore !== void 0 && { qualityScore },
|
|
18510
|
+
...s$1.primary_agent_id && { agentId: s$1.primary_agent_id },
|
|
18511
|
+
...s$1.primary_model && { model: s$1.primary_model },
|
|
18512
|
+
...s$1.dispatch_agents_json && (() => {
|
|
18513
|
+
try {
|
|
18514
|
+
return { dispatchAgents: JSON.parse(s$1.dispatch_agents_json) };
|
|
18515
|
+
} catch {
|
|
18516
|
+
return {};
|
|
18517
|
+
}
|
|
18518
|
+
})()
|
|
18493
18519
|
};
|
|
18494
18520
|
});
|
|
18495
18521
|
const storyScores = stories.map((s$1) => s$1.qualityScore).filter((s$1) => s$1 !== void 0);
|
|
@@ -42707,4 +42733,4 @@ function registerRunCommand(program, _version = "0.0.0", projectRoot = process.c
|
|
|
42707
42733
|
|
|
42708
42734
|
//#endregion
|
|
42709
42735
|
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, wireNdjsonEmitter };
|
|
42710
|
-
//# sourceMappingURL=run-
|
|
42736
|
+
//# sourceMappingURL=run-D_863wfb.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "./health-
|
|
1
|
+
import "./health-DMu0MJ-N.js";
|
|
2
2
|
import "./logger-KeHncl-f.js";
|
|
3
3
|
import "./helpers-CElYrONe.js";
|
|
4
|
-
import "./dist-
|
|
5
|
-
import { normalizeGraphSummaryToStatus, registerRunCommand, resolveMaxReviewCycles, runRunAction, wireNdjsonEmitter } from "./run-
|
|
4
|
+
import "./dist-BUcEqXA1.js";
|
|
5
|
+
import { normalizeGraphSummaryToStatus, registerRunCommand, resolveMaxReviewCycles, runRunAction, wireNdjsonEmitter } from "./run-D_863wfb.js";
|
|
6
6
|
import "./routing-CcBOCuC9.js";
|
|
7
7
|
import "./decisions-C0pz9Clx.js";
|
|
8
8
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./dist-
|
|
1
|
+
import "./dist-BUcEqXA1.js";
|
|
2
2
|
import "./version-manager-impl-BmOWu8ml.js";
|
|
3
|
-
import { isGlobalInstall, registerUpgradeCommand, runUpgradeCommand } from "./upgrade-
|
|
3
|
+
import { isGlobalInstall, registerUpgradeCommand, runUpgradeCommand } from "./upgrade-CABZfjn_.js";
|
|
4
4
|
|
|
5
5
|
export { isGlobalInstall, registerUpgradeCommand, runUpgradeCommand };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createVersionManager } from "./dist-
|
|
1
|
+
import { createVersionManager } from "./dist-BUcEqXA1.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-
|
|
126
|
+
//# sourceMappingURL=upgrade-CABZfjn_.js.map
|
package/package.json
CHANGED