substrate-ai 0.7.1 → 0.8.0
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 +21 -8
- package/dist/{health-Dnx-FGva.js → health-C-VRJruD.js} +502 -23
- package/dist/{health-4fyhDU6T.js → health-DMbNP9bw.js} +1 -1
- package/dist/index.d.ts +24 -0
- package/dist/{run-CZokQlIi.js → run-B40PykZL.js} +2 -2
- package/dist/{run-BW8_vcTi.js → run-ohzPz3r1.js} +467 -185
- package/package.json +1 -2
package/dist/cli/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { DoltClient, DoltNotInstalled, FileStateStore, SUBSTRATE_OWNED_SETTINGS_KEYS, VALID_PHASES, WorkGraphRepository, buildPipelineStatusOutput, checkDoltInstalled, createDatabaseAdapter, createDoltClient, createStateStore, detectCycles, findPackageRoot, formatOutput, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, initSchema, initializeDolt, isSyncAdapter, parseDbTimestampAsUtc, registerHealthCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion, resolveMainRepoRoot } from "../health-
|
|
2
|
+
import { DoltClient, DoltNotInstalled, FileStateStore, SUBSTRATE_OWNED_SETTINGS_KEYS, VALID_PHASES, WorkGraphRepository, buildPipelineStatusOutput, checkDoltInstalled, createDatabaseAdapter, createDoltClient, createStateStore, detectCycles, findPackageRoot, formatOutput, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, initSchema, initializeDolt, isSyncAdapter, parseDbTimestampAsUtc, registerHealthCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion, resolveMainRepoRoot } from "../health-C-VRJruD.js";
|
|
3
3
|
import { createLogger } from "../logger-D2fS2ccL.js";
|
|
4
4
|
import { AdapterRegistry } from "../adapter-registry-D2zdMwVu.js";
|
|
5
|
-
import { AdapterTelemetryPersistence, AppError, DEFAULT_CONFIG, DEFAULT_ROUTING_POLICY, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, GitClient, GrammarLoader, IngestionServer, RepoMapInjector, RepoMapModule, RepoMapQueryEngine, RepoMapStorage, SymbolParser, createConfigSystem, createContextCompiler, createDispatcher, createEventEmitter, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStopAfterGate, createTelemetryAdvisor, formatPhaseCompletionSummary, registerRunCommand, resolveStoryKeys, runAnalysisPhase, runPlanningPhase, runSolutioningPhase, validateStopAfterFromConflict } from "../run-
|
|
5
|
+
import { AdapterTelemetryPersistence, AppError, DEFAULT_CONFIG, DEFAULT_ROUTING_POLICY, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, GitClient, GrammarLoader, IngestionServer, RepoMapInjector, RepoMapModule, RepoMapQueryEngine, RepoMapStorage, SymbolParser, createConfigSystem, createContextCompiler, createDispatcher, createEventEmitter, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStopAfterGate, createTelemetryAdvisor, formatPhaseCompletionSummary, registerRunCommand, resolveStoryKeys, runAnalysisPhase, runPlanningPhase, runSolutioningPhase, validateStopAfterFromConflict } from "../run-ohzPz3r1.js";
|
|
6
6
|
import { CURRENT_CONFIG_FORMAT_VERSION, CURRENT_TASK_GRAPH_VERSION, PartialSubstrateConfigSchema } from "../config-migrator-CtGelIsG.js";
|
|
7
7
|
import { ConfigError, createEventBus } from "../helpers-CpMs8VZX.js";
|
|
8
8
|
import { RoutingRecommender } from "../routing-BVrxrM6v.js";
|
|
@@ -2074,9 +2074,19 @@ async function runStatusAction(options) {
|
|
|
2074
2074
|
}
|
|
2075
2075
|
let run;
|
|
2076
2076
|
if (runId !== void 0 && runId !== "") run = await getPipelineRunById(adapter, runId);
|
|
2077
|
-
else
|
|
2077
|
+
else {
|
|
2078
|
+
let currentRunId;
|
|
2079
|
+
try {
|
|
2080
|
+
const currentRunIdPath = join(dbRoot, ".substrate", "current-run-id");
|
|
2081
|
+
const content = readFileSync(currentRunIdPath, "utf-8").trim();
|
|
2082
|
+
const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
2083
|
+
if (UUID_RE.test(content)) currentRunId = content;
|
|
2084
|
+
} catch {}
|
|
2085
|
+
if (currentRunId !== void 0) run = await getPipelineRunById(adapter, currentRunId);
|
|
2086
|
+
if (run === void 0) run = await getLatestRun(adapter);
|
|
2087
|
+
}
|
|
2078
2088
|
if (run === void 0) {
|
|
2079
|
-
const { inspectProcessTree } = await import("../health-
|
|
2089
|
+
const { inspectProcessTree } = await import("../health-DMbNP9bw.js");
|
|
2080
2090
|
const substrateDirPath = join(projectRoot, ".substrate");
|
|
2081
2091
|
const processInfo = inspectProcessTree({
|
|
2082
2092
|
projectRoot,
|
|
@@ -2200,7 +2210,10 @@ async function runStatusAction(options) {
|
|
|
2200
2210
|
}
|
|
2201
2211
|
if (storeStories.length > 0) {
|
|
2202
2212
|
process.stdout.write("\nStateStore Story States:\n");
|
|
2203
|
-
for (const s of storeStories)
|
|
2213
|
+
for (const s of storeStories) if (s.phase === "CHECKPOINT") {
|
|
2214
|
+
const filesCount = s.checkpointFilesCount ?? 0;
|
|
2215
|
+
process.stdout.write(` ${s.storyKey}: ${s.phase} (${filesCount} files modified)\n`);
|
|
2216
|
+
} else process.stdout.write(` ${s.storyKey}: ${s.phase} (${s.reviewCycles} review cycles)\n`);
|
|
2204
2217
|
}
|
|
2205
2218
|
if (workGraph !== void 0) {
|
|
2206
2219
|
const { summary, readyStories, blockedStories } = workGraph;
|
|
@@ -3503,7 +3516,7 @@ async function runSupervisorAction(options, deps = {}) {
|
|
|
3503
3516
|
await initSchema(expAdapter);
|
|
3504
3517
|
const { runRunAction: runPipeline } = await import(
|
|
3505
3518
|
/* @vite-ignore */
|
|
3506
|
-
"../run-
|
|
3519
|
+
"../run-B40PykZL.js"
|
|
3507
3520
|
);
|
|
3508
3521
|
const runStoryFn = async (opts) => {
|
|
3509
3522
|
const exitCode = await runPipeline({
|
|
@@ -4939,13 +4952,13 @@ var MonitorDatabaseImpl = class {
|
|
|
4939
4952
|
_syncAdapter;
|
|
4940
4953
|
_path;
|
|
4941
4954
|
constructor(databasePathOrAdapter) {
|
|
4942
|
-
if (typeof databasePathOrAdapter === "string") throw new Error("MonitorDatabaseImpl: string path constructor is no longer supported (Epic 29 SQLite removal).
|
|
4955
|
+
if (typeof databasePathOrAdapter === "string") throw new Error("MonitorDatabaseImpl: string path constructor is no longer supported (Epic 29 SQLite removal). Pass a DatabaseAdapter directly: new MonitorDatabaseImpl(new InMemoryDatabaseAdapter())");
|
|
4943
4956
|
else {
|
|
4944
4957
|
this._path = "<adapter>";
|
|
4945
4958
|
this._adapter = databasePathOrAdapter;
|
|
4946
4959
|
}
|
|
4947
4960
|
this._syncAdapter = isSyncAdapter(this._adapter) ? this._adapter : null;
|
|
4948
|
-
if (this._syncAdapter === null) throw new Error("MonitorDatabaseImpl: adapter must implement SyncAdapter (querySync/execSync). Use
|
|
4961
|
+
if (this._syncAdapter === null) throw new Error("MonitorDatabaseImpl: adapter must implement SyncAdapter (querySync/execSync). Use InMemoryDatabaseAdapter or another SyncAdapter-compatible adapter.");
|
|
4949
4962
|
this._applySchemaSync();
|
|
4950
4963
|
logger$11.info({ path: this._path }, "Monitor database ready");
|
|
4951
4964
|
}
|