substrate-ai 0.20.110 → 0.20.112
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-MDBNDWLV.js +4 -0
- package/dist/cli/index.js +16 -20
- package/dist/{decisions-BYa6S26_.js → decisions-U6v6DTBL.js} +1 -1
- package/dist/{dist-CQ9ZuL2a.js → dist-NCtAx8Xo.js} +77 -112
- package/dist/{errors-Szein5Rn.js → errors-CbWCo0EG.js} +2 -2
- package/dist/{experimenter-COjr78xQ.js → experimenter--g818ryF.js} +1 -1
- package/dist/{health-CJyzYsfu.js → health-BZsEyfqX.js} +3 -3
- package/dist/{health-BX4kfRaJ.js → health-DDuluQFx.js} +3 -3
- package/dist/index.js +2 -2
- package/dist/{interactive-prompt-CoX8AYbn.js → interactive-prompt-DGRuUc6E.js} +2 -2
- package/dist/{manifest-read-B3HU_Awn.js → manifest-read-CgWpVLT_.js} +3 -3
- package/dist/modules/interactive-prompt/index.js +3 -3
- package/dist/{routing-C_KbC9on.js → routing-Dnm12Fum.js} +1 -1
- package/dist/{run--ncQ9inj.js → run-B7lFIS08.js} +5 -5
- package/dist/{run-DdTN1lge.js → run-DKVXaIgo.js} +7 -7
- package/dist/{upgrade-DoWjPygF.js → upgrade-DPg4GENq.js} +2 -2
- package/dist/{upgrade-Bpd6pUrr.js → upgrade-f-U437AC.js} +2 -2
- package/dist/{version-manager-impl-DyE9bMVG.js → version-manager-impl-NE_GqZQu.js} +1 -1
- package/package.json +1 -1
- package/dist/adapter-registry-jUH7TLH4.js +0 -4
package/dist/cli/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { FileKvStore, SUBSTRATE_OWNED_SETTINGS_KEYS, VALID_PHASES, buildPipelineStatusOutput, createDatabaseAdapter, createDoltOperatorReader, findPackageRoot, formatOutput, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, inspectProcessTree, parseDbTimestampAsUtc, registerHealthCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion } from "../health-
|
|
2
|
+
import { FileKvStore, SUBSTRATE_OWNED_SETTINGS_KEYS, VALID_PHASES, buildPipelineStatusOutput, createDatabaseAdapter, createDoltOperatorReader, findPackageRoot, formatOutput, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, inspectProcessTree, parseDbTimestampAsUtc, registerHealthCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion } from "../health-BZsEyfqX.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, InMemoryDatabaseAdapter, IngestionServer, MonitorDatabaseImpl, OPERATIONAL_FINDING, PartialGlobalSettingsSchema, PartialProviderConfigSchema, ProvidersSchema, RoutingRecommender, STORY_METRICS, TelemetryConfigSchema, addTokenUsage, aggregateTokenUsageForRun, checkDoltInstalled, compareRunMetrics, createAmendmentRun, createConfigSystem, createDecision, createPipelineRun, getActiveDecisions, getAllCostEntriesFiltered, getBaselineRunMetrics, getDecisionsByCategory, getDecisionsByPhaseForRun, getLatestCompletedRun, getLatestRun, getPipelineRunById, getPlanningCostTotal, getRetryableEscalations, getRunMetrics, getRunningPipelineRuns, getSessionCostSummary, getSessionCostSummaryFiltered, getStoryMetricsForRun, getTokenUsageSummary, incrementRunRestarts, initSchema, initWorkGraphSchema, initializeDolt, listRunMetrics, loadParentRunDecisions, supersedeDecision, swallowDebug, tagRunAsBaseline, updatePipelineRun } from "../dist-
|
|
6
|
-
import { AdapterTelemetryPersistence, AppError, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, EpicIngester, GLOBSTAR, GitClient, GrammarLoader, Minimatch, Minipass, RepoMapInjector, RepoMapModule, RepoMapQueryEngine, RepoMapStorage, SymbolParser, createContextCompiler, createDispatcher, createEventEmitter, createGitWorktreeManager, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStopAfterGate, createTelemetryAdvisor, escape, formatPhaseCompletionSummary, getFactoryRunSummaries, getScenarioResultsForRun, getTwinRunsForRun, listGraphRuns, registerExportCommand, registerFactoryCommand, registerRunCommand, registerScenariosCommand, resolveStoryKeys, runAnalysisPhase, runPlanningPhase, runProbeAuthor, runSolutioningPhase, unescape, validateStopAfterFromConflict } from "../run-
|
|
5
|
+
import { AdapterRegistry, BudgetConfigSchema, CURRENT_CONFIG_FORMAT_VERSION, CURRENT_TASK_GRAPH_VERSION, ConfigError, CostTrackerConfigSchema, DEFAULT_CONFIG, DoltClient, DoltNotInstalled, GlobalSettingsSchema, InMemoryDatabaseAdapter, IngestionServer, MonitorDatabaseImpl, OPERATIONAL_FINDING, PartialGlobalSettingsSchema, PartialProviderConfigSchema, ProvidersSchema, RoutingRecommender, STORY_METRICS, TelemetryConfigSchema, addTokenUsage, aggregateTokenUsageForRun, checkDoltInstalled, compareRunMetrics, createAmendmentRun, createConfigSystem, createDecision, createPipelineRun, createStderrLogger, getActiveDecisions, getAllCostEntriesFiltered, getBaselineRunMetrics, getDecisionsByCategory, getDecisionsByPhaseForRun, getLatestCompletedRun, getLatestRun, getPipelineRunById, getPlanningCostTotal, getRetryableEscalations, getRunMetrics, getRunningPipelineRuns, getSessionCostSummary, getSessionCostSummaryFiltered, getStoryMetricsForRun, getTokenUsageSummary, incrementRunRestarts, initSchema, initWorkGraphSchema, initializeDolt, listRunMetrics, loadParentRunDecisions, supersedeDecision, swallowDebug, tagRunAsBaseline, updatePipelineRun } from "../dist-NCtAx8Xo.js";
|
|
6
|
+
import { AdapterTelemetryPersistence, AppError, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, EpicIngester, GLOBSTAR, GitClient, GrammarLoader, Minimatch, Minipass, RepoMapInjector, RepoMapModule, RepoMapQueryEngine, RepoMapStorage, SymbolParser, createContextCompiler, createDispatcher, createEventEmitter, createGitWorktreeManager, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStopAfterGate, createTelemetryAdvisor, escape, formatPhaseCompletionSummary, getFactoryRunSummaries, getScenarioResultsForRun, getTwinRunsForRun, listGraphRuns, registerExportCommand, registerFactoryCommand, registerRunCommand, registerScenariosCommand, resolveStoryKeys, runAnalysisPhase, runPlanningPhase, runProbeAuthor, runSolutioningPhase, unescape, validateStopAfterFromConflict } from "../run-DKVXaIgo.js";
|
|
7
7
|
import "../adapter-registry-DIcrxjH8.js";
|
|
8
|
-
import { RunManifest, SupervisorLock, ZERO_FINDINGS_BY_AUTHOR, ZERO_FINDING_COUNTS, ZERO_PROBE_AUTHOR_METRICS, aggregateProbeAuthorMetrics, parseRuntimeProbes, readCurrentRunId, resolveMainRepoRoot, resolveRunManifest, rollupFindingCounts, rollupFindingsByAuthor, rollupProbeAuthorByClass, rollupProbeAuthorMetrics, runAcTraceabilityCheck } from "../manifest-read-
|
|
9
|
-
import "../errors-
|
|
8
|
+
import { RunManifest, SupervisorLock, ZERO_FINDINGS_BY_AUTHOR, ZERO_FINDING_COUNTS, ZERO_PROBE_AUTHOR_METRICS, aggregateProbeAuthorMetrics, parseRuntimeProbes, readCurrentRunId, resolveMainRepoRoot, resolveRunManifest, rollupFindingCounts, rollupFindingsByAuthor, rollupProbeAuthorByClass, rollupProbeAuthorMetrics, runAcTraceabilityCheck } from "../manifest-read-CgWpVLT_.js";
|
|
9
|
+
import "../errors-CbWCo0EG.js";
|
|
10
10
|
import "../routing-DFxoKHDt.js";
|
|
11
11
|
import { WorkGraphRepository } from "../work-graph-repository-DZyJv5pV.js";
|
|
12
12
|
import "../decisions-CzSIEeGP.js";
|
|
13
13
|
import "../decision-router-DblHY8se.js";
|
|
14
|
-
import "../interactive-prompt-
|
|
14
|
+
import "../interactive-prompt-DGRuUc6E.js";
|
|
15
15
|
import "../recovery-engine-BKGBeBnW.js";
|
|
16
16
|
import "../version-manager-impl-qFBiO4Eh.js";
|
|
17
|
-
import { registerUpgradeCommand } from "../upgrade-
|
|
17
|
+
import { registerUpgradeCommand } from "../upgrade-f-U437AC.js";
|
|
18
18
|
import { Command } from "commander";
|
|
19
19
|
import { fileURLToPath } from "url";
|
|
20
20
|
import { dirname, join, resolve } from "path";
|
|
@@ -40,10 +40,6 @@ import { randomUUID as randomUUID$1 } from "crypto";
|
|
|
40
40
|
import { createInterface as createInterface$1 } from "readline";
|
|
41
41
|
|
|
42
42
|
//#region packages/core/dist/monitor/recommendation-engine.js
|
|
43
|
-
/**
|
|
44
|
-
* RecommendationEngine — generates routing recommendations from performance aggregates.
|
|
45
|
-
* Migrated to @substrate-ai/core (Story 41-7)
|
|
46
|
-
*/
|
|
47
43
|
var RecommendationEngine = class {
|
|
48
44
|
_monitorDb;
|
|
49
45
|
_filters;
|
|
@@ -56,7 +52,7 @@ var RecommendationEngine = class {
|
|
|
56
52
|
min_sample_size: config.min_sample_size ?? 10
|
|
57
53
|
};
|
|
58
54
|
this._historyDays = config.recommendation_history_days ?? 90;
|
|
59
|
-
this._logger = logger$19 ??
|
|
55
|
+
this._logger = logger$19 ?? createStderrLogger("monitor:recommendation-engine");
|
|
60
56
|
}
|
|
61
57
|
generateRecommendations() {
|
|
62
58
|
const sinceDate = new Date(Date.now() - this._historyDays * 24 * 60 * 60 * 1e3).toISOString();
|
|
@@ -6894,7 +6890,7 @@ async function runStatusAction(options) {
|
|
|
6894
6890
|
logger$15.debug({ err }, "Work graph query failed, continuing without work graph data");
|
|
6895
6891
|
}
|
|
6896
6892
|
if (run === void 0) {
|
|
6897
|
-
const { inspectProcessTree: inspectProcessTree$1 } = await import("../health-
|
|
6893
|
+
const { inspectProcessTree: inspectProcessTree$1 } = await import("../health-DDuluQFx.js");
|
|
6898
6894
|
const substrateDirPath = join(projectRoot, ".substrate");
|
|
6899
6895
|
const processInfo = inspectProcessTree$1({
|
|
6900
6896
|
projectRoot,
|
|
@@ -7842,7 +7838,7 @@ function defaultSupervisorDeps() {
|
|
|
7842
7838
|
if (cached === null) {
|
|
7843
7839
|
const { AdapterRegistry: AR } = await import(
|
|
7844
7840
|
/* @vite-ignore */
|
|
7845
|
-
"../adapter-registry-
|
|
7841
|
+
"../adapter-registry-MDBNDWLV.js"
|
|
7846
7842
|
);
|
|
7847
7843
|
cached = new AR();
|
|
7848
7844
|
await cached.discoverAndRegister();
|
|
@@ -8409,11 +8405,11 @@ async function runSupervisorAction(options, deps = {}) {
|
|
|
8409
8405
|
try {
|
|
8410
8406
|
const { createExperimenter } = await import(
|
|
8411
8407
|
/* @vite-ignore */
|
|
8412
|
-
"../experimenter
|
|
8408
|
+
"../experimenter--g818ryF.js"
|
|
8413
8409
|
);
|
|
8414
8410
|
const { getLatestRun: getLatest } = await import(
|
|
8415
8411
|
/* @vite-ignore */
|
|
8416
|
-
"../decisions-
|
|
8412
|
+
"../decisions-U6v6DTBL.js"
|
|
8417
8413
|
);
|
|
8418
8414
|
const expAdapter = createDatabaseAdapter({
|
|
8419
8415
|
backend: "auto",
|
|
@@ -8423,7 +8419,7 @@ async function runSupervisorAction(options, deps = {}) {
|
|
|
8423
8419
|
await initSchema(expAdapter);
|
|
8424
8420
|
const { runRunAction: runPipeline } = await import(
|
|
8425
8421
|
/* @vite-ignore */
|
|
8426
|
-
"../run
|
|
8422
|
+
"../run-B7lFIS08.js"
|
|
8427
8423
|
);
|
|
8428
8424
|
const runStoryFn = async (opts) => {
|
|
8429
8425
|
const exitCode = await runPipeline({
|
|
@@ -8948,7 +8944,7 @@ async function runMetricsAction(options) {
|
|
|
8948
8944
|
const routingConfigPath = join(dbDir, "routing.yml");
|
|
8949
8945
|
let routingConfig = null;
|
|
8950
8946
|
if (existsSync$1(routingConfigPath)) try {
|
|
8951
|
-
const { loadModelRoutingConfig } = await import("../routing-
|
|
8947
|
+
const { loadModelRoutingConfig } = await import("../routing-Dnm12Fum.js");
|
|
8952
8948
|
routingConfig = loadModelRoutingConfig(routingConfigPath);
|
|
8953
8949
|
} catch {}
|
|
8954
8950
|
if (routingConfig === null) routingConfig = {
|
|
@@ -13230,8 +13226,8 @@ async function createProgram() {
|
|
|
13230
13226
|
/** Fire-and-forget startup version check (story 8.3, AC3/AC5) */
|
|
13231
13227
|
function checkForUpdatesInBackground(currentVersion) {
|
|
13232
13228
|
if (process.env.SUBSTRATE_NO_UPDATE_CHECK === "1") return;
|
|
13233
|
-
import("../upgrade-
|
|
13234
|
-
const { createVersionManager } = await import("../version-manager-impl-
|
|
13229
|
+
import("../upgrade-DPg4GENq.js").then(async () => {
|
|
13230
|
+
const { createVersionManager } = await import("../version-manager-impl-NE_GqZQu.js");
|
|
13235
13231
|
const vm = createVersionManager();
|
|
13236
13232
|
const result = await vm.checkForUpdates();
|
|
13237
13233
|
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-NCtAx8Xo.js";
|
|
2
2
|
import "./decisions-CzSIEeGP.js";
|
|
3
3
|
|
|
4
4
|
export { getLatestRun };
|
|
@@ -476,10 +476,7 @@ function detectInterfaceChanges(options) {
|
|
|
476
476
|
for (const name of names) allNames.add(name);
|
|
477
477
|
sourceDirs.push(dirname$1(relPath));
|
|
478
478
|
} catch {
|
|
479
|
-
|
|
480
|
-
absPath,
|
|
481
|
-
storyKey
|
|
482
|
-
});
|
|
479
|
+
process.stderr.write(`[interface-change-detector] Could not read modified file for interface extraction (storyKey=${storyKey}, path=${absPath})\n`);
|
|
483
480
|
}
|
|
484
481
|
}
|
|
485
482
|
if (allNames.size === 0) return {
|
|
@@ -857,6 +854,68 @@ function extractJsonAsYaml(text) {
|
|
|
857
854
|
}
|
|
858
855
|
}
|
|
859
856
|
|
|
857
|
+
//#endregion
|
|
858
|
+
//#region packages/core/dist/utils/stderr-logger.js
|
|
859
|
+
/**
|
|
860
|
+
* Stderr-routed ILogger factory.
|
|
861
|
+
*
|
|
862
|
+
* Use this instead of `console` as the default fallback for any class that
|
|
863
|
+
* accepts an optional ILogger. Node's `console.debug` / `console.info` are
|
|
864
|
+
* aliases for `console.log`, which writes to STDOUT — that contaminates
|
|
865
|
+
* any stdout consumer that expects clean output (e.g. `substrate run --events`
|
|
866
|
+
* NDJSON consumers, `--output-format json` commands, downstream parsers).
|
|
867
|
+
*
|
|
868
|
+
* v0.20.110 fixed the adapter.ts leak. v0.20.111 fixed the
|
|
869
|
+
* git-worktree-manager-impl.ts leak. v0.20.112 centralized the discipline:
|
|
870
|
+
* one shared helper, applied at every `logger ?? console` site, so future
|
|
871
|
+
* callers can't reintroduce the bug.
|
|
872
|
+
*
|
|
873
|
+
* Usage:
|
|
874
|
+
* import { createStderrLogger } from '@substrate-ai/core'
|
|
875
|
+
* constructor(..., logger?: ILogger) {
|
|
876
|
+
* this._logger = logger ?? createStderrLogger('my-module')
|
|
877
|
+
* }
|
|
878
|
+
*
|
|
879
|
+
* The prefix is included in every line so stderr remains useful for
|
|
880
|
+
* diagnostic correlation across modules — without polluting stdout.
|
|
881
|
+
*/
|
|
882
|
+
/**
|
|
883
|
+
* Format args the same way `console.*` does — strings stay as-is, everything
|
|
884
|
+
* else serializes to JSON. Single-line output (newline appended by the
|
|
885
|
+
* stderr write).
|
|
886
|
+
*/
|
|
887
|
+
function formatArgs(args) {
|
|
888
|
+
return args.map((a) => {
|
|
889
|
+
if (typeof a === "string") return a;
|
|
890
|
+
if (a instanceof Error) return a.message;
|
|
891
|
+
try {
|
|
892
|
+
return JSON.stringify(a);
|
|
893
|
+
} catch {
|
|
894
|
+
return String(a);
|
|
895
|
+
}
|
|
896
|
+
}).join(" ");
|
|
897
|
+
}
|
|
898
|
+
/**
|
|
899
|
+
* Create an ILogger that routes every level to stderr via
|
|
900
|
+
* `process.stderr.write`. Each line is prefixed with `[<prefix>] [<level>]`
|
|
901
|
+
* so operators correlating cross-module diagnostics can tell where a line
|
|
902
|
+
* came from.
|
|
903
|
+
*
|
|
904
|
+
* @param prefix - Module identifier used in the stderr prefix
|
|
905
|
+
* (e.g., 'persistence:adapter', 'git-worktree-manager')
|
|
906
|
+
*/
|
|
907
|
+
function createStderrLogger(prefix) {
|
|
908
|
+
function emit(level, args) {
|
|
909
|
+
process.stderr.write(`[${prefix}] [${level}] ${formatArgs(args)}\n`);
|
|
910
|
+
}
|
|
911
|
+
return {
|
|
912
|
+
info: (...args) => emit("info", args),
|
|
913
|
+
warn: (...args) => emit("warn", args),
|
|
914
|
+
error: (...args) => emit("error", args),
|
|
915
|
+
debug: (...args) => emit("debug", args)
|
|
916
|
+
};
|
|
917
|
+
}
|
|
918
|
+
|
|
860
919
|
//#endregion
|
|
861
920
|
//#region packages/core/dist/dispatch/dispatcher-impl.js
|
|
862
921
|
const SHUTDOWN_GRACE_MS = 1e4;
|
|
@@ -6517,7 +6576,7 @@ var ConfigSystemImpl = class {
|
|
|
6517
6576
|
this._projectConfigDir = options.projectConfigDir ? resolve(options.projectConfigDir) : resolve(process.cwd(), ".substrate");
|
|
6518
6577
|
this._globalConfigDir = options.globalConfigDir ? resolve(options.globalConfigDir) : resolve(homedir(), ".substrate");
|
|
6519
6578
|
this._cliOverrides = options.cliOverrides ?? {};
|
|
6520
|
-
this._logger = options.logger ??
|
|
6579
|
+
this._logger = options.logger ?? createStderrLogger("config-system");
|
|
6521
6580
|
}
|
|
6522
6581
|
get isLoaded() {
|
|
6523
6582
|
return this._config !== null;
|
|
@@ -7487,32 +7546,6 @@ var TelemetryNormalizer = class {
|
|
|
7487
7546
|
//#endregion
|
|
7488
7547
|
//#region packages/core/dist/telemetry/telemetry-pipeline.js
|
|
7489
7548
|
/**
|
|
7490
|
-
* TelemetryPipeline — orchestrates the full telemetry analysis pipeline.
|
|
7491
|
-
*
|
|
7492
|
-
* Processing flow for each batch of raw OTLP payloads:
|
|
7493
|
-
* 1. Normalize raw OTLP → NormalizedSpan[] / NormalizedLog[] (TelemetryNormalizer)
|
|
7494
|
-
* 2. Analyze turns via dual-track:
|
|
7495
|
-
* a. Span-based: ITurnAnalyzer.analyze(spans) → TurnAnalysis[]
|
|
7496
|
-
* b. Log-based: ILogTurnAnalyzer.analyze(logs) → TurnAnalysis[]
|
|
7497
|
-
* c. Merge & deduplicate by spanId (prefer span-derived)
|
|
7498
|
-
* 3. Compute category stats → CategoryStats[] (ICategorizer)
|
|
7499
|
-
* 4. Compute consumer stats → ConsumerStats[] (IConsumerAnalyzer)
|
|
7500
|
-
* 5. Score efficiency → EfficiencyScore (IEfficiencyScorer) — from merged turns
|
|
7501
|
-
* 6. Generate recommendations → Recommendation[] (IRecommender) — from merged turns
|
|
7502
|
-
* 7. Persist all results (ITelemetryPersistence)
|
|
7503
|
-
*
|
|
7504
|
-
* Design invariants:
|
|
7505
|
-
* - Constructor injection for all dependencies
|
|
7506
|
-
* - Never throws from processBatch() — errors are caught per-item and logged
|
|
7507
|
-
* - Grouping by storyKey; payloads without a storyKey are skipped at the
|
|
7508
|
-
* analysis stage (normalised data is still stored)
|
|
7509
|
-
* - Log-only path: when no spans are present, ILogTurnAnalyzer produces turns.
|
|
7510
|
-
*
|
|
7511
|
-
* Duck-typed interfaces for scoring deps (implementations migrate in 41-6b).
|
|
7512
|
-
* This allows the core package to be self-contained without importing from
|
|
7513
|
-
* the monolith's scoring modules.
|
|
7514
|
-
*/
|
|
7515
|
-
/**
|
|
7516
7549
|
* Wires together the full OTLP analysis and persistence pipeline.
|
|
7517
7550
|
*
|
|
7518
7551
|
* Usage:
|
|
@@ -7540,7 +7573,7 @@ var TelemetryPipeline = class {
|
|
|
7540
7573
|
this._efficiencyScorer = deps.efficiencyScorer;
|
|
7541
7574
|
this._recommender = deps.recommender;
|
|
7542
7575
|
this._persistence = deps.persistence;
|
|
7543
|
-
this._logger = deps.logger ??
|
|
7576
|
+
this._logger = deps.logger ?? createStderrLogger("telemetry-pipeline");
|
|
7544
7577
|
}
|
|
7545
7578
|
/**
|
|
7546
7579
|
* Process a batch of raw OTLP payloads through the full analysis pipeline.
|
|
@@ -7840,7 +7873,7 @@ var IngestionServer = class {
|
|
|
7840
7873
|
this._port = options.port ?? 4318;
|
|
7841
7874
|
this._batchSize = options.batchSize ?? 100;
|
|
7842
7875
|
this._flushIntervalMs = options.flushIntervalMs ?? 5e3;
|
|
7843
|
-
this._logger = options.logger ??
|
|
7876
|
+
this._logger = options.logger ?? createStderrLogger("telemetry:ingestion-server");
|
|
7844
7877
|
if (options.pipeline !== void 0) this._initPipeline(options.pipeline);
|
|
7845
7878
|
}
|
|
7846
7879
|
/**
|
|
@@ -8065,28 +8098,10 @@ var IngestionServer = class {
|
|
|
8065
8098
|
|
|
8066
8099
|
//#endregion
|
|
8067
8100
|
//#region packages/core/dist/telemetry/turn-analyzer.js
|
|
8068
|
-
/**
|
|
8069
|
-
* TurnAnalyzer — computes per-turn token breakdowns from normalized spans.
|
|
8070
|
-
*
|
|
8071
|
-
* Takes a list of NormalizedSpan records and produces TurnAnalysis[], where
|
|
8072
|
-
* each entry represents a root-level span (an agent "turn") with:
|
|
8073
|
-
* - Chronological ordering (by startTime)
|
|
8074
|
-
* - Sequential turnNumber assignment (1-N)
|
|
8075
|
-
* - freshTokens, cacheHitRate, contextSize, contextDelta metrics
|
|
8076
|
-
* - childSpans drill-down (tool calls within the turn)
|
|
8077
|
-
* - isContextSpike detection (inputTokens > 2× average)
|
|
8078
|
-
*
|
|
8079
|
-
* Architecture constraints:
|
|
8080
|
-
* - Constructor injection: accepts ILogger via constructor (defaults to console)
|
|
8081
|
-
* - No external dependencies beyond types from this module
|
|
8082
|
-
* - Zero LLM calls — pure statistical computation
|
|
8083
|
-
*
|
|
8084
|
-
* Migrated to @substrate-ai/core in story 41-6b.
|
|
8085
|
-
*/
|
|
8086
8101
|
var TurnAnalyzer = class {
|
|
8087
8102
|
_logger;
|
|
8088
8103
|
constructor(logger) {
|
|
8089
|
-
this._logger = logger ??
|
|
8104
|
+
this._logger = logger ?? createStderrLogger("telemetry:turn-analyzer");
|
|
8090
8105
|
}
|
|
8091
8106
|
/**
|
|
8092
8107
|
* Analyze a list of NormalizedSpan records and produce TurnAnalysis[].
|
|
@@ -8153,29 +8168,10 @@ var TurnAnalyzer = class {
|
|
|
8153
8168
|
|
|
8154
8169
|
//#endregion
|
|
8155
8170
|
//#region packages/core/dist/telemetry/log-turn-analyzer.js
|
|
8156
|
-
/**
|
|
8157
|
-
* LogTurnAnalyzer — computes per-turn token breakdowns from normalized log records.
|
|
8158
|
-
*
|
|
8159
|
-
* Takes a list of NormalizedLog records and produces TurnAnalysis[], where
|
|
8160
|
-
* each entry represents an LLM turn derived from log data with:
|
|
8161
|
-
* - Chronological ordering (by timestamp)
|
|
8162
|
-
* - Sequential turnNumber assignment (1-N)
|
|
8163
|
-
* - freshTokens, cacheHitRate, contextSize, contextDelta metrics
|
|
8164
|
-
* - isContextSpike detection (inputTokens > 2× average)
|
|
8165
|
-
* - Deduplication by traceId+spanId combination
|
|
8166
|
-
*
|
|
8167
|
-
* Architecture constraints:
|
|
8168
|
-
* - Constructor injection: accepts ILogger via constructor (defaults to console)
|
|
8169
|
-
* - No external dependencies beyond types from this module
|
|
8170
|
-
* - Zero LLM calls — pure statistical computation
|
|
8171
|
-
* - Never throws from public methods
|
|
8172
|
-
*
|
|
8173
|
-
* Migrated to @substrate-ai/core in story 41-6b.
|
|
8174
|
-
*/
|
|
8175
8171
|
var LogTurnAnalyzer = class {
|
|
8176
8172
|
_logger;
|
|
8177
8173
|
constructor(logger) {
|
|
8178
|
-
this._logger = logger ??
|
|
8174
|
+
this._logger = logger ?? createStderrLogger("telemetry:log-turn-analyzer");
|
|
8179
8175
|
}
|
|
8180
8176
|
/**
|
|
8181
8177
|
* Analyze a list of NormalizedLog records and produce TurnAnalysis[].
|
|
@@ -8270,23 +8266,6 @@ var LogTurnAnalyzer = class {
|
|
|
8270
8266
|
//#endregion
|
|
8271
8267
|
//#region packages/core/dist/telemetry/categorizer.js
|
|
8272
8268
|
/**
|
|
8273
|
-
* Categorizer — classifies telemetry spans into semantic categories and
|
|
8274
|
-
* computes per-category token statistics with trend detection.
|
|
8275
|
-
*
|
|
8276
|
-
* Classification proceeds through three tiers:
|
|
8277
|
-
* 1. Exact match against a lookup table of known operation names
|
|
8278
|
-
* 2. Prefix/regex pattern match
|
|
8279
|
-
* 3. Fuzzy case-insensitive substring match
|
|
8280
|
-
* 4. Fallback to 'other' (overridden to 'tool_outputs' when toolName present)
|
|
8281
|
-
*
|
|
8282
|
-
* Architecture constraints:
|
|
8283
|
-
* - Constructor injection: accepts ILogger via constructor (defaults to console)
|
|
8284
|
-
* - Module-scope lookup tables to avoid recreation on every classify() call
|
|
8285
|
-
* - Zero external dependencies beyond types from this module
|
|
8286
|
-
*
|
|
8287
|
-
* Migrated to @substrate-ai/core in story 41-6b.
|
|
8288
|
-
*/
|
|
8289
|
-
/**
|
|
8290
8269
|
* Tier 0: task-type to semantic category mapping.
|
|
8291
8270
|
*
|
|
8292
8271
|
* When a TurnAnalysis has a known taskType, the category is determined
|
|
@@ -8360,7 +8339,7 @@ const ALL_CATEGORIES = [
|
|
|
8360
8339
|
var Categorizer = class {
|
|
8361
8340
|
_logger;
|
|
8362
8341
|
constructor(logger) {
|
|
8363
|
-
this._logger = logger ??
|
|
8342
|
+
this._logger = logger ?? createStderrLogger("telemetry:categorizer");
|
|
8364
8343
|
}
|
|
8365
8344
|
/**
|
|
8366
8345
|
* Classify an operation into a SemanticCategory using tiered logic.
|
|
@@ -8560,26 +8539,12 @@ function extractToolNameFromSpan(span) {
|
|
|
8560
8539
|
|
|
8561
8540
|
//#endregion
|
|
8562
8541
|
//#region packages/core/dist/telemetry/consumer-analyzer.js
|
|
8563
|
-
/**
|
|
8564
|
-
* ConsumerAnalyzer — groups telemetry spans by consumer key and ranks by token
|
|
8565
|
-
* consumption, producing ConsumerStats for each unique operation+tool combination.
|
|
8566
|
-
*
|
|
8567
|
-
* A "consumer key" is `operationName|toolName`, stable across runs and safe to
|
|
8568
|
-
* store as a VARCHAR(300) primary-key component in Dolt.
|
|
8569
|
-
*
|
|
8570
|
-
* Architecture constraints:
|
|
8571
|
-
* - Constructor injection: accepts Categorizer and ILogger (logger defaults to console)
|
|
8572
|
-
* - Delegates classification to the injected Categorizer
|
|
8573
|
-
* - Zero external dependencies beyond types and Categorizer from this module
|
|
8574
|
-
*
|
|
8575
|
-
* Migrated to @substrate-ai/core in story 41-6b.
|
|
8576
|
-
*/
|
|
8577
8542
|
var ConsumerAnalyzer = class {
|
|
8578
8543
|
_categorizer;
|
|
8579
8544
|
_logger;
|
|
8580
8545
|
constructor(categorizer, logger) {
|
|
8581
8546
|
this._categorizer = categorizer;
|
|
8582
|
-
this._logger = logger ??
|
|
8547
|
+
this._logger = logger ?? createStderrLogger("telemetry:consumer-analyzer");
|
|
8583
8548
|
}
|
|
8584
8549
|
/**
|
|
8585
8550
|
* Group spans by consumer key, rank by totalTokens descending, and return
|
|
@@ -8775,7 +8740,7 @@ const W_TOKEN_DENSITY = .25;
|
|
|
8775
8740
|
var EfficiencyScorer = class {
|
|
8776
8741
|
_logger;
|
|
8777
8742
|
constructor(logger) {
|
|
8778
|
-
this._logger = logger ??
|
|
8743
|
+
this._logger = logger ?? createStderrLogger("telemetry:efficiency-scorer");
|
|
8779
8744
|
}
|
|
8780
8745
|
/**
|
|
8781
8746
|
* Compute an efficiency score for a story given its turn analyses.
|
|
@@ -9008,7 +8973,7 @@ var EfficiencyScorer = class {
|
|
|
9008
8973
|
var Recommender = class Recommender {
|
|
9009
8974
|
_logger;
|
|
9010
8975
|
constructor(logger) {
|
|
9011
|
-
this._logger = logger ??
|
|
8976
|
+
this._logger = logger ?? createStderrLogger("telemetry:recommender");
|
|
9012
8977
|
}
|
|
9013
8978
|
/**
|
|
9014
8979
|
* Run all rules against the given context and return sorted recommendations.
|
|
@@ -9425,7 +9390,7 @@ var ClaudeCodeAdapter = class {
|
|
|
9425
9390
|
adapterVersion = "1.0.0";
|
|
9426
9391
|
_logger;
|
|
9427
9392
|
constructor(logger) {
|
|
9428
|
-
this._logger = logger ??
|
|
9393
|
+
this._logger = logger ?? createStderrLogger("claude-adapter");
|
|
9429
9394
|
}
|
|
9430
9395
|
/**
|
|
9431
9396
|
* Verify the `claude` binary is installed and responsive.
|
|
@@ -9705,7 +9670,7 @@ var CodexCLIAdapter = class {
|
|
|
9705
9670
|
adapterVersion = "1.0.0";
|
|
9706
9671
|
_logger;
|
|
9707
9672
|
constructor(logger) {
|
|
9708
|
-
this._logger = logger ??
|
|
9673
|
+
this._logger = logger ?? createStderrLogger("codex-adapter");
|
|
9709
9674
|
}
|
|
9710
9675
|
/**
|
|
9711
9676
|
* Verify the `codex` binary is installed and responsive.
|
|
@@ -9927,7 +9892,7 @@ var GeminiCLIAdapter = class {
|
|
|
9927
9892
|
adapterVersion = "1.0.0";
|
|
9928
9893
|
_logger;
|
|
9929
9894
|
constructor(logger) {
|
|
9930
|
-
this._logger = logger ??
|
|
9895
|
+
this._logger = logger ?? createStderrLogger("gemini-adapter");
|
|
9931
9896
|
}
|
|
9932
9897
|
/**
|
|
9933
9898
|
* Verify the `gemini` binary is installed and responsive.
|
|
@@ -11256,5 +11221,5 @@ async function callLLM(params) {
|
|
|
11256
11221
|
}
|
|
11257
11222
|
|
|
11258
11223
|
//#endregion
|
|
11259
|
-
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, InMemoryDatabaseAdapter, 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, classifyVersionGap, compareRunMetrics, createAmendmentRun, createConfigSystem, createDatabaseAdapter as createDatabaseAdapter$1, createDecision, 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, initWorkGraphSchema, initializeDolt, listRequirements, listRunMetrics, loadModelRoutingConfig, loadParentRunDecisions, registerArtifact, resolvePromptFile, supersedeDecision, swallowDebug, tagRunAsBaseline, updateDecision, updatePipelineRun, updatePipelineRunConfig, upsertDecision, writeRunMetrics, writeStoryMetrics };
|
|
11260
|
-
//# sourceMappingURL=dist-
|
|
11224
|
+
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, InMemoryDatabaseAdapter, 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, classifyVersionGap, compareRunMetrics, createAmendmentRun, createConfigSystem, createDatabaseAdapter as createDatabaseAdapter$1, createDecision, createExperimenter, createPipelineRun, createRequirement, createStderrLogger, 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, initWorkGraphSchema, initializeDolt, listRequirements, listRunMetrics, loadModelRoutingConfig, loadParentRunDecisions, registerArtifact, resolvePromptFile, supersedeDecision, swallowDebug, tagRunAsBaseline, updateDecision, updatePipelineRun, updatePipelineRunConfig, upsertDecision, writeRunMetrics, writeStoryMetrics };
|
|
11225
|
+
//# sourceMappingURL=dist-NCtAx8Xo.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AdtError } from "./dist-
|
|
1
|
+
import { AdtError } from "./dist-NCtAx8Xo.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-CbWCo0EG.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-NCtAx8Xo.js";
|
|
2
2
|
|
|
3
3
|
export { createExperimenter };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createLogger } from "./logger-KeHncl-f.js";
|
|
2
|
-
import { DoltClient, DoltQueryError, createDatabaseAdapter$1 as createDatabaseAdapter, getLatestRun, getPipelineRunById, initSchema } from "./dist-
|
|
3
|
-
import { resolveMainRepoRoot, resolveRunManifest } from "./manifest-read-
|
|
2
|
+
import { DoltClient, DoltQueryError, createDatabaseAdapter$1 as createDatabaseAdapter, getLatestRun, getPipelineRunById, initSchema } from "./dist-NCtAx8Xo.js";
|
|
3
|
+
import { resolveMainRepoRoot, resolveRunManifest } from "./manifest-read-CgWpVLT_.js";
|
|
4
4
|
import { createRequire } from "module";
|
|
5
5
|
import { dirname, join } from "path";
|
|
6
6
|
import { existsSync, readFileSync } from "node:fs";
|
|
@@ -1000,4 +1000,4 @@ function registerHealthCommand(program, _version = "0.0.0", projectRoot = proces
|
|
|
1000
1000
|
|
|
1001
1001
|
//#endregion
|
|
1002
1002
|
export { BMAD_BASELINE_TOKENS_FULL, DEFAULT_STALL_THRESHOLD_SECONDS, FileKvStore, STOP_AFTER_VALID_PHASES, STORY_KEY_PATTERN, SUBSTRATE_OWNED_SETTINGS_KEYS, VALID_PHASES, __commonJS, __require, __toESM, buildPipelineStatusOutput, createDatabaseAdapter$1 as createDatabaseAdapter, createDoltOperatorReader, findPackageRoot, formatOutput, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, inspectProcessTree, isOrchestratorProcessLine, parseDbTimestampAsUtc, registerHealthCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion, runHealthAction, validateStoryKey };
|
|
1003
|
-
//# sourceMappingURL=health-
|
|
1003
|
+
//# sourceMappingURL=health-BZsEyfqX.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DEFAULT_STALL_THRESHOLD_SECONDS, getAllDescendantPids, getAutoHealthData, inspectProcessTree, isOrchestratorProcessLine, registerHealthCommand, runHealthAction } from "./health-
|
|
1
|
+
import { DEFAULT_STALL_THRESHOLD_SECONDS, getAllDescendantPids, getAutoHealthData, inspectProcessTree, isOrchestratorProcessLine, registerHealthCommand, runHealthAction } from "./health-BZsEyfqX.js";
|
|
2
2
|
import "./logger-KeHncl-f.js";
|
|
3
|
-
import "./dist-
|
|
4
|
-
import "./manifest-read-
|
|
3
|
+
import "./dist-NCtAx8Xo.js";
|
|
4
|
+
import "./manifest-read-CgWpVLT_.js";
|
|
5
5
|
import "./work-graph-repository-DZyJv5pV.js";
|
|
6
6
|
import "./decisions-CzSIEeGP.js";
|
|
7
7
|
|
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-NCtAx8Xo.js";
|
|
4
4
|
import "./adapter-registry-DIcrxjH8.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-CbWCo0EG.js";
|
|
6
6
|
|
|
7
7
|
//#region src/core/di.ts
|
|
8
8
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createLogger } from "./logger-KeHncl-f.js";
|
|
2
|
-
import { readCurrentRunId, resolveMainRepoRoot } from "./manifest-read-
|
|
2
|
+
import { readCurrentRunId, resolveMainRepoRoot } from "./manifest-read-CgWpVLT_.js";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
5
5
|
import * as readline from "node:readline";
|
|
@@ -180,4 +180,4 @@ async function runInteractivePrompt(decisionContext) {
|
|
|
180
180
|
|
|
181
181
|
//#endregion
|
|
182
182
|
export { runInteractivePrompt };
|
|
183
|
-
//# sourceMappingURL=interactive-prompt-
|
|
183
|
+
//# sourceMappingURL=interactive-prompt-DGRuUc6E.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createLogger } from "./logger-KeHncl-f.js";
|
|
2
|
-
import { LEARNING_FINDING, createDecision, getDecisionsByCategory } from "./dist-
|
|
2
|
+
import { LEARNING_FINDING, createDecision, getDecisionsByCategory } from "./dist-NCtAx8Xo.js";
|
|
3
3
|
import * as path$1 from "path";
|
|
4
4
|
import { join } from "path";
|
|
5
5
|
import { readFile } from "fs/promises";
|
|
@@ -952,7 +952,7 @@ function createSdlcDevStoryHandler(options) {
|
|
|
952
952
|
};
|
|
953
953
|
}
|
|
954
954
|
} catch {
|
|
955
|
-
|
|
955
|
+
process.stderr.write("[sdlc-dev-story-handler] DispatchGate.check failed; proceeding with original dispatch\n");
|
|
956
956
|
}
|
|
957
957
|
const devStoryParams = {
|
|
958
958
|
storyKey,
|
|
@@ -5845,4 +5845,4 @@ async function resolveRunManifest(dbRoot, runId) {
|
|
|
5845
5845
|
|
|
5846
5846
|
//#endregion
|
|
5847
5847
|
export { FindingsInjector, RunManifest, RuntimeProbeListSchema, SupervisorLock, ZERO_FINDINGS_BY_AUTHOR, ZERO_FINDING_COUNTS, ZERO_PROBE_AUTHOR_METRICS, aggregateProbeAuthorMetrics, applyConfigToGraph, createDefaultVerificationPipeline, createGraphOrchestrator, createSdlcCodeReviewHandler, createSdlcCreateStoryHandler, createSdlcDevStoryHandler, createSdlcPhaseHandler, detectsEventDrivenAC, detectsStateIntegratingAC, extractTargetFilesFromStoryContent, parseRuntimeProbes, readCurrentRunId, renderFindings, resolveGraphPath, resolveMainRepoRoot, resolveRunManifest, rollupFindingCounts, rollupFindingsByAuthor, rollupProbeAuthorByClass, rollupProbeAuthorMetrics, runAcTraceabilityCheck, runStaleVerificationRecovery };
|
|
5848
|
-
//# sourceMappingURL=manifest-read-
|
|
5848
|
+
//# sourceMappingURL=manifest-read-CgWpVLT_.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../logger-KeHncl-f.js";
|
|
2
|
-
import "../../dist-
|
|
3
|
-
import "../../manifest-read-
|
|
4
|
-
import { runInteractivePrompt } from "../../interactive-prompt-
|
|
2
|
+
import "../../dist-NCtAx8Xo.js";
|
|
3
|
+
import "../../manifest-read-CgWpVLT_.js";
|
|
4
|
+
import { runInteractivePrompt } from "../../interactive-prompt-DGRuUc6E.js";
|
|
5
5
|
|
|
6
6
|
export { runInteractivePrompt };
|
|
@@ -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-NCtAx8Xo.js";
|
|
2
2
|
import "./routing-DFxoKHDt.js";
|
|
3
3
|
|
|
4
4
|
export { loadModelRoutingConfig };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import "./health-
|
|
1
|
+
import "./health-BZsEyfqX.js";
|
|
2
2
|
import "./logger-KeHncl-f.js";
|
|
3
3
|
import "./helpers-CElYrONe.js";
|
|
4
|
-
import "./dist-
|
|
5
|
-
import { normalizeGraphSummaryToStatus, registerRunCommand, resolveMaxReviewCycles, resolveProbeAuthorStateIntegrating, runRunAction, wireNdjsonEmitter } from "./run-
|
|
6
|
-
import "./manifest-read-
|
|
4
|
+
import "./dist-NCtAx8Xo.js";
|
|
5
|
+
import { normalizeGraphSummaryToStatus, registerRunCommand, resolveMaxReviewCycles, resolveProbeAuthorStateIntegrating, runRunAction, wireNdjsonEmitter } from "./run-DKVXaIgo.js";
|
|
6
|
+
import "./manifest-read-CgWpVLT_.js";
|
|
7
7
|
import "./routing-DFxoKHDt.js";
|
|
8
8
|
import "./work-graph-repository-DZyJv5pV.js";
|
|
9
9
|
import "./decisions-CzSIEeGP.js";
|
|
10
10
|
import "./decision-router-DblHY8se.js";
|
|
11
|
-
import "./interactive-prompt-
|
|
11
|
+
import "./interactive-prompt-DGRuUc6E.js";
|
|
12
12
|
import "./recovery-engine-BKGBeBnW.js";
|
|
13
13
|
|
|
14
14
|
export { runRunAction };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { BMAD_BASELINE_TOKENS_FULL, FileKvStore, STOP_AFTER_VALID_PHASES, STORY_KEY_PATTERN, VALID_PHASES, __commonJS, __require, __toESM, buildPipelineStatusOutput, createDatabaseAdapter, formatOutput, formatPipelineSummary, formatTokenTelemetry, inspectProcessTree, parseDbTimestampAsUtc, validateStoryKey } from "./health-
|
|
1
|
+
import { BMAD_BASELINE_TOKENS_FULL, FileKvStore, STOP_AFTER_VALID_PHASES, STORY_KEY_PATTERN, VALID_PHASES, __commonJS, __require, __toESM, buildPipelineStatusOutput, createDatabaseAdapter, formatOutput, formatPipelineSummary, formatTokenTelemetry, inspectProcessTree, parseDbTimestampAsUtc, validateStoryKey } from "./health-BZsEyfqX.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, classifyVersionGap, createConfigSystem, createDatabaseAdapter$1, createDecision, createPipelineRun, createRequirement, detectInterfaceChanges, getArtifactByTypeForRun, getArtifactsByRun, getDecisionsByCategory, getDecisionsByPhase, getDecisionsByPhaseForRun, getLatestRun, getPipelineRunById, getRunMetrics, getRunningPipelineRuns, getStoryMetricsForRun, getTokenUsageSummary, initSchema, listRequirements, loadModelRoutingConfig, registerArtifact, swallowDebug, updatePipelineRun, updatePipelineRunConfig, upsertDecision, writeRunMetrics, writeStoryMetrics } from "./dist-
|
|
5
|
-
import { FindingsInjector, RunManifest, RuntimeProbeListSchema, applyConfigToGraph, createDefaultVerificationPipeline, createGraphOrchestrator, createSdlcCodeReviewHandler, createSdlcCreateStoryHandler, createSdlcDevStoryHandler, createSdlcPhaseHandler, detectsEventDrivenAC, detectsStateIntegratingAC, extractTargetFilesFromStoryContent, renderFindings, resolveGraphPath, resolveMainRepoRoot, runAcTraceabilityCheck, runStaleVerificationRecovery } from "./manifest-read-
|
|
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, classifyVersionGap, createConfigSystem, createDatabaseAdapter$1, createDecision, createPipelineRun, createRequirement, createStderrLogger, detectInterfaceChanges, getArtifactByTypeForRun, getArtifactsByRun, getDecisionsByCategory, getDecisionsByPhase, getDecisionsByPhaseForRun, getLatestRun, getPipelineRunById, getRunMetrics, getRunningPipelineRuns, getStoryMetricsForRun, getTokenUsageSummary, initSchema, listRequirements, loadModelRoutingConfig, registerArtifact, swallowDebug, updatePipelineRun, updatePipelineRunConfig, upsertDecision, writeRunMetrics, writeStoryMetrics } from "./dist-NCtAx8Xo.js";
|
|
5
|
+
import { FindingsInjector, RunManifest, RuntimeProbeListSchema, applyConfigToGraph, createDefaultVerificationPipeline, createGraphOrchestrator, createSdlcCodeReviewHandler, createSdlcCreateStoryHandler, createSdlcDevStoryHandler, createSdlcPhaseHandler, detectsEventDrivenAC, detectsStateIntegratingAC, extractTargetFilesFromStoryContent, renderFindings, resolveGraphPath, resolveMainRepoRoot, runAcTraceabilityCheck, runStaleVerificationRecovery } from "./manifest-read-CgWpVLT_.js";
|
|
6
6
|
import { WorkGraphRepository, detectCycles } from "./work-graph-repository-DZyJv5pV.js";
|
|
7
7
|
import { deriveExitCode, routeDecision } from "./decision-router-DblHY8se.js";
|
|
8
|
-
import { runInteractivePrompt } from "./interactive-prompt-
|
|
8
|
+
import { runInteractivePrompt } from "./interactive-prompt-DGRuUc6E.js";
|
|
9
9
|
import { runRecoveryEngine } from "./recovery-engine-BKGBeBnW.js";
|
|
10
10
|
import { basename, dirname, extname, join } from "path";
|
|
11
11
|
import { access, readFile, readdir, stat } from "fs/promises";
|
|
@@ -400,7 +400,7 @@ var GitWorktreeManagerImpl = class {
|
|
|
400
400
|
this._projectRoot = projectRoot;
|
|
401
401
|
this._baseDirectory = baseDirectory;
|
|
402
402
|
this._db = db;
|
|
403
|
-
this._logger = logger$27 ??
|
|
403
|
+
this._logger = logger$27 ?? createStderrLogger("git-worktree-manager");
|
|
404
404
|
this._copyFiles = copyFiles;
|
|
405
405
|
this._onTaskReady = ({ taskId }) => {
|
|
406
406
|
this._handleTaskReady(taskId).catch((err) => {
|
|
@@ -46998,7 +46998,7 @@ async function runFullPipeline(options) {
|
|
|
46998
46998
|
*/
|
|
46999
46999
|
async function emitPreDispatchVersionAdvisory(currentVersion) {
|
|
47000
47000
|
if (process.env["SUBSTRATE_NO_UPDATE_CHECK"] === "1") return;
|
|
47001
|
-
const { createVersionManager } = await import("./version-manager-impl-
|
|
47001
|
+
const { createVersionManager } = await import("./version-manager-impl-NE_GqZQu.js");
|
|
47002
47002
|
const vm = createVersionManager();
|
|
47003
47003
|
const result = await vm.checkForUpdates(true);
|
|
47004
47004
|
const gap = classifyVersionGap(currentVersion, result.latestVersion);
|
|
@@ -47095,4 +47095,4 @@ function registerRunCommand(program, version = "0.0.0", projectRoot = process.cw
|
|
|
47095
47095
|
|
|
47096
47096
|
//#endregion
|
|
47097
47097
|
export { AdapterTelemetryPersistence, AppError, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, EpicIngester, GLOBSTAR$1 as GLOBSTAR, GitClient, GrammarLoader, Minimatch$1 as Minimatch, Minipass, RepoMapInjector, RepoMapModule, RepoMapQueryEngine, RepoMapStorage, SymbolParser, createContextCompiler, createDispatcher, createEventEmitter, createGitWorktreeManager, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStopAfterGate, createTelemetryAdvisor, escape$1 as escape, formatPhaseCompletionSummary, getFactoryRunSummaries, getScenarioResultsForRun, getTwinRunsForRun, listGraphRuns, normalizeGraphSummaryToStatus, registerExportCommand, registerFactoryCommand, registerRunCommand, registerScenariosCommand, resolveMaxReviewCycles, resolveProbeAuthorStateIntegrating, resolveStoryKeys, runAnalysisPhase, runPlanningPhase, runProbeAuthor, runRunAction, runSolutioningPhase, unescape$1 as unescape, validateStopAfterFromConflict, wireNdjsonEmitter };
|
|
47098
|
-
//# sourceMappingURL=run-
|
|
47098
|
+
//# sourceMappingURL=run-DKVXaIgo.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./dist-
|
|
1
|
+
import "./dist-NCtAx8Xo.js";
|
|
2
2
|
import "./version-manager-impl-qFBiO4Eh.js";
|
|
3
|
-
import { isGlobalInstall, registerUpgradeCommand, runUpgradeCommand } from "./upgrade-
|
|
3
|
+
import { isGlobalInstall, registerUpgradeCommand, runUpgradeCommand } from "./upgrade-f-U437AC.js";
|
|
4
4
|
|
|
5
5
|
export { isGlobalInstall, registerUpgradeCommand, runUpgradeCommand };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createVersionManager } from "./dist-
|
|
1
|
+
import { createVersionManager } from "./dist-NCtAx8Xo.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-f-U437AC.js.map
|
package/package.json
CHANGED