substrate-ai 0.16.1 → 0.16.2
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
|
@@ -4,7 +4,7 @@ import { createLogger } from "../logger-KeHncl-f.js";
|
|
|
4
4
|
import { createEventBus } from "../helpers-CElYrONe.js";
|
|
5
5
|
import { AdapterRegistry, BudgetConfigSchema, CURRENT_CONFIG_FORMAT_VERSION, CURRENT_TASK_GRAPH_VERSION, ConfigError, CostTrackerConfigSchema, DEFAULT_CONFIG, DoltClient, DoltNotInstalled, EXPERIMENT_RESULT, GlobalSettingsSchema, IngestionServer, MonitorDatabaseImpl, OPERATIONAL_FINDING, PartialGlobalSettingsSchema, PartialProviderConfigSchema, ProvidersSchema, RoutingRecommender, STORY_METRICS, TelemetryConfigSchema, addTokenUsage, aggregateTokenUsageForRun, checkDoltInstalled, compareRunMetrics, createAmendmentRun, createConfigSystem, createDecision, createDoltClient, createPipelineRun, getActiveDecisions, getAllCostEntriesFiltered, getBaselineRunMetrics, getDecisionsByCategory, getDecisionsByPhaseForRun, getLatestCompletedRun, getLatestRun, getPipelineRunById, getPlanningCostTotal, getRetryableEscalations, getRunMetrics, getSessionCostSummary, getSessionCostSummaryFiltered, getStoryMetricsForRun, getTokenUsageSummary, incrementRunRestarts, initSchema, initializeDolt, listRequirements, listRunMetrics, loadParentRunDecisions, supersedeDecision, tagRunAsBaseline, updatePipelineRun } from "../dist-CLvAwmT7.js";
|
|
6
6
|
import "../adapter-registry-DXLMTmfD.js";
|
|
7
|
-
import { AdapterTelemetryPersistence, AppError, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, GitClient, GrammarLoader, RepoMapInjector, RepoMapModule, RepoMapQueryEngine, RepoMapStorage, SymbolParser, createContextCompiler, createDispatcher, createEventEmitter, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStopAfterGate, createTelemetryAdvisor, formatPhaseCompletionSummary, getFactoryRunSummaries, getScenarioResultsForRun, getTwinRunsForRun, listGraphRuns, registerFactoryCommand, registerRunCommand, registerScenariosCommand, resolveStoryKeys, runAnalysisPhase, runPlanningPhase, runSolutioningPhase, validateStopAfterFromConflict } from "../run-
|
|
7
|
+
import { AdapterTelemetryPersistence, AppError, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, GitClient, GrammarLoader, RepoMapInjector, RepoMapModule, RepoMapQueryEngine, RepoMapStorage, SymbolParser, createContextCompiler, createDispatcher, createEventEmitter, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStopAfterGate, createTelemetryAdvisor, formatPhaseCompletionSummary, getFactoryRunSummaries, getScenarioResultsForRun, getTwinRunsForRun, listGraphRuns, registerFactoryCommand, registerRunCommand, registerScenariosCommand, resolveStoryKeys, runAnalysisPhase, runPlanningPhase, runSolutioningPhase, validateStopAfterFromConflict } from "../run-kMR_WxuS.js";
|
|
8
8
|
import "../errors-D1LU8CZ9.js";
|
|
9
9
|
import "../routing-CcBOCuC9.js";
|
|
10
10
|
import "../decisions-C0pz9Clx.js";
|
|
@@ -4359,7 +4359,7 @@ async function runSupervisorAction(options, deps = {}) {
|
|
|
4359
4359
|
await initSchema(expAdapter);
|
|
4360
4360
|
const { runRunAction: runPipeline } = await import(
|
|
4361
4361
|
/* @vite-ignore */
|
|
4362
|
-
"../run-
|
|
4362
|
+
"../run-iWTnlU1d.js"
|
|
4363
4363
|
);
|
|
4364
4364
|
const runStoryFn = async (opts) => {
|
|
4365
4365
|
const exitCode = await runPipeline({
|
|
@@ -8647,6 +8647,15 @@ function registerEpicStatusCommand(program) {
|
|
|
8647
8647
|
});
|
|
8648
8648
|
}
|
|
8649
8649
|
|
|
8650
|
+
//#endregion
|
|
8651
|
+
//#region src/cli/commands/factory.ts
|
|
8652
|
+
function registerFactoryCommand$1(program) {
|
|
8653
|
+
registerFactoryCommand(program, { createAdapter: (basePath) => createDatabaseAdapter({
|
|
8654
|
+
backend: "auto",
|
|
8655
|
+
basePath
|
|
8656
|
+
}) });
|
|
8657
|
+
}
|
|
8658
|
+
|
|
8650
8659
|
//#endregion
|
|
8651
8660
|
//#region src/cli/index.ts
|
|
8652
8661
|
process.setMaxListeners(20);
|
|
@@ -8710,7 +8719,7 @@ async function createProgram() {
|
|
|
8710
8719
|
registerIngestEpicCommand(program);
|
|
8711
8720
|
registerEpicStatusCommand(program);
|
|
8712
8721
|
registerScenariosCommand(program);
|
|
8713
|
-
registerFactoryCommand(program);
|
|
8722
|
+
registerFactoryCommand$1(program);
|
|
8714
8723
|
registerUpgradeCommand(program);
|
|
8715
8724
|
return program;
|
|
8716
8725
|
}
|
|
@@ -2,7 +2,7 @@ import "./health-DswaC1q5.js";
|
|
|
2
2
|
import "./logger-KeHncl-f.js";
|
|
3
3
|
import "./helpers-CElYrONe.js";
|
|
4
4
|
import "./dist-CLvAwmT7.js";
|
|
5
|
-
import { normalizeGraphSummaryToStatus, registerRunCommand, runRunAction } from "./run-
|
|
5
|
+
import { normalizeGraphSummaryToStatus, registerRunCommand, runRunAction } from "./run-kMR_WxuS.js";
|
|
6
6
|
import "./routing-CcBOCuC9.js";
|
|
7
7
|
import "./decisions-C0pz9Clx.js";
|
|
8
8
|
|
|
@@ -16648,6 +16648,22 @@ function createSdlcPhaseHandler(deps) {
|
|
|
16648
16648
|
};
|
|
16649
16649
|
const runId = context.getString("runId");
|
|
16650
16650
|
const concept = phaseName === "analysis" ? context.getString("concept", "") : "";
|
|
16651
|
+
const PHASE_ARTIFACT_TYPES = {
|
|
16652
|
+
analysis: "product-brief",
|
|
16653
|
+
planning: "prd",
|
|
16654
|
+
solutioning: "stories"
|
|
16655
|
+
};
|
|
16656
|
+
const artifactType = PHASE_ARTIFACT_TYPES[phaseName];
|
|
16657
|
+
if (artifactType !== void 0) try {
|
|
16658
|
+
const db = deps.phaseDeps.db;
|
|
16659
|
+
if (db) {
|
|
16660
|
+
const rows = await db.query("SELECT id FROM artifacts WHERE phase = ? AND type = ? LIMIT 1", [phaseName, artifactType]);
|
|
16661
|
+
if (Array.isArray(rows) && rows.length > 0) return {
|
|
16662
|
+
status: "SUCCESS",
|
|
16663
|
+
notes: `Phase ${phaseName} already complete — artifact '${artifactType}' exists, skipping dispatch`
|
|
16664
|
+
};
|
|
16665
|
+
}
|
|
16666
|
+
} catch {}
|
|
16651
16667
|
const params = phaseName === "analysis" ? {
|
|
16652
16668
|
runId,
|
|
16653
16669
|
concept
|
|
@@ -29222,7 +29238,7 @@ const TOTAL_RULE_COUNT = 13;
|
|
|
29222
29238
|
* Story 44-9: registers the `run` subcommand.
|
|
29223
29239
|
* Story 46-7: registers the `validate` subcommand.
|
|
29224
29240
|
*/
|
|
29225
|
-
function registerFactoryCommand(program) {
|
|
29241
|
+
function registerFactoryCommand(program, options) {
|
|
29226
29242
|
const factoryCmd = program.command("factory").description("Factory pipeline and scenario management commands");
|
|
29227
29243
|
registerScenariosCommand(factoryCmd);
|
|
29228
29244
|
factoryCmd.command("run").description("Execute a DOT graph pipeline").option("--graph <path>", "Path to DOT graph file").option("--config <path>", "Path to config.yaml (default: auto-detect)").option("--events", "Emit NDJSON events to stdout").action(async (opts) => {
|
|
@@ -29265,7 +29281,7 @@ function registerFactoryCommand(program) {
|
|
|
29265
29281
|
await stateManager.initRun(dotSource);
|
|
29266
29282
|
/** wallClockCapMs: FactoryConfig.wall_clock_cap_seconds × 1000 (story 45-10) */
|
|
29267
29283
|
const factoryConfig = await loadFactoryConfig(projectDir, opts.config);
|
|
29268
|
-
const adapter = createDatabaseAdapter$1({
|
|
29284
|
+
const adapter = options?.createAdapter ? options.createAdapter(projectDir) : createDatabaseAdapter$1({
|
|
29269
29285
|
backend: "auto",
|
|
29270
29286
|
basePath: projectDir
|
|
29271
29287
|
});
|
|
@@ -30967,4 +30983,4 @@ function registerRunCommand(program, _version = "0.0.0", projectRoot = process.c
|
|
|
30967
30983
|
|
|
30968
30984
|
//#endregion
|
|
30969
30985
|
export { AdapterTelemetryPersistence, AppError, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, GitClient, GrammarLoader, RepoMapInjector, RepoMapModule, RepoMapQueryEngine, RepoMapStorage, SymbolParser, createContextCompiler, createDispatcher, createEventEmitter, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStopAfterGate, createTelemetryAdvisor, formatPhaseCompletionSummary, getFactoryRunSummaries, getScenarioResultsForRun, getTwinRunsForRun, listGraphRuns, normalizeGraphSummaryToStatus, registerFactoryCommand, registerRunCommand, registerScenariosCommand, resolveStoryKeys, runAnalysisPhase, runPlanningPhase, runRunAction, runSolutioningPhase, validateStopAfterFromConflict };
|
|
30970
|
-
//# sourceMappingURL=run-
|
|
30986
|
+
//# sourceMappingURL=run-kMR_WxuS.js.map
|