substrate-ai 0.19.15 → 0.19.16
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-BhzjPTIB.js +4 -0
- package/dist/cli/index.js +21 -15
- package/dist/{decisions-CEiirgql.js → decisions-D7nxZu4W.js} +1 -1
- package/dist/{dist-DpghaU2s.js → dist-C5NDd2T9.js} +19 -6
- package/dist/{errors-CSmGS72Q.js → errors-CeBKTFSL.js} +2 -2
- package/dist/{experimenter-C67kKXdl.js → experimenter-Ct4YKVLF.js} +1 -1
- package/dist/{health-B96IquxJ.js → health-BBD57TyR.js} +2 -2
- package/dist/{health-BBou8ghl.js → health-H-5xP8Cy.js} +2 -2
- package/dist/index.d.ts +24 -0
- package/dist/index.js +2 -2
- package/dist/{routing-QcKaORfX.js → routing-BdC4vctD.js} +1 -1
- package/dist/{run-DfaDV-t1.js → run-DoQSxg4N.js} +3 -3
- package/dist/{run-CgAga3yD.js → run-DwVCcdCk.js} +41 -7
- package/dist/{upgrade-BMP2XBPm.js → upgrade-CQ0O-BHc.js} +2 -2
- package/dist/{upgrade-CM1xHoeF.js → upgrade-DXT62773.js} +2 -2
- package/dist/{version-manager-impl-BwWSH7hR.js → version-manager-impl-ydYX5xJZ.js} +1 -1
- package/package.json +1 -1
- package/dist/adapter-registry-CakXFBjt.js +0 -4
package/dist/cli/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { FileStateStore, SUBSTRATE_OWNED_SETTINGS_KEYS, VALID_PHASES, WorkGraphRepository, buildPipelineStatusOutput, createDatabaseAdapter, createStateStore, findPackageRoot, formatOutput, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, parseDbTimestampAsUtc, registerHealthCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion, resolveMainRepoRoot } from "../health-
|
|
2
|
+
import { FileStateStore, SUBSTRATE_OWNED_SETTINGS_KEYS, VALID_PHASES, WorkGraphRepository, buildPipelineStatusOutput, createDatabaseAdapter, createStateStore, findPackageRoot, formatOutput, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, parseDbTimestampAsUtc, registerHealthCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion, resolveMainRepoRoot } from "../health-H-5xP8Cy.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, 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, getSessionCostSummary, getSessionCostSummaryFiltered, getStoryMetricsForRun, getTokenUsageSummary, incrementRunRestarts, initSchema, initializeDolt, listRunMetrics, loadParentRunDecisions, supersedeDecision, tagRunAsBaseline, updatePipelineRun } from "../dist-C5NDd2T9.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-DwVCcdCk.js";
|
|
8
|
+
import "../errors-CeBKTFSL.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-DXT62773.js";
|
|
13
13
|
import { Command } from "commander";
|
|
14
14
|
import { fileURLToPath } from "url";
|
|
15
15
|
import { dirname, join, resolve } from "path";
|
|
@@ -2811,6 +2811,9 @@ async function runFullPipelineFromPhase(options) {
|
|
|
2811
2811
|
dispatcher,
|
|
2812
2812
|
agentId
|
|
2813
2813
|
};
|
|
2814
|
+
const agentAdapter = agentId != null ? injectedRegistry.get(agentId) : void 0;
|
|
2815
|
+
const adapterDefaultCycles = agentAdapter?.getCapabilities?.()?.defaultMaxReviewCycles;
|
|
2816
|
+
const effectiveMaxReviewCycles = adapterDefaultCycles != null ? Math.max(maxReviewCycles, adapterDefaultCycles) : maxReviewCycles;
|
|
2814
2817
|
const phaseOrchestrator = createPhaseOrchestrator({
|
|
2815
2818
|
db: adapter,
|
|
2816
2819
|
pack
|
|
@@ -2916,7 +2919,7 @@ async function runFullPipelineFromPhase(options) {
|
|
|
2916
2919
|
eventBus,
|
|
2917
2920
|
config: {
|
|
2918
2921
|
maxConcurrency: concurrency,
|
|
2919
|
-
maxReviewCycles,
|
|
2922
|
+
maxReviewCycles: effectiveMaxReviewCycles,
|
|
2920
2923
|
pipelineRunId: runId,
|
|
2921
2924
|
enableHeartbeat: eventsFlag === true
|
|
2922
2925
|
},
|
|
@@ -3212,7 +3215,7 @@ async function runStatusAction(options) {
|
|
|
3212
3215
|
if (run === void 0) run = await getLatestRun(adapter);
|
|
3213
3216
|
}
|
|
3214
3217
|
if (run === void 0) {
|
|
3215
|
-
const { inspectProcessTree } = await import("../health-
|
|
3218
|
+
const { inspectProcessTree } = await import("../health-BBD57TyR.js");
|
|
3216
3219
|
const substrateDirPath = join(projectRoot, ".substrate");
|
|
3217
3220
|
const processInfo = inspectProcessTree({
|
|
3218
3221
|
projectRoot,
|
|
@@ -4099,7 +4102,7 @@ function defaultSupervisorDeps() {
|
|
|
4099
4102
|
if (cached === null) {
|
|
4100
4103
|
const { AdapterRegistry: AR } = await import(
|
|
4101
4104
|
/* @vite-ignore */
|
|
4102
|
-
"../adapter-registry-
|
|
4105
|
+
"../adapter-registry-BhzjPTIB.js"
|
|
4103
4106
|
);
|
|
4104
4107
|
cached = new AR();
|
|
4105
4108
|
await cached.discoverAndRegister();
|
|
@@ -4541,11 +4544,11 @@ async function runSupervisorAction(options, deps = {}) {
|
|
|
4541
4544
|
try {
|
|
4542
4545
|
const { createExperimenter } = await import(
|
|
4543
4546
|
/* @vite-ignore */
|
|
4544
|
-
"../experimenter-
|
|
4547
|
+
"../experimenter-Ct4YKVLF.js"
|
|
4545
4548
|
);
|
|
4546
4549
|
const { getLatestRun: getLatest } = await import(
|
|
4547
4550
|
/* @vite-ignore */
|
|
4548
|
-
"../decisions-
|
|
4551
|
+
"../decisions-D7nxZu4W.js"
|
|
4549
4552
|
);
|
|
4550
4553
|
const expAdapter = createDatabaseAdapter({
|
|
4551
4554
|
backend: "auto",
|
|
@@ -4555,7 +4558,7 @@ async function runSupervisorAction(options, deps = {}) {
|
|
|
4555
4558
|
await initSchema(expAdapter);
|
|
4556
4559
|
const { runRunAction: runPipeline } = await import(
|
|
4557
4560
|
/* @vite-ignore */
|
|
4558
|
-
"../run-
|
|
4561
|
+
"../run-DoQSxg4N.js"
|
|
4559
4562
|
);
|
|
4560
4563
|
const runStoryFn = async (opts) => {
|
|
4561
4564
|
const exitCode = await runPipeline({
|
|
@@ -5085,7 +5088,7 @@ async function runMetricsAction(options) {
|
|
|
5085
5088
|
const routingConfigPath = join(dbDir, "routing.yml");
|
|
5086
5089
|
let routingConfig = null;
|
|
5087
5090
|
if (existsSync$1(routingConfigPath)) try {
|
|
5088
|
-
const { loadModelRoutingConfig } = await import("../routing-
|
|
5091
|
+
const { loadModelRoutingConfig } = await import("../routing-BdC4vctD.js");
|
|
5089
5092
|
routingConfig = loadModelRoutingConfig(routingConfigPath);
|
|
5090
5093
|
} catch {}
|
|
5091
5094
|
if (routingConfig === null) routingConfig = {
|
|
@@ -7258,6 +7261,9 @@ async function runRetryEscalatedAction(options) {
|
|
|
7258
7261
|
eventBus,
|
|
7259
7262
|
adapterRegistry: injectedRegistry
|
|
7260
7263
|
});
|
|
7264
|
+
const agentAdapter = agentId != null ? injectedRegistry.get(agentId) : void 0;
|
|
7265
|
+
const adapterDefaultCycles = agentAdapter?.getCapabilities?.()?.defaultMaxReviewCycles;
|
|
7266
|
+
const effectiveMaxReviewCycles = adapterDefaultCycles != null ? Math.max(2, adapterDefaultCycles) : 2;
|
|
7261
7267
|
const orchestrator = createImplementationOrchestrator({
|
|
7262
7268
|
db: adapter,
|
|
7263
7269
|
pack,
|
|
@@ -7266,7 +7272,7 @@ async function runRetryEscalatedAction(options) {
|
|
|
7266
7272
|
eventBus,
|
|
7267
7273
|
config: {
|
|
7268
7274
|
maxConcurrency: concurrency,
|
|
7269
|
-
maxReviewCycles:
|
|
7275
|
+
maxReviewCycles: effectiveMaxReviewCycles,
|
|
7270
7276
|
pipelineRunId: pipelineRun.id,
|
|
7271
7277
|
...Object.keys(perStoryContextCeilings).length > 0 ? { perStoryContextCeilings } : {}
|
|
7272
7278
|
},
|
|
@@ -8163,8 +8169,8 @@ async function createProgram() {
|
|
|
8163
8169
|
/** Fire-and-forget startup version check (story 8.3, AC3/AC5) */
|
|
8164
8170
|
function checkForUpdatesInBackground(currentVersion) {
|
|
8165
8171
|
if (process.env.SUBSTRATE_NO_UPDATE_CHECK === "1") return;
|
|
8166
|
-
import("../upgrade-
|
|
8167
|
-
const { createVersionManager } = await import("../version-manager-impl-
|
|
8172
|
+
import("../upgrade-CQ0O-BHc.js").then(async () => {
|
|
8173
|
+
const { createVersionManager } = await import("../version-manager-impl-ydYX5xJZ.js");
|
|
8168
8174
|
const vm = createVersionManager();
|
|
8169
8175
|
const result = await vm.checkForUpdates();
|
|
8170
8176
|
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-C5NDd2T9.js";
|
|
2
2
|
import "./decisions-C0pz9Clx.js";
|
|
3
3
|
|
|
4
4
|
export { getLatestRun };
|
|
@@ -709,7 +709,8 @@ var DispatcherImpl = class {
|
|
|
709
709
|
}
|
|
710
710
|
const worktreePath = workingDirectory ?? process.cwd();
|
|
711
711
|
const resolvedMaxTurns = maxTurns ?? DEFAULT_MAX_TURNS[taskType];
|
|
712
|
-
const
|
|
712
|
+
const capabilities = adapter.getCapabilities();
|
|
713
|
+
const effectivePrompt = capabilities.requiresYamlSuffix === true ? prompt + buildYamlOutputSuffix(outputSchema) : prompt;
|
|
713
714
|
const cmd = adapter.buildCommand(effectivePrompt, {
|
|
714
715
|
worktreePath,
|
|
715
716
|
billingMode: "subscription",
|
|
@@ -723,7 +724,7 @@ var DispatcherImpl = class {
|
|
|
723
724
|
dispatchId: id
|
|
724
725
|
});
|
|
725
726
|
const baseTimeoutMs = timeout ?? this._config.defaultTimeouts[taskType] ?? DEFAULT_TIMEOUTS[taskType] ?? 3e5;
|
|
726
|
-
const timeoutMultiplier =
|
|
727
|
+
const timeoutMultiplier = capabilities.timeoutMultiplier ?? 1;
|
|
727
728
|
const timeoutMs = Math.round(baseTimeoutMs * timeoutMultiplier);
|
|
728
729
|
const env = { ...process.env };
|
|
729
730
|
const parentNodeOpts = env["NODE_OPTIONS"] ?? "";
|
|
@@ -8790,7 +8791,11 @@ var ClaudeCodeAdapter = class {
|
|
|
8790
8791
|
"document",
|
|
8791
8792
|
"analyze"
|
|
8792
8793
|
],
|
|
8793
|
-
supportedLanguages: ["*"]
|
|
8794
|
+
supportedLanguages: ["*"],
|
|
8795
|
+
supportsSystemPrompt: true,
|
|
8796
|
+
supportsOtlpExport: true,
|
|
8797
|
+
requiresYamlSuffix: false,
|
|
8798
|
+
defaultMaxReviewCycles: 2
|
|
8794
8799
|
};
|
|
8795
8800
|
}
|
|
8796
8801
|
_detectBillingModes(versionOutput) {
|
|
@@ -9013,7 +9018,11 @@ var CodexCLIAdapter = class {
|
|
|
9013
9018
|
"analyze"
|
|
9014
9019
|
],
|
|
9015
9020
|
supportedLanguages: ["*"],
|
|
9016
|
-
timeoutMultiplier: 3
|
|
9021
|
+
timeoutMultiplier: 3,
|
|
9022
|
+
supportsSystemPrompt: false,
|
|
9023
|
+
supportsOtlpExport: false,
|
|
9024
|
+
requiresYamlSuffix: true,
|
|
9025
|
+
defaultMaxReviewCycles: 3
|
|
9017
9026
|
};
|
|
9018
9027
|
}
|
|
9019
9028
|
_buildPlanningPrompt(request) {
|
|
@@ -9253,7 +9262,11 @@ var GeminiCLIAdapter = class {
|
|
|
9253
9262
|
"document",
|
|
9254
9263
|
"analyze"
|
|
9255
9264
|
],
|
|
9256
|
-
supportedLanguages: ["*"]
|
|
9265
|
+
supportedLanguages: ["*"],
|
|
9266
|
+
supportsSystemPrompt: false,
|
|
9267
|
+
supportsOtlpExport: false,
|
|
9268
|
+
requiresYamlSuffix: true,
|
|
9269
|
+
defaultMaxReviewCycles: 3
|
|
9257
9270
|
};
|
|
9258
9271
|
}
|
|
9259
9272
|
_detectBillingModes(versionOutput) {
|
|
@@ -10305,4 +10318,4 @@ async function callLLM(params) {
|
|
|
10305
10318
|
|
|
10306
10319
|
//#endregion
|
|
10307
10320
|
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, 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 };
|
|
10308
|
-
//# sourceMappingURL=dist-
|
|
10321
|
+
//# sourceMappingURL=dist-C5NDd2T9.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AdtError } from "./dist-
|
|
1
|
+
import { AdtError } from "./dist-C5NDd2T9.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-CeBKTFSL.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-C5NDd2T9.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-H-5xP8Cy.js";
|
|
2
2
|
import "./logger-KeHncl-f.js";
|
|
3
|
-
import "./dist-
|
|
3
|
+
import "./dist-C5NDd2T9.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, createDatabaseAdapter$1 as createDatabaseAdapter, getLatestRun, getPipelineRunById, initSchema } from "./dist-
|
|
2
|
+
import { DoltClient, DoltQueryError, createDatabaseAdapter$1 as createDatabaseAdapter, getLatestRun, getPipelineRunById, initSchema } from "./dist-C5NDd2T9.js";
|
|
3
3
|
import { createRequire } from "module";
|
|
4
4
|
import { dirname, join } from "path";
|
|
5
5
|
import { existsSync, readFileSync } from "node:fs";
|
|
@@ -1930,4 +1930,4 @@ function registerHealthCommand(program, _version = "0.0.0", projectRoot = proces
|
|
|
1930
1930
|
|
|
1931
1931
|
//#endregion
|
|
1932
1932
|
export { BMAD_BASELINE_TOKENS_FULL, DEFAULT_STALL_THRESHOLD_SECONDS, DoltMergeConflict, FileStateStore, STOP_AFTER_VALID_PHASES, STORY_KEY_PATTERN$1 as STORY_KEY_PATTERN, SUBSTRATE_OWNED_SETTINGS_KEYS, VALID_PHASES, WorkGraphRepository, __commonJS, __require, __toESM, buildPipelineStatusOutput, createDatabaseAdapter$1 as createDatabaseAdapter, createStateStore, detectCycles, findPackageRoot, formatOutput, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, inspectProcessTree, isOrchestratorProcessLine, parseDbTimestampAsUtc, registerHealthCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion, resolveMainRepoRoot, runHealthAction, validateStoryKey };
|
|
1933
|
-
//# sourceMappingURL=health-
|
|
1933
|
+
//# sourceMappingURL=health-H-5xP8Cy.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -847,6 +847,30 @@ interface AdapterCapabilities$1 {
|
|
|
847
847
|
* Default: 1.0 (no scaling).
|
|
848
848
|
*/
|
|
849
849
|
timeoutMultiplier?: number;
|
|
850
|
+
/**
|
|
851
|
+
* Whether the agent supports a --system-prompt flag.
|
|
852
|
+
* Claude Code: true. Codex/Gemini: false.
|
|
853
|
+
* When false, system-level instructions must be embedded in the prompt itself.
|
|
854
|
+
*/
|
|
855
|
+
supportsSystemPrompt?: boolean;
|
|
856
|
+
/**
|
|
857
|
+
* Whether the agent exports OTLP telemetry (spans, metrics, logs).
|
|
858
|
+
* Claude Code: true. Codex/Gemini: false.
|
|
859
|
+
* When false, telemetry is heuristic-only (character-based token estimates).
|
|
860
|
+
*/
|
|
861
|
+
supportsOtlpExport?: boolean;
|
|
862
|
+
/**
|
|
863
|
+
* Whether the dispatcher should append a YAML output format reminder to prompts.
|
|
864
|
+
* Claude Code: false (follows methodology pack format instructions reliably).
|
|
865
|
+
* Codex/Gemini: true (need explicit final nudge to emit fenced YAML blocks).
|
|
866
|
+
*/
|
|
867
|
+
requiresYamlSuffix?: boolean;
|
|
868
|
+
/**
|
|
869
|
+
* Default maximum review cycles for this agent backend.
|
|
870
|
+
* Claude Code: 2 (converges quickly). Codex: 3 (needs more iterations).
|
|
871
|
+
* Overridden by explicit --max-review-cycles CLI flag.
|
|
872
|
+
*/
|
|
873
|
+
defaultMaxReviewCycles?: number;
|
|
850
874
|
}
|
|
851
875
|
/**
|
|
852
876
|
* Result returned from an adapter health check.
|
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-C5NDd2T9.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-CeBKTFSL.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-C5NDd2T9.js";
|
|
2
2
|
import "./routing-CcBOCuC9.js";
|
|
3
3
|
|
|
4
4
|
export { loadModelRoutingConfig };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "./health-
|
|
1
|
+
import "./health-H-5xP8Cy.js";
|
|
2
2
|
import "./logger-KeHncl-f.js";
|
|
3
3
|
import "./helpers-CElYrONe.js";
|
|
4
|
-
import "./dist-
|
|
5
|
-
import { normalizeGraphSummaryToStatus, registerRunCommand, runRunAction } from "./run-
|
|
4
|
+
import "./dist-C5NDd2T9.js";
|
|
5
|
+
import { normalizeGraphSummaryToStatus, registerRunCommand, runRunAction } from "./run-DwVCcdCk.js";
|
|
6
6
|
import "./routing-CcBOCuC9.js";
|
|
7
7
|
import "./decisions-C0pz9Clx.js";
|
|
8
8
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BMAD_BASELINE_TOKENS_FULL, DoltMergeConflict, FileStateStore, STOP_AFTER_VALID_PHASES, STORY_KEY_PATTERN, VALID_PHASES, WorkGraphRepository, __commonJS, __require, __toESM, buildPipelineStatusOutput, createDatabaseAdapter, detectCycles, formatOutput, formatPipelineSummary, formatTokenTelemetry, inspectProcessTree, parseDbTimestampAsUtc, resolveMainRepoRoot, validateStoryKey } from "./health-
|
|
1
|
+
import { BMAD_BASELINE_TOKENS_FULL, DoltMergeConflict, FileStateStore, STOP_AFTER_VALID_PHASES, STORY_KEY_PATTERN, VALID_PHASES, WorkGraphRepository, __commonJS, __require, __toESM, buildPipelineStatusOutput, createDatabaseAdapter, detectCycles, formatOutput, formatPipelineSummary, formatTokenTelemetry, inspectProcessTree, parseDbTimestampAsUtc, resolveMainRepoRoot, validateStoryKey } from "./health-H-5xP8Cy.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, 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, getRunningPipelineRuns, getStoryMetricsForRun, getTokenUsageSummary, initSchema, listRequirements, loadModelRoutingConfig, registerArtifact, updatePipelineRun, updatePipelineRunConfig, upsertDecision, writeRunMetrics, writeStoryMetrics } from "./dist-C5NDd2T9.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";
|
|
@@ -10684,6 +10684,28 @@ function createImplementationOrchestrator(deps) {
|
|
|
10684
10684
|
phaseBreakdown[phase] = endMs !== void 0 ? endMs - startMs : nowMs - startMs;
|
|
10685
10685
|
}
|
|
10686
10686
|
}
|
|
10687
|
+
let diffStats;
|
|
10688
|
+
try {
|
|
10689
|
+
const statOutput = execSync("git diff --stat HEAD", {
|
|
10690
|
+
cwd: projectRoot ?? process.cwd(),
|
|
10691
|
+
encoding: "utf-8",
|
|
10692
|
+
timeout: 5e3,
|
|
10693
|
+
stdio: [
|
|
10694
|
+
"ignore",
|
|
10695
|
+
"pipe",
|
|
10696
|
+
"pipe"
|
|
10697
|
+
]
|
|
10698
|
+
});
|
|
10699
|
+
const summaryLine = statOutput.trim().split("\n").pop() ?? "";
|
|
10700
|
+
const filesMatch = summaryLine.match(/(\d+)\s+files?\s+changed/);
|
|
10701
|
+
const insMatch = summaryLine.match(/(\d+)\s+insertions?/);
|
|
10702
|
+
const delMatch = summaryLine.match(/(\d+)\s+deletions?/);
|
|
10703
|
+
diffStats = {
|
|
10704
|
+
filesChanged: filesMatch ? parseInt(filesMatch[1], 10) : 0,
|
|
10705
|
+
insertions: insMatch ? parseInt(insMatch[1], 10) : 0,
|
|
10706
|
+
deletions: delMatch ? parseInt(delMatch[1], 10) : 0
|
|
10707
|
+
};
|
|
10708
|
+
} catch {}
|
|
10687
10709
|
eventBus.emit("story:metrics", {
|
|
10688
10710
|
storyKey,
|
|
10689
10711
|
wallClockMs,
|
|
@@ -10693,7 +10715,8 @@ function createImplementationOrchestrator(deps) {
|
|
|
10693
10715
|
output: tokenAgg.output
|
|
10694
10716
|
},
|
|
10695
10717
|
reviewCycles,
|
|
10696
|
-
dispatches: _storyDispatches.get(storyKey) ?? 0
|
|
10718
|
+
dispatches: _storyDispatches.get(storyKey) ?? 0,
|
|
10719
|
+
...diffStats !== void 0 ? { diffStats } : {}
|
|
10697
10720
|
});
|
|
10698
10721
|
} catch (emitErr) {
|
|
10699
10722
|
logger$22.warn({
|
|
@@ -40184,6 +40207,16 @@ function buildSdlcHandlerRegistry(deps) {
|
|
|
40184
40207
|
//#endregion
|
|
40185
40208
|
//#region src/cli/commands/run.ts
|
|
40186
40209
|
const logger = createLogger("run-cmd");
|
|
40210
|
+
/**
|
|
40211
|
+
* Resolve effective max review cycles by checking the adapter's default.
|
|
40212
|
+
* Uses Math.max so the adapter's recommendation is a floor, not an override.
|
|
40213
|
+
*/
|
|
40214
|
+
function resolveMaxReviewCycles(cliValue, agentId, registry) {
|
|
40215
|
+
if (agentId == null || registry == null) return cliValue;
|
|
40216
|
+
const adapter = registry.get(agentId);
|
|
40217
|
+
const adapterDefault = adapter?.getCapabilities?.()?.defaultMaxReviewCycles;
|
|
40218
|
+
return adapterDefault != null ? Math.max(cliValue, adapterDefault) : cliValue;
|
|
40219
|
+
}
|
|
40187
40220
|
const VALID_ENGINES = ["linear", "graph"];
|
|
40188
40221
|
/**
|
|
40189
40222
|
* Normalizes a `GraphRunSummary` (from GraphOrchestrator.run()) into the same
|
|
@@ -40408,6 +40441,7 @@ async function runRunAction(options) {
|
|
|
40408
40441
|
else process.stderr.write(`Error: ${errorMsg}\n`);
|
|
40409
40442
|
return 1;
|
|
40410
40443
|
}
|
|
40444
|
+
const effectiveMaxReviewCycles = resolveMaxReviewCycles(maxReviewCycles, agentId, injectedRegistry);
|
|
40411
40445
|
if (startPhase !== void 0 && !VALID_PHASES.includes(startPhase)) {
|
|
40412
40446
|
const errorMsg = `Invalid phase '${startPhase}'. Valid phases: ${VALID_PHASES.join(", ")}`;
|
|
40413
40447
|
if (outputFormat === "json") process.stdout.write(formatOutput(null, "json", false, errorMsg) + "\n");
|
|
@@ -40564,7 +40598,7 @@ async function runRunAction(options) {
|
|
|
40564
40598
|
telemetryEnabled: true,
|
|
40565
40599
|
telemetryPort
|
|
40566
40600
|
} : {},
|
|
40567
|
-
maxReviewCycles,
|
|
40601
|
+
maxReviewCycles: effectiveMaxReviewCycles,
|
|
40568
40602
|
agentId
|
|
40569
40603
|
});
|
|
40570
40604
|
let storyKeys = [...parsedStoryKeys];
|
|
@@ -41051,7 +41085,7 @@ async function runRunAction(options) {
|
|
|
41051
41085
|
runId: pipelineRun.id,
|
|
41052
41086
|
eventBus,
|
|
41053
41087
|
pipelineRunId: pipelineRun.id,
|
|
41054
|
-
maxReviewCycles,
|
|
41088
|
+
maxReviewCycles: effectiveMaxReviewCycles,
|
|
41055
41089
|
gcPauseMs: 0
|
|
41056
41090
|
});
|
|
41057
41091
|
if (outputFormat === "human" && progressRenderer === void 0 && ndjsonEmitter === void 0) {
|
|
@@ -41070,7 +41104,7 @@ async function runRunAction(options) {
|
|
|
41070
41104
|
eventBus,
|
|
41071
41105
|
config: {
|
|
41072
41106
|
maxConcurrency: concurrency,
|
|
41073
|
-
maxReviewCycles,
|
|
41107
|
+
maxReviewCycles: effectiveMaxReviewCycles,
|
|
41074
41108
|
pipelineRunId: pipelineRun.id,
|
|
41075
41109
|
enableHeartbeat: eventsFlag === true,
|
|
41076
41110
|
skipPreflight: skipPreflight === true
|
|
@@ -41667,4 +41701,4 @@ function registerRunCommand(program, _version = "0.0.0", projectRoot = process.c
|
|
|
41667
41701
|
|
|
41668
41702
|
//#endregion
|
|
41669
41703
|
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, resolveStoryKeys, runAnalysisPhase, runPlanningPhase, runRunAction, runSolutioningPhase, validateStopAfterFromConflict };
|
|
41670
|
-
//# sourceMappingURL=run-
|
|
41704
|
+
//# sourceMappingURL=run-DwVCcdCk.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./dist-
|
|
1
|
+
import "./dist-C5NDd2T9.js";
|
|
2
2
|
import "./version-manager-impl-BmOWu8ml.js";
|
|
3
|
-
import { isGlobalInstall, registerUpgradeCommand, runUpgradeCommand } from "./upgrade-
|
|
3
|
+
import { isGlobalInstall, registerUpgradeCommand, runUpgradeCommand } from "./upgrade-DXT62773.js";
|
|
4
4
|
|
|
5
5
|
export { isGlobalInstall, registerUpgradeCommand, runUpgradeCommand };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createVersionManager } from "./dist-
|
|
1
|
+
import { createVersionManager } from "./dist-C5NDd2T9.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-DXT62773.js.map
|
package/package.json
CHANGED