substrate-ai 0.20.54 → 0.20.56
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-BU6ncoq1.js +4 -0
- package/dist/cli/index.js +29 -16
- package/dist/{decisions-UFV5YFaW.js → decisions-8q99K5w4.js} +1 -1
- package/dist/{dist-VcMmfo2w.js → dist-ARkfvp4m.js} +1 -2
- package/dist/{errors-CogpxBUg.js → errors-DJdIXYoN.js} +2 -2
- package/dist/{experimenter-2KGF4bLj.js → experimenter-BxPyegZX.js} +1 -1
- package/dist/{health-BQ5dj53s.js → health-BdLCJORK.js} +2 -2
- package/dist/{health-sQ1X_5_6.js → health-CTXosAp0.js} +41 -4
- package/dist/index.d.ts +17 -9
- package/dist/index.js +2 -2
- package/dist/{routing-BNGNSI0w.js → routing-BUTffPcL.js} +1 -1
- package/dist/{run-B-SRlzdi.js → run-BnD0zCgV.js} +3 -3
- package/dist/{run-DgmoC6HT.js → run-XCd2tF_T.js} +17 -7
- package/dist/{upgrade-Csv0GRft.js → upgrade-CAc1itQK.js} +2 -2
- package/dist/{upgrade-CF4__LCr.js → upgrade-CqKuWLIO.js} +2 -2
- package/dist/{version-manager-impl-C-mrgne3.js → version-manager-impl-DJ89OlJD.js} +1 -1
- package/package.json +1 -1
- package/dist/adapter-registry-CcahKCG1.js +0 -4
package/dist/cli/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { FileStateStore, RunManifest, SUBSTRATE_OWNED_SETTINGS_KEYS, SupervisorLock, VALID_PHASES, WorkGraphRepository, ZERO_FINDINGS_BY_AUTHOR, ZERO_FINDING_COUNTS, ZERO_PROBE_AUTHOR_METRICS, aggregateProbeAuthorMetrics, buildPipelineStatusOutput, createDatabaseAdapter, createStateStore, findPackageRoot, formatOutput, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, inspectProcessTree, parseDbTimestampAsUtc, parseRuntimeProbes, registerHealthCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion, resolveMainRepoRoot, resolveRunManifest, rollupFindingCounts, rollupFindingsByAuthor, rollupProbeAuthorMetrics } from "../health-
|
|
2
|
+
import { FileStateStore, RunManifest, SUBSTRATE_OWNED_SETTINGS_KEYS, SupervisorLock, VALID_PHASES, WorkGraphRepository, ZERO_FINDINGS_BY_AUTHOR, ZERO_FINDING_COUNTS, ZERO_PROBE_AUTHOR_METRICS, aggregateProbeAuthorMetrics, buildPipelineStatusOutput, createDatabaseAdapter, createStateStore, findPackageRoot, formatOutput, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, inspectProcessTree, parseDbTimestampAsUtc, parseRuntimeProbes, registerHealthCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion, resolveMainRepoRoot, resolveRunManifest, rollupFindingCounts, rollupFindingsByAuthor, rollupProbeAuthorByClass, rollupProbeAuthorMetrics } from "../health-CTXosAp0.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, createDoltClient, createPipelineRun, getActiveDecisions, getAllCostEntriesFiltered, getBaselineRunMetrics, getDecisionsByCategory, getDecisionsByPhaseForRun, getLatestCompletedRun, getLatestRun, getPipelineRunById, getPlanningCostTotal, getRetryableEscalations, getRunMetrics, getRunningPipelineRuns, getSessionCostSummary, getSessionCostSummaryFiltered, getStoryMetricsForRun, getTokenUsageSummary, incrementRunRestarts, initSchema, initializeDolt, listRunMetrics, loadParentRunDecisions, supersedeDecision, tagRunAsBaseline, updatePipelineRun } from "../dist-
|
|
5
|
+
import { AdapterRegistry, BudgetConfigSchema, CURRENT_CONFIG_FORMAT_VERSION, CURRENT_TASK_GRAPH_VERSION, ConfigError, CostTrackerConfigSchema, DEFAULT_CONFIG, DoltClient, DoltNotInstalled, GlobalSettingsSchema, InMemoryDatabaseAdapter, IngestionServer, MonitorDatabaseImpl, OPERATIONAL_FINDING, PartialGlobalSettingsSchema, PartialProviderConfigSchema, ProvidersSchema, RoutingRecommender, STORY_METRICS, TelemetryConfigSchema, addTokenUsage, aggregateTokenUsageForRun, checkDoltInstalled, compareRunMetrics, createAmendmentRun, createConfigSystem, createDecision, createDoltClient, createPipelineRun, getActiveDecisions, getAllCostEntriesFiltered, getBaselineRunMetrics, getDecisionsByCategory, getDecisionsByPhaseForRun, getLatestCompletedRun, getLatestRun, getPipelineRunById, getPlanningCostTotal, getRetryableEscalations, getRunMetrics, getRunningPipelineRuns, getSessionCostSummary, getSessionCostSummaryFiltered, getStoryMetricsForRun, getTokenUsageSummary, incrementRunRestarts, initSchema, initializeDolt, listRunMetrics, loadParentRunDecisions, supersedeDecision, tagRunAsBaseline, updatePipelineRun } from "../dist-ARkfvp4m.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, runProbeAuthor, 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, runProbeAuthor, runSolutioningPhase, validateStopAfterFromConflict } from "../run-XCd2tF_T.js";
|
|
8
|
+
import "../errors-DJdIXYoN.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-CqKuWLIO.js";
|
|
13
13
|
import { Command } from "commander";
|
|
14
14
|
import { fileURLToPath } from "url";
|
|
15
15
|
import { dirname, join, resolve } from "path";
|
|
@@ -3667,7 +3667,7 @@ async function runStatusAction(options) {
|
|
|
3667
3667
|
logger$13.debug({ err }, "Work graph query failed, continuing without work graph data");
|
|
3668
3668
|
}
|
|
3669
3669
|
if (run === void 0) {
|
|
3670
|
-
const { inspectProcessTree: inspectProcessTree$1 } = await import("../health-
|
|
3670
|
+
const { inspectProcessTree: inspectProcessTree$1 } = await import("../health-BdLCJORK.js");
|
|
3671
3671
|
const substrateDirPath = join(projectRoot, ".substrate");
|
|
3672
3672
|
const processInfo = inspectProcessTree$1({
|
|
3673
3673
|
projectRoot,
|
|
@@ -4623,7 +4623,7 @@ function defaultSupervisorDeps() {
|
|
|
4623
4623
|
if (cached === null) {
|
|
4624
4624
|
const { AdapterRegistry: AR } = await import(
|
|
4625
4625
|
/* @vite-ignore */
|
|
4626
|
-
"../adapter-registry-
|
|
4626
|
+
"../adapter-registry-BU6ncoq1.js"
|
|
4627
4627
|
);
|
|
4628
4628
|
cached = new AR();
|
|
4629
4629
|
await cached.discoverAndRegister();
|
|
@@ -5190,11 +5190,11 @@ async function runSupervisorAction(options, deps = {}) {
|
|
|
5190
5190
|
try {
|
|
5191
5191
|
const { createExperimenter } = await import(
|
|
5192
5192
|
/* @vite-ignore */
|
|
5193
|
-
"../experimenter-
|
|
5193
|
+
"../experimenter-BxPyegZX.js"
|
|
5194
5194
|
);
|
|
5195
5195
|
const { getLatestRun: getLatest } = await import(
|
|
5196
5196
|
/* @vite-ignore */
|
|
5197
|
-
"../decisions-
|
|
5197
|
+
"../decisions-8q99K5w4.js"
|
|
5198
5198
|
);
|
|
5199
5199
|
const expAdapter = createDatabaseAdapter({
|
|
5200
5200
|
backend: "auto",
|
|
@@ -5204,7 +5204,7 @@ async function runSupervisorAction(options, deps = {}) {
|
|
|
5204
5204
|
await initSchema(expAdapter);
|
|
5205
5205
|
const { runRunAction: runPipeline } = await import(
|
|
5206
5206
|
/* @vite-ignore */
|
|
5207
|
-
"../run-
|
|
5207
|
+
"../run-BnD0zCgV.js"
|
|
5208
5208
|
);
|
|
5209
5209
|
const runStoryFn = async (opts) => {
|
|
5210
5210
|
const exitCode = await runPipeline({
|
|
@@ -5558,7 +5558,7 @@ function printFactoryRunTable(runs) {
|
|
|
5558
5558
|
}
|
|
5559
5559
|
}
|
|
5560
5560
|
async function runMetricsAction(options) {
|
|
5561
|
-
const { outputFormat, projectRoot, limit = 10, compare, tagBaseline, analysis, sprint, story, taskType, since, aggregate, efficiency, recommendations, turns, consumers, categories, compareStories, routingRecommendations, run, factory, probeAuthorSummary } = options;
|
|
5561
|
+
const { outputFormat, projectRoot, limit = 10, compare, tagBaseline, analysis, sprint, story, taskType, since, aggregate, efficiency, recommendations, turns, consumers, categories, compareStories, routingRecommendations, run, factory, probeAuthorSummary, probeAuthorClassSummary } = options;
|
|
5562
5562
|
const telemetryModes = [
|
|
5563
5563
|
efficiency,
|
|
5564
5564
|
recommendations,
|
|
@@ -5736,7 +5736,7 @@ async function runMetricsAction(options) {
|
|
|
5736
5736
|
const routingConfigPath = join(dbDir, "routing.yml");
|
|
5737
5737
|
let routingConfig = null;
|
|
5738
5738
|
if (existsSync$1(routingConfigPath)) try {
|
|
5739
|
-
const { loadModelRoutingConfig } = await import("../routing-
|
|
5739
|
+
const { loadModelRoutingConfig } = await import("../routing-BUTffPcL.js");
|
|
5740
5740
|
routingConfig = loadModelRoutingConfig(routingConfigPath);
|
|
5741
5741
|
} catch {}
|
|
5742
5742
|
if (routingConfig === null) routingConfig = {
|
|
@@ -5970,6 +5970,7 @@ async function runMetricsAction(options) {
|
|
|
5970
5970
|
const verificationRanByStoryRun = new Map();
|
|
5971
5971
|
const probeAuthorByStoryRun = new Map();
|
|
5972
5972
|
const findingsByAuthorByStoryRun = new Map();
|
|
5973
|
+
const probeAuthorTriggeredByStoryRun = new Map();
|
|
5973
5974
|
const uniqueRunIds = Array.from(new Set(storyMetrics.map((sm) => sm.run_id).filter((id) => id !== "")));
|
|
5974
5975
|
for (const uniqueRunId of uniqueRunIds) try {
|
|
5975
5976
|
const { manifest } = await resolveRunManifest(dbRoot, uniqueRunId);
|
|
@@ -5981,6 +5982,7 @@ async function runMetricsAction(options) {
|
|
|
5981
5982
|
verificationRanByStoryRun.set(key, entry.verification_result !== void 0 && entry.verification_result !== null);
|
|
5982
5983
|
probeAuthorByStoryRun.set(key, rollupProbeAuthorMetrics(entry.verification_result));
|
|
5983
5984
|
findingsByAuthorByStoryRun.set(key, rollupFindingsByAuthor(entry.verification_result));
|
|
5985
|
+
if (entry.probe_author_triggered_by !== void 0) probeAuthorTriggeredByStoryRun.set(key, entry.probe_author_triggered_by);
|
|
5984
5986
|
}
|
|
5985
5987
|
} catch {}
|
|
5986
5988
|
let factoryRuns = [];
|
|
@@ -6019,6 +6021,16 @@ async function runMetricsAction(options) {
|
|
|
6019
6021
|
const aggregate$1 = aggregateProbeAuthorMetrics(allMetrics, storyMetricsWithFindings.length);
|
|
6020
6022
|
jsonPayload.probe_author_summary = aggregate$1;
|
|
6021
6023
|
}
|
|
6024
|
+
if (probeAuthorClassSummary) {
|
|
6025
|
+
const classSummaryEntries = storyMetricsWithFindings.map((sm) => {
|
|
6026
|
+
const key = `${sm.story_key}:${sm.run_id}`;
|
|
6027
|
+
return {
|
|
6028
|
+
metrics: sm.probe_author,
|
|
6029
|
+
triggered_by: probeAuthorTriggeredByStoryRun.get(key)
|
|
6030
|
+
};
|
|
6031
|
+
});
|
|
6032
|
+
jsonPayload.probe_author_class_summary = rollupProbeAuthorByClass(classSummaryEntries);
|
|
6033
|
+
}
|
|
6022
6034
|
if (doltMetrics !== void 0) if (aggregate) {
|
|
6023
6035
|
const aggregateResults = doltMetrics.map((m) => ({
|
|
6024
6036
|
task_type: m.taskType,
|
|
@@ -6124,7 +6136,7 @@ async function runMetricsAction(options) {
|
|
|
6124
6136
|
}
|
|
6125
6137
|
}
|
|
6126
6138
|
function registerMetricsCommand(program, _version = "0.0.0", projectRoot = process.cwd()) {
|
|
6127
|
-
program.command("metrics").description("Show historical pipeline run metrics and cross-run comparison").option("--project-root <path>", "Project root directory", projectRoot).option("--output-format <format>", "Output format: human (default) or json", "human").option("--limit <n>", "Number of runs to show (default: 10)", (v) => parseInt(v, 10), 10).option("--compare <run-id-a,run-id-b>", "Compare two runs side-by-side (comma-separated IDs, e.g. abc123,def456)").option("--tag-baseline <run-id>", "Mark a run as the performance baseline").option("--analysis <run-id>", "Read and output the analysis report for the specified run (AC5 of Story 17-3)").option("--sprint <sprint>", "Filter StateStore metrics by sprint (e.g. sprint-1)").option("--story <story-key>", "Filter StateStore metrics by story key (e.g. 26-1)").option("--task-type <type>", "Filter StateStore metrics by task type (e.g. dev-story)").option("--since <iso-date>", "Filter StateStore metrics at or after this ISO timestamp").option("--aggregate", "Aggregate StateStore metrics grouped by task_type").option("--efficiency", "Show telemetry efficiency scores for recent stories").option("--recommendations", "Show all telemetry recommendations across stories").option("--turns <storyKey>", "Show per-turn analysis for a specific story").option("--consumers <storyKey>", "Show consumer stats for a specific story").option("--categories", "Show category stats (optionally scoped by --story <storyKey>)").option("--compare-stories <storyA,storyB>", "Compare efficiency scores of two stories side-by-side (comma-separated keys)").option("--routing-recommendations", "Show routing recommendations derived from phase token breakdown history").option("--run <run-id>", "Show per-iteration score history for a specific factory run").option("--factory", "Show only factory graph run metrics (excludes SDLC runs)").option("--probe-author-summary", "Print cross-run probe-author KPI aggregate (Story 60-15)").action(async (opts) => {
|
|
6139
|
+
program.command("metrics").description("Show historical pipeline run metrics and cross-run comparison").option("--project-root <path>", "Project root directory", projectRoot).option("--output-format <format>", "Output format: human (default) or json", "human").option("--limit <n>", "Number of runs to show (default: 10)", (v) => parseInt(v, 10), 10).option("--compare <run-id-a,run-id-b>", "Compare two runs side-by-side (comma-separated IDs, e.g. abc123,def456)").option("--tag-baseline <run-id>", "Mark a run as the performance baseline").option("--analysis <run-id>", "Read and output the analysis report for the specified run (AC5 of Story 17-3)").option("--sprint <sprint>", "Filter StateStore metrics by sprint (e.g. sprint-1)").option("--story <story-key>", "Filter StateStore metrics by story key (e.g. 26-1)").option("--task-type <type>", "Filter StateStore metrics by task type (e.g. dev-story)").option("--since <iso-date>", "Filter StateStore metrics at or after this ISO timestamp").option("--aggregate", "Aggregate StateStore metrics grouped by task_type").option("--efficiency", "Show telemetry efficiency scores for recent stories").option("--recommendations", "Show all telemetry recommendations across stories").option("--turns <storyKey>", "Show per-turn analysis for a specific story").option("--consumers <storyKey>", "Show consumer stats for a specific story").option("--categories", "Show category stats (optionally scoped by --story <storyKey>)").option("--compare-stories <storyA,storyB>", "Compare efficiency scores of two stories side-by-side (comma-separated keys)").option("--routing-recommendations", "Show routing recommendations derived from phase token breakdown history").option("--run <run-id>", "Show per-iteration score history for a specific factory run").option("--factory", "Show only factory graph run metrics (excludes SDLC runs)").option("--probe-author-summary", "Print cross-run probe-author KPI aggregate (Story 60-15)").option("--probe-author-class-summary", "Print cross-run probe-author KPI aggregate broken down by trigger class (Story 65-6)").action(async (opts) => {
|
|
6128
6140
|
const outputFormat = opts.outputFormat === "json" ? "json" : "human";
|
|
6129
6141
|
let compareIds;
|
|
6130
6142
|
if (opts.compare !== void 0) {
|
|
@@ -6162,7 +6174,8 @@ function registerMetricsCommand(program, _version = "0.0.0", projectRoot = proce
|
|
|
6162
6174
|
...opts.routingRecommendations !== void 0 && { routingRecommendations: opts.routingRecommendations },
|
|
6163
6175
|
...opts.run !== void 0 && { run: opts.run },
|
|
6164
6176
|
...opts.factory !== void 0 && { factory: opts.factory },
|
|
6165
|
-
...opts.probeAuthorSummary !== void 0 && { probeAuthorSummary: opts.probeAuthorSummary }
|
|
6177
|
+
...opts.probeAuthorSummary !== void 0 && { probeAuthorSummary: opts.probeAuthorSummary },
|
|
6178
|
+
...opts.probeAuthorClassSummary !== void 0 && { probeAuthorClassSummary: opts.probeAuthorClassSummary }
|
|
6166
6179
|
};
|
|
6167
6180
|
const exitCode = await runMetricsAction(metricsOpts);
|
|
6168
6181
|
process.exitCode = exitCode;
|
|
@@ -9359,8 +9372,8 @@ async function createProgram() {
|
|
|
9359
9372
|
/** Fire-and-forget startup version check (story 8.3, AC3/AC5) */
|
|
9360
9373
|
function checkForUpdatesInBackground(currentVersion) {
|
|
9361
9374
|
if (process.env.SUBSTRATE_NO_UPDATE_CHECK === "1") return;
|
|
9362
|
-
import("../upgrade-
|
|
9363
|
-
const { createVersionManager } = await import("../version-manager-impl-
|
|
9375
|
+
import("../upgrade-CAc1itQK.js").then(async () => {
|
|
9376
|
+
const { createVersionManager } = await import("../version-manager-impl-DJ89OlJD.js");
|
|
9364
9377
|
const vm = createVersionManager();
|
|
9365
9378
|
const result = await vm.checkForUpdates();
|
|
9366
9379
|
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-ARkfvp4m.js";
|
|
2
2
|
import "./decisions-C0pz9Clx.js";
|
|
3
3
|
|
|
4
4
|
export { getLatestRun };
|
|
@@ -9301,7 +9301,6 @@ var ClaudeCodeAdapter = class {
|
|
|
9301
9301
|
"--dangerously-skip-permissions"
|
|
9302
9302
|
];
|
|
9303
9303
|
if (options.maxTurns !== void 0) args.push("--max-turns", String(options.maxTurns));
|
|
9304
|
-
if (options.maxContextTokens !== void 0) args.push("--max-context-tokens", String(options.maxContextTokens));
|
|
9305
9304
|
if (options.additionalFlags && options.additionalFlags.length > 0) args.push(...options.additionalFlags);
|
|
9306
9305
|
const systemPromptParts = [BASE_SYSTEM_PROMPT];
|
|
9307
9306
|
if (options.optimizationDirectives) systemPromptParts.push(`\n\n## Optimization Directives\n${options.optimizationDirectives}`);
|
|
@@ -11015,4 +11014,4 @@ async function callLLM(params) {
|
|
|
11015
11014
|
|
|
11016
11015
|
//#endregion
|
|
11017
11016
|
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, 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 };
|
|
11018
|
-
//# sourceMappingURL=dist-
|
|
11017
|
+
//# sourceMappingURL=dist-ARkfvp4m.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AdtError } from "./dist-
|
|
1
|
+
import { AdtError } from "./dist-ARkfvp4m.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-DJdIXYoN.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-ARkfvp4m.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-CTXosAp0.js";
|
|
2
2
|
import "./logger-KeHncl-f.js";
|
|
3
|
-
import "./dist-
|
|
3
|
+
import "./dist-ARkfvp4m.js";
|
|
4
4
|
import "./decisions-C0pz9Clx.js";
|
|
5
5
|
|
|
6
6
|
export { inspectProcessTree };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createLogger } from "./logger-KeHncl-f.js";
|
|
2
|
-
import { DoltClient, DoltQueryError, LEARNING_FINDING, createDatabaseAdapter$1 as createDatabaseAdapter, createDecision, getDecisionsByCategory, getLatestRun, getPipelineRunById, initSchema } from "./dist-
|
|
2
|
+
import { DoltClient, DoltQueryError, LEARNING_FINDING, createDatabaseAdapter$1 as createDatabaseAdapter, createDecision, getDecisionsByCategory, getLatestRun, getPipelineRunById, initSchema } from "./dist-ARkfvp4m.js";
|
|
3
3
|
import { createRequire } from "module";
|
|
4
4
|
import { dirname, join } from "path";
|
|
5
5
|
import { readFile } from "fs/promises";
|
|
@@ -5300,7 +5300,13 @@ const PerStoryStateSchema = z.object({
|
|
|
5300
5300
|
review_cycles: z.number().int().nonnegative().optional(),
|
|
5301
5301
|
dispatches: z.number().int().nonnegative().optional(),
|
|
5302
5302
|
retry_count: z.number().int().nonnegative().optional(),
|
|
5303
|
-
dev_story_signals: StoredDevStorySignalsSchema.optional()
|
|
5303
|
+
dev_story_signals: StoredDevStorySignalsSchema.optional(),
|
|
5304
|
+
probe_author_triggered_by: z.union([
|
|
5305
|
+
z.literal("event-driven"),
|
|
5306
|
+
z.literal("state-integrating"),
|
|
5307
|
+
z.literal("both"),
|
|
5308
|
+
z.string()
|
|
5309
|
+
]).optional()
|
|
5304
5310
|
});
|
|
5305
5311
|
|
|
5306
5312
|
//#endregion
|
|
@@ -6120,6 +6126,37 @@ function aggregateProbeAuthorMetrics(perStory, totalStories) {
|
|
|
6120
6126
|
catchRateByConfirmedDefect: authored > 0 ? confirmed / authored : 0
|
|
6121
6127
|
};
|
|
6122
6128
|
}
|
|
6129
|
+
/**
|
|
6130
|
+
* Group entries by `triggered_by` class and compute a `ProbeAuthorAggregate`
|
|
6131
|
+
* for each class. Entries without a `triggered_by` field (legacy/pre-65-6)
|
|
6132
|
+
* default to the `'event-driven'` class per the backward-compat rule.
|
|
6133
|
+
*
|
|
6134
|
+
* Story 65-6: powers `substrate metrics --probe-author-class-summary`.
|
|
6135
|
+
*
|
|
6136
|
+
* @param entries - Array of objects carrying a per-story `metrics` rollup and
|
|
6137
|
+
* an optional `triggered_by` class string (from the manifest's
|
|
6138
|
+
* `probe_author_triggered_by` field).
|
|
6139
|
+
* @returns A record keyed by each of the three known trigger classes, each
|
|
6140
|
+
* value being the `aggregateProbeAuthorMetrics` output for that class's
|
|
6141
|
+
* stories. Classes with no stories still appear with zero aggregates.
|
|
6142
|
+
*/
|
|
6143
|
+
function rollupProbeAuthorByClass(entries) {
|
|
6144
|
+
const groups = {
|
|
6145
|
+
"event-driven": [],
|
|
6146
|
+
"state-integrating": [],
|
|
6147
|
+
both: []
|
|
6148
|
+
};
|
|
6149
|
+
for (const entry of entries) {
|
|
6150
|
+
const cls = entry.triggered_by ?? "event-driven";
|
|
6151
|
+
const bucket = cls === "state-integrating" ? "state-integrating" : cls === "both" ? "both" : "event-driven";
|
|
6152
|
+
groups[bucket].push(entry.metrics);
|
|
6153
|
+
}
|
|
6154
|
+
return {
|
|
6155
|
+
"event-driven": aggregateProbeAuthorMetrics(groups["event-driven"], groups["event-driven"].length),
|
|
6156
|
+
"state-integrating": aggregateProbeAuthorMetrics(groups["state-integrating"], groups["state-integrating"].length),
|
|
6157
|
+
both: aggregateProbeAuthorMetrics(groups["both"], groups["both"].length)
|
|
6158
|
+
};
|
|
6159
|
+
}
|
|
6123
6160
|
/** Extract the probe name from a runtime-probe finding's message. The
|
|
6124
6161
|
* runtime-probe-check formatter writes `probe "<name>"...` as the leading
|
|
6125
6162
|
* pattern across all category branches (fail/timeout/assertion-fail/
|
|
@@ -6874,5 +6911,5 @@ function registerHealthCommand(program, _version = "0.0.0", projectRoot = proces
|
|
|
6874
6911
|
}
|
|
6875
6912
|
|
|
6876
6913
|
//#endregion
|
|
6877
|
-
export { BMAD_BASELINE_TOKENS_FULL, DEFAULT_STALL_THRESHOLD_SECONDS, DoltMergeConflict, FileStateStore, FindingsInjector, RunManifest, RuntimeProbeListSchema, STOP_AFTER_VALID_PHASES, STORY_KEY_PATTERN$1 as STORY_KEY_PATTERN, SUBSTRATE_OWNED_SETTINGS_KEYS, SupervisorLock, VALID_PHASES, WorkGraphRepository, ZERO_FINDINGS_BY_AUTHOR, ZERO_FINDING_COUNTS, ZERO_PROBE_AUTHOR_METRICS, __commonJS, __require, __toESM, aggregateProbeAuthorMetrics, applyConfigToGraph, buildPipelineStatusOutput, createDatabaseAdapter$1 as createDatabaseAdapter, createDefaultVerificationPipeline, createGraphOrchestrator, createSdlcCodeReviewHandler, createSdlcCreateStoryHandler, createSdlcDevStoryHandler, createSdlcPhaseHandler, createStateStore, detectCycles, detectsEventDrivenAC, detectsStateIntegratingAC, extractTargetFilesFromStoryContent, findPackageRoot, formatOutput, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, inspectProcessTree, isOrchestratorProcessLine, parseDbTimestampAsUtc, parseRuntimeProbes, registerHealthCommand, renderFindings, resolveBmadMethodSrcPath, resolveBmadMethodVersion, resolveGraphPath, resolveMainRepoRoot, resolveRunManifest, rollupFindingCounts, rollupFindingsByAuthor, rollupProbeAuthorMetrics, runHealthAction, validateStoryKey };
|
|
6878
|
-
//# sourceMappingURL=health-
|
|
6914
|
+
export { BMAD_BASELINE_TOKENS_FULL, DEFAULT_STALL_THRESHOLD_SECONDS, DoltMergeConflict, FileStateStore, FindingsInjector, RunManifest, RuntimeProbeListSchema, STOP_AFTER_VALID_PHASES, STORY_KEY_PATTERN$1 as STORY_KEY_PATTERN, SUBSTRATE_OWNED_SETTINGS_KEYS, SupervisorLock, VALID_PHASES, WorkGraphRepository, ZERO_FINDINGS_BY_AUTHOR, ZERO_FINDING_COUNTS, ZERO_PROBE_AUTHOR_METRICS, __commonJS, __require, __toESM, aggregateProbeAuthorMetrics, applyConfigToGraph, buildPipelineStatusOutput, createDatabaseAdapter$1 as createDatabaseAdapter, createDefaultVerificationPipeline, createGraphOrchestrator, createSdlcCodeReviewHandler, createSdlcCreateStoryHandler, createSdlcDevStoryHandler, createSdlcPhaseHandler, createStateStore, detectCycles, detectsEventDrivenAC, detectsStateIntegratingAC, extractTargetFilesFromStoryContent, findPackageRoot, formatOutput, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, inspectProcessTree, isOrchestratorProcessLine, parseDbTimestampAsUtc, parseRuntimeProbes, registerHealthCommand, renderFindings, resolveBmadMethodSrcPath, resolveBmadMethodVersion, resolveGraphPath, resolveMainRepoRoot, resolveRunManifest, rollupFindingCounts, rollupFindingsByAuthor, rollupProbeAuthorByClass, rollupProbeAuthorMetrics, runHealthAction, validateStoryKey };
|
|
6915
|
+
//# sourceMappingURL=health-CTXosAp0.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -903,10 +903,11 @@ interface AdapterOptions$1 {
|
|
|
903
903
|
*/
|
|
904
904
|
storyKey?: string;
|
|
905
905
|
/**
|
|
906
|
-
* Optional maximum context tokens
|
|
907
|
-
*
|
|
908
|
-
*
|
|
909
|
-
*
|
|
906
|
+
* Optional maximum context tokens. Historically passed as --max-context-tokens to
|
|
907
|
+
* Claude CLI; that flag was removed in Claude Code v2.x and is now silently ignored
|
|
908
|
+
* by the claude-adapter. The field remains on the options shape for backward compat
|
|
909
|
+
* with callers (Story 30-8 efficiency-gated retry logic) but no longer constrains
|
|
910
|
+
* dispatch behavior. --max-turns continues to bound dispatch length.
|
|
910
911
|
*/
|
|
911
912
|
maxContextTokens?: number;
|
|
912
913
|
/**
|
|
@@ -2126,13 +2127,19 @@ interface OrchestratorEvents {
|
|
|
2126
2127
|
*/
|
|
2127
2128
|
/** Probe-author dispatch completed for a story (success or skip-after-
|
|
2128
2129
|
* re-read). Existing event emitted by 60-13's runProbeAuthor; 60-15
|
|
2129
|
-
* formalizes the schema as part of the lifecycle event family.
|
|
2130
|
+
* formalizes the schema as part of the lifecycle event family.
|
|
2131
|
+
* Story 65-6: `triggered_by` discriminates event-driven vs. state-integrating
|
|
2132
|
+
* dispatch class. Absent on legacy events — consumers default to
|
|
2133
|
+
* `'event-driven'` per backward-compat rule. */
|
|
2130
2134
|
'probe-author:dispatched': {
|
|
2131
2135
|
storyKey: string;
|
|
2132
2136
|
runId: string;
|
|
2133
2137
|
probesAuthoredCount: number;
|
|
2134
2138
|
dispatchDurationMs: number;
|
|
2135
2139
|
costUsd: number;
|
|
2140
|
+
/** Story 65-6: trigger-class discriminator. Absent on pre-Phase-3 events;
|
|
2141
|
+
* consumers MUST default to `'event-driven'` when absent. */
|
|
2142
|
+
triggered_by?: string;
|
|
2136
2143
|
};
|
|
2137
2144
|
/** Probe-author agent's YAML output successfully parsed. Counts probes
|
|
2138
2145
|
* authored before any append/idempotency check. */
|
|
@@ -2554,10 +2561,11 @@ interface AdapterOptions {
|
|
|
2554
2561
|
*/
|
|
2555
2562
|
storyKey?: string;
|
|
2556
2563
|
/**
|
|
2557
|
-
* Optional maximum context tokens
|
|
2558
|
-
*
|
|
2559
|
-
*
|
|
2560
|
-
*
|
|
2564
|
+
* Optional maximum context tokens. Historically passed as --max-context-tokens to
|
|
2565
|
+
* Claude CLI; that flag was removed in Claude Code v2.x and is now silently ignored
|
|
2566
|
+
* by the claude-adapter. The field remains on the options shape for backward compat
|
|
2567
|
+
* with callers (Story 30-8 efficiency-gated retry logic) but no longer constrains
|
|
2568
|
+
* dispatch behavior. --max-turns continues to bound dispatch length.
|
|
2561
2569
|
*/
|
|
2562
2570
|
maxContextTokens?: number;
|
|
2563
2571
|
/**
|
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-ARkfvp4m.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-DJdIXYoN.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-ARkfvp4m.js";
|
|
2
2
|
import "./routing-CcBOCuC9.js";
|
|
3
3
|
|
|
4
4
|
export { loadModelRoutingConfig };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "./health-
|
|
1
|
+
import "./health-CTXosAp0.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-
|
|
4
|
+
import "./dist-ARkfvp4m.js";
|
|
5
|
+
import { normalizeGraphSummaryToStatus, registerRunCommand, resolveMaxReviewCycles, resolveProbeAuthorStateIntegrating, runRunAction, wireNdjsonEmitter } from "./run-XCd2tF_T.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, FindingsInjector, RunManifest, RuntimeProbeListSchema, STOP_AFTER_VALID_PHASES, STORY_KEY_PATTERN, VALID_PHASES, WorkGraphRepository, __commonJS, __require, __toESM, applyConfigToGraph, buildPipelineStatusOutput, createDatabaseAdapter, createDefaultVerificationPipeline, createGraphOrchestrator, createSdlcCodeReviewHandler, createSdlcCreateStoryHandler, createSdlcDevStoryHandler, createSdlcPhaseHandler, detectCycles, detectsEventDrivenAC, detectsStateIntegratingAC, extractTargetFilesFromStoryContent, formatOutput, formatPipelineSummary, formatTokenTelemetry, inspectProcessTree, parseDbTimestampAsUtc, renderFindings, resolveGraphPath, resolveMainRepoRoot, validateStoryKey } from "./health-
|
|
1
|
+
import { BMAD_BASELINE_TOKENS_FULL, DoltMergeConflict, FileStateStore, FindingsInjector, RunManifest, RuntimeProbeListSchema, STOP_AFTER_VALID_PHASES, STORY_KEY_PATTERN, VALID_PHASES, WorkGraphRepository, __commonJS, __require, __toESM, applyConfigToGraph, buildPipelineStatusOutput, createDatabaseAdapter, createDefaultVerificationPipeline, createGraphOrchestrator, createSdlcCodeReviewHandler, createSdlcCreateStoryHandler, createSdlcDevStoryHandler, createSdlcPhaseHandler, detectCycles, detectsEventDrivenAC, detectsStateIntegratingAC, extractTargetFilesFromStoryContent, formatOutput, formatPipelineSummary, formatTokenTelemetry, inspectProcessTree, parseDbTimestampAsUtc, renderFindings, resolveGraphPath, resolveMainRepoRoot, validateStoryKey } from "./health-CTXosAp0.js";
|
|
2
2
|
import { createLogger } from "./logger-KeHncl-f.js";
|
|
3
3
|
import { TypedEventBusImpl, createEventBus, createTuiApp, isTuiCapable, printNonTtyWarning, sleep } from "./helpers-CElYrONe.js";
|
|
4
|
-
import { ADVISORY_NOTES, Categorizer, ConsumerAnalyzer, DEFAULT_GLOBAL_SETTINGS, DispatcherImpl, DoltClient, ESCALATION_DIAGNOSIS, EXPERIMENT_RESULT, EfficiencyScorer, IngestionServer, LogTurnAnalyzer, OPERATIONAL_FINDING, Recommender, RoutingRecommender, RoutingResolver, RoutingTelemetry, RoutingTokenAccumulator, RoutingTuner, STORY_METRICS, STORY_OUTCOME, SubstrateConfigSchema, TEST_EXPANSION_FINDING, TEST_PLAN, TelemetryNormalizer, TelemetryPipeline, TurnAnalyzer, addTokenUsage, aggregateTokenUsageForRun, aggregateTokenUsageForStory, callLLM, createConfigSystem, createDatabaseAdapter$1, createDecision, createPipelineRun, createRequirement, detectInterfaceChanges, getArtifactByTypeForRun, getArtifactsByRun, getDecisionsByCategory, getDecisionsByPhase, getDecisionsByPhaseForRun, getLatestRun, getPipelineRunById, getRunMetrics, getRunningPipelineRuns, getStoryMetricsForRun, getTokenUsageSummary, initSchema, listRequirements, loadModelRoutingConfig, registerArtifact, updatePipelineRun, updatePipelineRunConfig, upsertDecision, writeRunMetrics, writeStoryMetrics } from "./dist-
|
|
4
|
+
import { ADVISORY_NOTES, Categorizer, ConsumerAnalyzer, DEFAULT_GLOBAL_SETTINGS, DispatcherImpl, DoltClient, ESCALATION_DIAGNOSIS, EXPERIMENT_RESULT, EfficiencyScorer, IngestionServer, LogTurnAnalyzer, OPERATIONAL_FINDING, Recommender, RoutingRecommender, RoutingResolver, RoutingTelemetry, RoutingTokenAccumulator, RoutingTuner, STORY_METRICS, STORY_OUTCOME, SubstrateConfigSchema, TEST_EXPANSION_FINDING, TEST_PLAN, TelemetryNormalizer, TelemetryPipeline, TurnAnalyzer, addTokenUsage, aggregateTokenUsageForRun, aggregateTokenUsageForStory, callLLM, createConfigSystem, createDatabaseAdapter$1, createDecision, createPipelineRun, createRequirement, detectInterfaceChanges, getArtifactByTypeForRun, getArtifactsByRun, getDecisionsByCategory, getDecisionsByPhase, getDecisionsByPhaseForRun, getLatestRun, getPipelineRunById, getRunMetrics, getRunningPipelineRuns, getStoryMetricsForRun, getTokenUsageSummary, initSchema, listRequirements, loadModelRoutingConfig, registerArtifact, updatePipelineRun, updatePipelineRunConfig, upsertDecision, writeRunMetrics, writeStoryMetrics } from "./dist-ARkfvp4m.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";
|
|
@@ -8448,7 +8448,7 @@ const TIMEOUT_RETRY_MULTIPLIER = 1.5;
|
|
|
8448
8448
|
*/
|
|
8449
8449
|
async function runProbeAuthor(deps, params) {
|
|
8450
8450
|
const start = Date.now();
|
|
8451
|
-
const { storyKey, storyFilePath, pipelineRunId, sourceAcContent, epicContent, emitEvent, bypassGates, stateIntegratingEnabled } = params;
|
|
8451
|
+
const { storyKey, storyFilePath, pipelineRunId, sourceAcContent, epicContent, emitEvent, bypassGates, stateIntegratingEnabled, triggerClass } = params;
|
|
8452
8452
|
const tokenUsage = {
|
|
8453
8453
|
input: 0,
|
|
8454
8454
|
output: 0
|
|
@@ -8661,7 +8661,8 @@ async function runProbeAuthor(deps, params) {
|
|
|
8661
8661
|
runId: pipelineRunId,
|
|
8662
8662
|
probesAuthoredCount: 0,
|
|
8663
8663
|
dispatchDurationMs: dispatchDurationMs$1,
|
|
8664
|
-
costUsd: estimateDispatchCost$1(tokenUsage.input, tokenUsage.output)
|
|
8664
|
+
costUsd: estimateDispatchCost$1(tokenUsage.input, tokenUsage.output),
|
|
8665
|
+
triggered_by: triggerClass ?? "event-driven"
|
|
8665
8666
|
});
|
|
8666
8667
|
return makeSkippedResult(tokenUsage, start);
|
|
8667
8668
|
}
|
|
@@ -8703,7 +8704,8 @@ async function runProbeAuthor(deps, params) {
|
|
|
8703
8704
|
runId: pipelineRunId,
|
|
8704
8705
|
probesAuthoredCount: probes.length,
|
|
8705
8706
|
dispatchDurationMs,
|
|
8706
|
-
costUsd
|
|
8707
|
+
costUsd,
|
|
8708
|
+
triggered_by: triggerClass ?? "event-driven"
|
|
8707
8709
|
});
|
|
8708
8710
|
logger$14.info({
|
|
8709
8711
|
storyKey,
|
|
@@ -13469,7 +13471,14 @@ function createImplementationOrchestrator(deps) {
|
|
|
13469
13471
|
probeAuthorEpicContent = section ?? epicFull;
|
|
13470
13472
|
} catch {}
|
|
13471
13473
|
const stateIntegratingEnabled = config.probeAuthorStateIntegrating !== false;
|
|
13472
|
-
|
|
13474
|
+
const isEventDriven = detectsEventDrivenAC(probeAuthorEpicContent);
|
|
13475
|
+
const isStateIntegrating = stateIntegratingEnabled && detectsStateIntegratingAC(probeAuthorEpicContent);
|
|
13476
|
+
if (isEventDriven || isStateIntegrating) {
|
|
13477
|
+
const triggerClass = isEventDriven && isStateIntegrating ? "both" : isStateIntegrating ? "state-integrating" : "event-driven";
|
|
13478
|
+
if (runManifest !== null && runManifest !== void 0) runManifest.patchStoryState(storyKey, { probe_author_triggered_by: triggerClass }).catch((err) => logger$26.warn({
|
|
13479
|
+
err,
|
|
13480
|
+
storyKey
|
|
13481
|
+
}, "patchStoryState(probe_author_triggered_by) failed — pipeline continues"));
|
|
13473
13482
|
let artifactHasProbes = false;
|
|
13474
13483
|
try {
|
|
13475
13484
|
const artifactContent = readFileSync(storyFilePath, "utf-8");
|
|
@@ -13492,6 +13501,7 @@ function createImplementationOrchestrator(deps) {
|
|
|
13492
13501
|
sourceAcContent: probeAuthorEpicContent,
|
|
13493
13502
|
epicContent: probeAuthorEpicContent,
|
|
13494
13503
|
stateIntegratingEnabled,
|
|
13504
|
+
triggerClass,
|
|
13495
13505
|
emitEvent: (name, payload) => {
|
|
13496
13506
|
eventBus.emit("orchestrator:story-warn", {
|
|
13497
13507
|
storyKey,
|
|
@@ -45420,4 +45430,4 @@ function registerRunCommand(program, _version = "0.0.0", projectRoot = process.c
|
|
|
45420
45430
|
|
|
45421
45431
|
//#endregion
|
|
45422
45432
|
export { AdapterTelemetryPersistence, AppError, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, EpicIngester, GitClient, GrammarLoader, RepoMapInjector, RepoMapModule, RepoMapQueryEngine, RepoMapStorage, SymbolParser, createContextCompiler, createDispatcher, createEventEmitter, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStopAfterGate, createTelemetryAdvisor, formatPhaseCompletionSummary, getFactoryRunSummaries, getScenarioResultsForRun, getTwinRunsForRun, listGraphRuns, normalizeGraphSummaryToStatus, registerExportCommand, registerFactoryCommand, registerRunCommand, registerScenariosCommand, resolveMaxReviewCycles, resolveProbeAuthorStateIntegrating, resolveStoryKeys, runAnalysisPhase, runPlanningPhase, runProbeAuthor, runRunAction, runSolutioningPhase, validateStopAfterFromConflict, wireNdjsonEmitter };
|
|
45423
|
-
//# sourceMappingURL=run-
|
|
45433
|
+
//# sourceMappingURL=run-XCd2tF_T.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./dist-
|
|
1
|
+
import "./dist-ARkfvp4m.js";
|
|
2
2
|
import "./version-manager-impl-BmOWu8ml.js";
|
|
3
|
-
import { isGlobalInstall, registerUpgradeCommand, runUpgradeCommand } from "./upgrade-
|
|
3
|
+
import { isGlobalInstall, registerUpgradeCommand, runUpgradeCommand } from "./upgrade-CqKuWLIO.js";
|
|
4
4
|
|
|
5
5
|
export { isGlobalInstall, registerUpgradeCommand, runUpgradeCommand };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createVersionManager } from "./dist-
|
|
1
|
+
import { createVersionManager } from "./dist-ARkfvp4m.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-CqKuWLIO.js.map
|
package/package.json
CHANGED