substrate-ai 0.19.14 → 0.19.15
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-CakXFBjt.js +4 -0
- package/dist/cli/index.js +13 -13
- package/dist/{decisions-BFaxuKlw.js → decisions-CEiirgql.js} +1 -1
- package/dist/{dist-CGOpItka.js → dist-DpghaU2s.js} +47 -5
- package/dist/{errors-DBkOZgD4.js → errors-CSmGS72Q.js} +2 -2
- package/dist/{experimenter-DFzSRxTS.js → experimenter-C67kKXdl.js} +1 -1
- package/dist/{health-E34oq1s8.js → health-B96IquxJ.js} +2 -2
- package/dist/{health-CS3SJ2JD.js → health-BBou8ghl.js} +2 -2
- package/dist/index.js +2 -2
- package/dist/{routing-Bg2Xh6tP.js → routing-QcKaORfX.js} +1 -1
- package/dist/{run-BbZay3p0.js → run-CgAga3yD.js} +24 -5
- package/dist/{run-ohGVQc0P.js → run-DfaDV-t1.js} +3 -3
- package/dist/{upgrade-4QYypG_Z.js → upgrade-BMP2XBPm.js} +2 -2
- package/dist/{upgrade-DaP1jFb9.js → upgrade-CM1xHoeF.js} +2 -2
- package/dist/{version-manager-impl-DFnk7mmw.js → version-manager-impl-BwWSH7hR.js} +1 -1
- package/package.json +1 -1
- package/dist/adapter-registry-CtlKDROg.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-BBou8ghl.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-DpghaU2s.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-CgAga3yD.js";
|
|
8
|
+
import "../errors-CSmGS72Q.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-CM1xHoeF.js";
|
|
13
13
|
import { Command } from "commander";
|
|
14
14
|
import { fileURLToPath } from "url";
|
|
15
15
|
import { dirname, join, resolve } from "path";
|
|
@@ -3212,7 +3212,7 @@ async function runStatusAction(options) {
|
|
|
3212
3212
|
if (run === void 0) run = await getLatestRun(adapter);
|
|
3213
3213
|
}
|
|
3214
3214
|
if (run === void 0) {
|
|
3215
|
-
const { inspectProcessTree } = await import("../health-
|
|
3215
|
+
const { inspectProcessTree } = await import("../health-B96IquxJ.js");
|
|
3216
3216
|
const substrateDirPath = join(projectRoot, ".substrate");
|
|
3217
3217
|
const processInfo = inspectProcessTree({
|
|
3218
3218
|
projectRoot,
|
|
@@ -4099,7 +4099,7 @@ function defaultSupervisorDeps() {
|
|
|
4099
4099
|
if (cached === null) {
|
|
4100
4100
|
const { AdapterRegistry: AR } = await import(
|
|
4101
4101
|
/* @vite-ignore */
|
|
4102
|
-
"../adapter-registry-
|
|
4102
|
+
"../adapter-registry-CakXFBjt.js"
|
|
4103
4103
|
);
|
|
4104
4104
|
cached = new AR();
|
|
4105
4105
|
await cached.discoverAndRegister();
|
|
@@ -4541,11 +4541,11 @@ async function runSupervisorAction(options, deps = {}) {
|
|
|
4541
4541
|
try {
|
|
4542
4542
|
const { createExperimenter } = await import(
|
|
4543
4543
|
/* @vite-ignore */
|
|
4544
|
-
"../experimenter-
|
|
4544
|
+
"../experimenter-C67kKXdl.js"
|
|
4545
4545
|
);
|
|
4546
4546
|
const { getLatestRun: getLatest } = await import(
|
|
4547
4547
|
/* @vite-ignore */
|
|
4548
|
-
"../decisions-
|
|
4548
|
+
"../decisions-CEiirgql.js"
|
|
4549
4549
|
);
|
|
4550
4550
|
const expAdapter = createDatabaseAdapter({
|
|
4551
4551
|
backend: "auto",
|
|
@@ -4555,7 +4555,7 @@ async function runSupervisorAction(options, deps = {}) {
|
|
|
4555
4555
|
await initSchema(expAdapter);
|
|
4556
4556
|
const { runRunAction: runPipeline } = await import(
|
|
4557
4557
|
/* @vite-ignore */
|
|
4558
|
-
"../run-
|
|
4558
|
+
"../run-DfaDV-t1.js"
|
|
4559
4559
|
);
|
|
4560
4560
|
const runStoryFn = async (opts) => {
|
|
4561
4561
|
const exitCode = await runPipeline({
|
|
@@ -5085,7 +5085,7 @@ async function runMetricsAction(options) {
|
|
|
5085
5085
|
const routingConfigPath = join(dbDir, "routing.yml");
|
|
5086
5086
|
let routingConfig = null;
|
|
5087
5087
|
if (existsSync$1(routingConfigPath)) try {
|
|
5088
|
-
const { loadModelRoutingConfig } = await import("../routing-
|
|
5088
|
+
const { loadModelRoutingConfig } = await import("../routing-QcKaORfX.js");
|
|
5089
5089
|
routingConfig = loadModelRoutingConfig(routingConfigPath);
|
|
5090
5090
|
} catch {}
|
|
5091
5091
|
if (routingConfig === null) routingConfig = {
|
|
@@ -8163,8 +8163,8 @@ async function createProgram() {
|
|
|
8163
8163
|
/** Fire-and-forget startup version check (story 8.3, AC3/AC5) */
|
|
8164
8164
|
function checkForUpdatesInBackground(currentVersion) {
|
|
8165
8165
|
if (process.env.SUBSTRATE_NO_UPDATE_CHECK === "1") return;
|
|
8166
|
-
import("../upgrade-
|
|
8167
|
-
const { createVersionManager } = await import("../version-manager-impl-
|
|
8166
|
+
import("../upgrade-BMP2XBPm.js").then(async () => {
|
|
8167
|
+
const { createVersionManager } = await import("../version-manager-impl-BwWSH7hR.js");
|
|
8168
8168
|
const vm = createVersionManager();
|
|
8169
8169
|
const result = await vm.checkForUpdates();
|
|
8170
8170
|
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-DpghaU2s.js";
|
|
2
2
|
import "./decisions-C0pz9Clx.js";
|
|
3
3
|
|
|
4
4
|
export { getLatestRun };
|
|
@@ -399,17 +399,59 @@ function detectInterfaceChanges(options) {
|
|
|
399
399
|
const SHUTDOWN_GRACE_MS = 1e4;
|
|
400
400
|
const SHUTDOWN_MAX_WAIT_MS = 3e4;
|
|
401
401
|
const CHARS_PER_TOKEN$3 = 4;
|
|
402
|
-
|
|
402
|
+
/**
|
|
403
|
+
* Extract top-level field names from a Zod schema for prompt injection.
|
|
404
|
+
* Returns field names with type hints (e.g., "result: <string>", "files_modified: <list>").
|
|
405
|
+
*/
|
|
406
|
+
function extractSchemaFields(schema) {
|
|
407
|
+
let current = schema;
|
|
408
|
+
let def = current?._def;
|
|
409
|
+
while (def?.typeName === "ZodEffects" && def?.schema != null) {
|
|
410
|
+
current = def.schema;
|
|
411
|
+
def = current?._def;
|
|
412
|
+
}
|
|
413
|
+
const shape = current?.shape;
|
|
414
|
+
if (shape == null || typeof shape !== "object") return [];
|
|
415
|
+
const fields = [];
|
|
416
|
+
for (const [key, fieldDef] of Object.entries(shape)) {
|
|
417
|
+
const typeName = resolveZodTypeName(fieldDef);
|
|
418
|
+
fields.push(`${key}: ${typeName}`);
|
|
419
|
+
}
|
|
420
|
+
return fields;
|
|
421
|
+
}
|
|
422
|
+
/**
|
|
423
|
+
* Resolve a human-readable type hint from a Zod field definition.
|
|
424
|
+
*/
|
|
425
|
+
function resolveZodTypeName(fieldDef) {
|
|
426
|
+
const d = fieldDef;
|
|
427
|
+
const typeName = d?._def?.typeName;
|
|
428
|
+
if (typeName === "ZodOptional" || typeName === "ZodDefault") return d._def?.innerType != null ? resolveZodTypeName(d._def.innerType) : "<value>";
|
|
429
|
+
if (typeName === "ZodEffects") return d._def?.schema != null ? resolveZodTypeName(d._def.schema) : "<value>";
|
|
430
|
+
if (typeName === "ZodString") return "<string>";
|
|
431
|
+
if (typeName === "ZodNumber") return "<number>";
|
|
432
|
+
if (typeName === "ZodBoolean") return "<boolean>";
|
|
433
|
+
if (typeName === "ZodEnum") {
|
|
434
|
+
const values = d._def?.values;
|
|
435
|
+
return values != null ? values.join(" | ") : "<enum>";
|
|
436
|
+
}
|
|
437
|
+
if (typeName === "ZodArray") return "<list>";
|
|
438
|
+
if (typeName === "ZodObject") return "<object>";
|
|
439
|
+
return "<value>";
|
|
440
|
+
}
|
|
441
|
+
function buildYamlOutputSuffix(outputSchema) {
|
|
442
|
+
const fields = outputSchema != null ? extractSchemaFields(outputSchema) : [];
|
|
443
|
+
const fieldLines = fields.length > 0 ? fields.map((f) => ` ${f}`).join("\n") : " result: success\n # ... additional fields as specified in the task above";
|
|
444
|
+
return `
|
|
403
445
|
|
|
404
446
|
---
|
|
405
447
|
IMPORTANT: When you have completed the task, output your structured result as a fenced YAML block at the END of your response. Use this exact format:
|
|
406
448
|
|
|
407
449
|
\`\`\`yaml
|
|
408
|
-
|
|
409
|
-
# ... additional fields as specified in the task above
|
|
450
|
+
${fieldLines}
|
|
410
451
|
\`\`\`
|
|
411
452
|
|
|
412
453
|
The YAML block MUST be the last thing in your output. Do not add any text after the closing fence.`;
|
|
454
|
+
}
|
|
413
455
|
const MIN_FREE_MEMORY_BYTES = (() => {
|
|
414
456
|
const envMB = process.env["SUBSTRATE_MEMORY_THRESHOLD_MB"];
|
|
415
457
|
if (envMB) {
|
|
@@ -667,7 +709,7 @@ var DispatcherImpl = class {
|
|
|
667
709
|
}
|
|
668
710
|
const worktreePath = workingDirectory ?? process.cwd();
|
|
669
711
|
const resolvedMaxTurns = maxTurns ?? DEFAULT_MAX_TURNS[taskType];
|
|
670
|
-
const effectivePrompt = agent === "claude-code" ? prompt : prompt +
|
|
712
|
+
const effectivePrompt = agent === "claude-code" ? prompt : prompt + buildYamlOutputSuffix(outputSchema);
|
|
671
713
|
const cmd = adapter.buildCommand(effectivePrompt, {
|
|
672
714
|
worktreePath,
|
|
673
715
|
billingMode: "subscription",
|
|
@@ -10263,4 +10305,4 @@ async function callLLM(params) {
|
|
|
10263
10305
|
|
|
10264
10306
|
//#endregion
|
|
10265
10307
|
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 };
|
|
10266
|
-
//# sourceMappingURL=dist-
|
|
10308
|
+
//# sourceMappingURL=dist-DpghaU2s.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AdtError } from "./dist-
|
|
1
|
+
import { AdtError } from "./dist-DpghaU2s.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-CSmGS72Q.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-DpghaU2s.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-BBou8ghl.js";
|
|
2
2
|
import "./logger-KeHncl-f.js";
|
|
3
|
-
import "./dist-
|
|
3
|
+
import "./dist-DpghaU2s.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-DpghaU2s.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-BBou8ghl.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-DpghaU2s.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-CSmGS72Q.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-DpghaU2s.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, 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-BBou8ghl.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-DpghaU2s.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";
|
|
@@ -5949,7 +5949,14 @@ async function getProjectFindings(db) {
|
|
|
5949
5949
|
sections.push("**Prior escalations:**");
|
|
5950
5950
|
for (const d of diagnoses.slice(-3)) try {
|
|
5951
5951
|
const val = JSON.parse(d.value);
|
|
5952
|
-
|
|
5952
|
+
const storyId = (d.key ?? "").split(":")[0];
|
|
5953
|
+
sections.push(`- ${storyId}: ${val.recommendedAction} — ${val.rationale}`);
|
|
5954
|
+
if (Array.isArray(val.issues) && val.issues.length > 0) for (const issue of val.issues.slice(0, 5)) {
|
|
5955
|
+
const sev = issue.severity ? `[${issue.severity}]` : "";
|
|
5956
|
+
const file = issue.file ? ` (${issue.file})` : "";
|
|
5957
|
+
const desc = issue.description ?? "no description";
|
|
5958
|
+
sections.push(` - ${sev} ${desc}${file}`);
|
|
5959
|
+
}
|
|
5953
5960
|
} catch {
|
|
5954
5961
|
sections.push(`- ${d.key ?? "unknown"}: escalated`);
|
|
5955
5962
|
}
|
|
@@ -10741,12 +10748,24 @@ function createImplementationOrchestrator(deps) {
|
|
|
10741
10748
|
diagnosis
|
|
10742
10749
|
});
|
|
10743
10750
|
if (config.pipelineRunId !== void 0) try {
|
|
10751
|
+
const diagnosisWithIssues = {
|
|
10752
|
+
...diagnosis,
|
|
10753
|
+
issues: payload.issues.slice(0, 10).map((issue) => {
|
|
10754
|
+
if (typeof issue === "string") return { description: issue };
|
|
10755
|
+
const iss = issue;
|
|
10756
|
+
return {
|
|
10757
|
+
severity: iss.severity,
|
|
10758
|
+
description: iss.description,
|
|
10759
|
+
file: iss.file
|
|
10760
|
+
};
|
|
10761
|
+
})
|
|
10762
|
+
};
|
|
10744
10763
|
await createDecision(db, {
|
|
10745
10764
|
pipeline_run_id: config.pipelineRunId,
|
|
10746
10765
|
phase: "implementation",
|
|
10747
10766
|
category: ESCALATION_DIAGNOSIS,
|
|
10748
10767
|
key: `${payload.storyKey}:${config.pipelineRunId}`,
|
|
10749
|
-
value: JSON.stringify(
|
|
10768
|
+
value: JSON.stringify(diagnosisWithIssues),
|
|
10750
10769
|
rationale: `Escalation diagnosis for ${payload.storyKey}: ${diagnosis.recommendedAction} — ${diagnosis.rationale}`
|
|
10751
10770
|
});
|
|
10752
10771
|
} catch (err) {
|
|
@@ -41648,4 +41667,4 @@ function registerRunCommand(program, _version = "0.0.0", projectRoot = process.c
|
|
|
41648
41667
|
|
|
41649
41668
|
//#endregion
|
|
41650
41669
|
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 };
|
|
41651
|
-
//# sourceMappingURL=run-
|
|
41670
|
+
//# sourceMappingURL=run-CgAga3yD.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "./health-
|
|
1
|
+
import "./health-BBou8ghl.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-DpghaU2s.js";
|
|
5
|
+
import { normalizeGraphSummaryToStatus, registerRunCommand, runRunAction } from "./run-CgAga3yD.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-DpghaU2s.js";
|
|
2
2
|
import "./version-manager-impl-BmOWu8ml.js";
|
|
3
|
-
import { isGlobalInstall, registerUpgradeCommand, runUpgradeCommand } from "./upgrade-
|
|
3
|
+
import { isGlobalInstall, registerUpgradeCommand, runUpgradeCommand } from "./upgrade-CM1xHoeF.js";
|
|
4
4
|
|
|
5
5
|
export { isGlobalInstall, registerUpgradeCommand, runUpgradeCommand };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createVersionManager } from "./dist-
|
|
1
|
+
import { createVersionManager } from "./dist-DpghaU2s.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-CM1xHoeF.js.map
|
package/package.json
CHANGED