substrate-ai 0.8.1 → 0.8.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
|
@@ -2,7 +2,7 @@
|
|
|
2
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-B4n563g1.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";
|
|
@@ -15,7 +15,7 @@ import { Command } from "commander";
|
|
|
15
15
|
import { fileURLToPath } from "url";
|
|
16
16
|
import { dirname, join, resolve } from "path";
|
|
17
17
|
import { access, mkdir, readFile, writeFile } from "fs/promises";
|
|
18
|
-
import { chmodSync, cpSync, existsSync, mkdirSync, readFileSync, readdirSync, realpathSync, statSync, unlinkSync, writeFileSync } from "fs";
|
|
18
|
+
import { appendFileSync, chmodSync, cpSync, existsSync, mkdirSync, readFileSync, readdirSync, realpathSync, statSync, unlinkSync, writeFileSync } from "fs";
|
|
19
19
|
import yaml from "js-yaml";
|
|
20
20
|
import { createRequire } from "node:module";
|
|
21
21
|
import * as path$2 from "node:path";
|
|
@@ -1190,6 +1190,19 @@ async function runInitAction(options) {
|
|
|
1190
1190
|
await scaffoldStatuslineScript(projectRoot);
|
|
1191
1191
|
await scaffoldClaudeSettings(projectRoot);
|
|
1192
1192
|
await scaffoldClaudeCommands(projectRoot, outputFormat);
|
|
1193
|
+
const gitignorePath = join(projectRoot, ".gitignore");
|
|
1194
|
+
const runtimeEntries = [".substrate/orchestrator.pid", ".substrate/current-run-id"];
|
|
1195
|
+
try {
|
|
1196
|
+
const existing = existsSync(gitignorePath) ? readFileSync(gitignorePath, "utf-8") : "";
|
|
1197
|
+
const missing = runtimeEntries.filter((e) => !existing.includes(e));
|
|
1198
|
+
if (missing.length > 0) {
|
|
1199
|
+
const block = "\n# Substrate runtime files\n" + missing.join("\n") + "\n";
|
|
1200
|
+
appendFileSync(gitignorePath, block);
|
|
1201
|
+
logger$18.info({ entries: missing }, "Added substrate runtime files to .gitignore");
|
|
1202
|
+
}
|
|
1203
|
+
} catch (err) {
|
|
1204
|
+
logger$18.debug({ err }, "Could not update .gitignore (non-fatal)");
|
|
1205
|
+
}
|
|
1193
1206
|
const doltMode = options.doltMode ?? "auto";
|
|
1194
1207
|
let doltInitialized = false;
|
|
1195
1208
|
if (doltMode !== "skip") try {
|
|
@@ -3516,7 +3529,7 @@ async function runSupervisorAction(options, deps = {}) {
|
|
|
3516
3529
|
await initSchema(expAdapter);
|
|
3517
3530
|
const { runRunAction: runPipeline } = await import(
|
|
3518
3531
|
/* @vite-ignore */
|
|
3519
|
-
"../run-
|
|
3532
|
+
"../run-8Lez83bG.js"
|
|
3520
3533
|
);
|
|
3521
3534
|
const runStoryFn = async (opts) => {
|
|
3522
3535
|
const exitCode = await runPipeline({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./health-C-VRJruD.js";
|
|
2
2
|
import "./logger-D2fS2ccL.js";
|
|
3
|
-
import { registerRunCommand, runRunAction } from "./run-
|
|
3
|
+
import { registerRunCommand, runRunAction } from "./run-B4n563g1.js";
|
|
4
4
|
import "./config-migrator-CtGelIsG.js";
|
|
5
5
|
import "./helpers-CpMs8VZX.js";
|
|
6
6
|
import "./routing-BVrxrM6v.js";
|
|
@@ -14509,12 +14509,42 @@ function createImplementationOrchestrator(deps) {
|
|
|
14509
14509
|
}
|
|
14510
14510
|
endPhase(storyKey, "dev-story");
|
|
14511
14511
|
{
|
|
14512
|
-
|
|
14512
|
+
let buildVerifyResult = config.skipBuildVerify === true ? { status: "skipped" } : runBuildVerification({
|
|
14513
14513
|
verifyCommand: pack.manifest.verifyCommand,
|
|
14514
14514
|
verifyTimeoutMs: pack.manifest.verifyTimeoutMs,
|
|
14515
14515
|
projectRoot: projectRoot ?? process.cwd(),
|
|
14516
14516
|
changedFiles: gitDiffFiles
|
|
14517
14517
|
});
|
|
14518
|
+
if (buildVerifyResult.status === "passed") {
|
|
14519
|
+
const resolvedRootForTsc = projectRoot ?? process.cwd();
|
|
14520
|
+
const tscBin = join$1(resolvedRootForTsc, "node_modules", ".bin", "tsc");
|
|
14521
|
+
const hasTsc = existsSync$1(tscBin) && existsSync$1(join$1(resolvedRootForTsc, "tsconfig.json"));
|
|
14522
|
+
if (hasTsc) try {
|
|
14523
|
+
execSync(`"${tscBin}" --noEmit`, {
|
|
14524
|
+
cwd: resolvedRootForTsc,
|
|
14525
|
+
timeout: 12e4,
|
|
14526
|
+
encoding: "utf-8",
|
|
14527
|
+
stdio: [
|
|
14528
|
+
"pipe",
|
|
14529
|
+
"pipe",
|
|
14530
|
+
"pipe"
|
|
14531
|
+
]
|
|
14532
|
+
});
|
|
14533
|
+
logger$25.info({ storyKey }, "Secondary typecheck (tsc --noEmit) passed");
|
|
14534
|
+
} catch (tscErr) {
|
|
14535
|
+
const tscOutput = tscErr instanceof Error && "stdout" in tscErr ? String(tscErr.stdout ?? "").slice(0, 2e3) : "";
|
|
14536
|
+
logger$25.warn({
|
|
14537
|
+
storyKey,
|
|
14538
|
+
tscOutput
|
|
14539
|
+
}, "Secondary typecheck (tsc --noEmit) failed — treating as build failure");
|
|
14540
|
+
buildVerifyResult = {
|
|
14541
|
+
status: "failed",
|
|
14542
|
+
exitCode: 2,
|
|
14543
|
+
output: `tsc --noEmit failed:\n${tscOutput}`,
|
|
14544
|
+
reason: "build-verification-failed"
|
|
14545
|
+
};
|
|
14546
|
+
}
|
|
14547
|
+
}
|
|
14518
14548
|
if (buildVerifyResult.status === "passed") {
|
|
14519
14549
|
eventBus.emit("story:build-verification-passed", { storyKey });
|
|
14520
14550
|
logger$25.info({ storyKey }, "Build verification passed");
|
|
@@ -21325,4 +21355,4 @@ function registerRunCommand(program, _version = "0.0.0", projectRoot = process.c
|
|
|
21325
21355
|
|
|
21326
21356
|
//#endregion
|
|
21327
21357
|
export { 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, runRunAction, runSolutioningPhase, validateStopAfterFromConflict };
|
|
21328
|
-
//# sourceMappingURL=run-
|
|
21358
|
+
//# sourceMappingURL=run-B4n563g1.js.map
|