substrate-ai 0.4.8 → 0.4.9
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/cli/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { AppError, DEFAULT_CONFIG, DEFAULT_ROUTING_POLICY, DatabaseWrapper, DoltClient, DoltNotInstalled, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, FileStateStore, GitClient, GrammarLoader, IngestionServer, RepoMapInjector, RepoMapModule, RepoMapQueryEngine, RepoMapStorage, SUBSTRATE_OWNED_SETTINGS_KEYS, SymbolParser, TelemetryPersistence, VALID_PHASES, buildPipelineStatusOutput, checkDoltInstalled, createConfigSystem, createContextCompiler, createDispatcher, createDoltClient, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStateStore, createStopAfterGate, findPackageRoot, formatOutput, formatPhaseCompletionSummary, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, initializeDolt, parseDbTimestampAsUtc, registerHealthCommand, registerRunCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion, resolveMainRepoRoot, resolveStoryKeys, runAnalysisPhase, runMigrations, runPlanningPhase, runSolutioningPhase, validateStopAfterFromConflict } from "../run-
|
|
2
|
+
import { AppError, DEFAULT_CONFIG, DEFAULT_ROUTING_POLICY, DatabaseWrapper, DoltClient, DoltNotInstalled, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, FileStateStore, GitClient, GrammarLoader, IngestionServer, RepoMapInjector, RepoMapModule, RepoMapQueryEngine, RepoMapStorage, SUBSTRATE_OWNED_SETTINGS_KEYS, SymbolParser, TelemetryPersistence, VALID_PHASES, buildPipelineStatusOutput, checkDoltInstalled, createConfigSystem, createContextCompiler, createDispatcher, createDoltClient, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStateStore, createStopAfterGate, findPackageRoot, formatOutput, formatPhaseCompletionSummary, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, initializeDolt, parseDbTimestampAsUtc, registerHealthCommand, registerRunCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion, resolveMainRepoRoot, resolveStoryKeys, runAnalysisPhase, runMigrations, runPlanningPhase, runSolutioningPhase, validateStopAfterFromConflict } from "../run-Dx7bxebF.js";
|
|
3
3
|
import { createLogger } from "../logger-D2fS2ccL.js";
|
|
4
4
|
import { AdapterRegistry } from "../adapter-registry-Cd-7lG5v.js";
|
|
5
5
|
import { CURRENT_CONFIG_FORMAT_VERSION, CURRENT_TASK_GRAPH_VERSION, PartialSubstrateConfigSchema } from "../config-migrator-DtZW1maj.js";
|
|
@@ -2709,7 +2709,7 @@ async function runSupervisorAction(options, deps = {}) {
|
|
|
2709
2709
|
const expDb = expDbWrapper.db;
|
|
2710
2710
|
const { runRunAction: runPipeline } = await import(
|
|
2711
2711
|
/* @vite-ignore */
|
|
2712
|
-
"../run-
|
|
2712
|
+
"../run-c8_Yj6xH.js"
|
|
2713
2713
|
);
|
|
2714
2714
|
const runStoryFn = async (opts) => {
|
|
2715
2715
|
const exitCode = await runPipeline({
|
package/dist/index.d.ts
CHANGED
|
@@ -551,6 +551,24 @@ interface PipelineContractVerificationSummaryEvent {
|
|
|
551
551
|
/** 'pass' if zero mismatches, 'fail' otherwise */
|
|
552
552
|
verdict: 'pass' | 'fail';
|
|
553
553
|
}
|
|
554
|
+
/**
|
|
555
|
+
* Emitted when the RoutingResolver selects a model for a dispatch.
|
|
556
|
+
*/
|
|
557
|
+
interface RoutingModelSelectedEvent {
|
|
558
|
+
type: 'routing:model-selected';
|
|
559
|
+
/** ISO-8601 timestamp generated at emit time */
|
|
560
|
+
ts: string;
|
|
561
|
+
/** Unique dispatch ID */
|
|
562
|
+
dispatch_id: string;
|
|
563
|
+
/** Task type (e.g. 'dev-story', 'test-plan', 'code-review') */
|
|
564
|
+
task_type: string;
|
|
565
|
+
/** Routing phase that matched (e.g. 'generate', 'explore', 'review') */
|
|
566
|
+
phase: string;
|
|
567
|
+
/** Selected model ID */
|
|
568
|
+
model: string;
|
|
569
|
+
/** How the model was selected: 'phase', 'baseline', 'override' */
|
|
570
|
+
source: string;
|
|
571
|
+
}
|
|
554
572
|
/**
|
|
555
573
|
* Discriminated union of all pipeline event types.
|
|
556
574
|
*
|
|
@@ -563,7 +581,7 @@ interface PipelineContractVerificationSummaryEvent {
|
|
|
563
581
|
* }
|
|
564
582
|
* ```
|
|
565
583
|
*/
|
|
566
|
-
type PipelineEvent = PipelineStartEvent | PipelineCompleteEvent | PipelinePreFlightFailureEvent | PipelineContractMismatchEvent | PipelineContractVerificationSummaryEvent | StoryPhaseEvent | StoryDoneEvent | StoryEscalationEvent | StoryWarnEvent | StoryLogEvent | PipelineHeartbeatEvent | StoryStallEvent | StoryZeroDiffEscalationEvent | StoryBuildVerificationFailedEvent | StoryBuildVerificationPassedEvent | StoryInterfaceChangeWarningEvent | StoryMetricsEvent | SupervisorPollEvent | SupervisorKillEvent | SupervisorRestartEvent | SupervisorAbortEvent | SupervisorSummaryEvent | SupervisorAnalysisCompleteEvent | SupervisorAnalysisErrorEvent | SupervisorExperimentStartEvent | SupervisorExperimentSkipEvent | SupervisorExperimentRecommendationsEvent | SupervisorExperimentCompleteEvent | SupervisorExperimentErrorEvent; //#endregion
|
|
584
|
+
type PipelineEvent = PipelineStartEvent | PipelineCompleteEvent | PipelinePreFlightFailureEvent | PipelineContractMismatchEvent | PipelineContractVerificationSummaryEvent | StoryPhaseEvent | StoryDoneEvent | StoryEscalationEvent | StoryWarnEvent | StoryLogEvent | PipelineHeartbeatEvent | StoryStallEvent | StoryZeroDiffEscalationEvent | StoryBuildVerificationFailedEvent | StoryBuildVerificationPassedEvent | StoryInterfaceChangeWarningEvent | StoryMetricsEvent | SupervisorPollEvent | SupervisorKillEvent | SupervisorRestartEvent | SupervisorAbortEvent | SupervisorSummaryEvent | SupervisorAnalysisCompleteEvent | SupervisorAnalysisErrorEvent | SupervisorExperimentStartEvent | SupervisorExperimentSkipEvent | SupervisorExperimentRecommendationsEvent | SupervisorExperimentCompleteEvent | SupervisorExperimentErrorEvent | RoutingModelSelectedEvent; //#endregion
|
|
567
585
|
//#region src/core/errors.d.ts
|
|
568
586
|
|
|
569
587
|
/**
|
|
@@ -2810,6 +2810,43 @@ const PIPELINE_EVENT_METADATA = [
|
|
|
2810
2810
|
}
|
|
2811
2811
|
]
|
|
2812
2812
|
},
|
|
2813
|
+
{
|
|
2814
|
+
type: "routing:model-selected",
|
|
2815
|
+
description: "Model routing resolver selected a model for a dispatch.",
|
|
2816
|
+
when: "When a story dispatch uses model routing and the resolver returns a non-null model.",
|
|
2817
|
+
fields: [
|
|
2818
|
+
{
|
|
2819
|
+
name: "ts",
|
|
2820
|
+
type: "string",
|
|
2821
|
+
description: "Timestamp."
|
|
2822
|
+
},
|
|
2823
|
+
{
|
|
2824
|
+
name: "dispatch_id",
|
|
2825
|
+
type: "string",
|
|
2826
|
+
description: "Unique dispatch ID."
|
|
2827
|
+
},
|
|
2828
|
+
{
|
|
2829
|
+
name: "task_type",
|
|
2830
|
+
type: "string",
|
|
2831
|
+
description: "Task type (dev-story, test-plan, code-review)."
|
|
2832
|
+
},
|
|
2833
|
+
{
|
|
2834
|
+
name: "phase",
|
|
2835
|
+
type: "string",
|
|
2836
|
+
description: "Routing phase that matched (generate, explore, review)."
|
|
2837
|
+
},
|
|
2838
|
+
{
|
|
2839
|
+
name: "model",
|
|
2840
|
+
type: "string",
|
|
2841
|
+
description: "Selected model ID."
|
|
2842
|
+
},
|
|
2843
|
+
{
|
|
2844
|
+
name: "source",
|
|
2845
|
+
type: "string",
|
|
2846
|
+
description: "How selected: phase, baseline, or override."
|
|
2847
|
+
}
|
|
2848
|
+
]
|
|
2849
|
+
},
|
|
2813
2850
|
{
|
|
2814
2851
|
type: "pipeline:pre-flight-failure",
|
|
2815
2852
|
description: "Pre-flight build check failed before any story was dispatched. Pipeline aborts immediately.",
|
|
@@ -3273,6 +3310,9 @@ Patterns for \`substrate supervisor --output-format json\` events:
|
|
|
3273
3310
|
|
|
3274
3311
|
### On \`supervisor:experiment:error\`
|
|
3275
3312
|
- Report error. Suggest running without \`--experiment\` for a clean run.
|
|
3313
|
+
|
|
3314
|
+
### On \`routing:model-selected\`
|
|
3315
|
+
- Informational. Log which model was selected for the dispatch and why (phase config, baseline, or override).
|
|
3276
3316
|
`;
|
|
3277
3317
|
}
|
|
3278
3318
|
/**
|
|
@@ -21548,4 +21588,4 @@ function registerRunCommand(program, _version = "0.0.0", projectRoot = process.c
|
|
|
21548
21588
|
|
|
21549
21589
|
//#endregion
|
|
21550
21590
|
export { AppError, DEFAULT_CONFIG, DEFAULT_ROUTING_POLICY, DatabaseWrapper, DoltClient, DoltNotInstalled, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, FileStateStore, GitClient, GrammarLoader, IngestionServer, RepoMapInjector, RepoMapModule, RepoMapQueryEngine, RepoMapStorage, SUBSTRATE_OWNED_SETTINGS_KEYS, SymbolParser, TelemetryPersistence, VALID_PHASES, buildPipelineStatusOutput, checkDoltInstalled, createConfigSystem, createContextCompiler, createDispatcher, createDoltClient, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStateStore, createStopAfterGate, findPackageRoot, formatOutput, formatPhaseCompletionSummary, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, initializeDolt, parseDbTimestampAsUtc, registerHealthCommand, registerRunCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion, resolveMainRepoRoot, resolveStoryKeys, runAnalysisPhase, runMigrations, runPlanningPhase, runRunAction, runSolutioningPhase, validateStopAfterFromConflict };
|
|
21551
|
-
//# sourceMappingURL=run-
|
|
21591
|
+
//# sourceMappingURL=run-Dx7bxebF.js.map
|