substrate-ai 0.20.126 → 0.20.127
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
|
@@ -3,7 +3,7 @@ import { FileKvStore, SUBSTRATE_OWNED_SETTINGS_KEYS, VALID_PHASES, buildPipeline
|
|
|
3
3
|
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, GlobalSettingsSchema, InMemoryDatabaseAdapter, IngestionServer, MonitorDatabaseImpl, OPERATIONAL_FINDING, PartialGlobalSettingsSchema, PartialProviderConfigSchema, ProvidersSchema, RoutingRecommender, STORY_METRICS, TelemetryConfigSchema, addTokenUsage, aggregateTokenUsageForRun, checkDoltInstalled, compareRunMetrics, createAmendmentRun, createConfigSystem, createDecision, createPipelineRun, createStderrLogger, getActiveDecisions, getAllCostEntriesFiltered, getBaselineRunMetrics, getDecisionsByCategory, getDecisionsByPhaseForRun, getLatestCompletedRun, getLatestRun, getPipelineRunById, getPlanningCostTotal, getRetryableEscalations, getRunMetrics, getRunningPipelineRuns, getSessionCostSummary, getSessionCostSummaryFiltered, getStoryMetricsForRun, getTokenUsageSummary, incrementRunRestarts, initSchema, initWorkGraphSchema, initializeDolt, listRunMetrics, loadParentRunDecisions, supersedeDecision, swallowDebug, tagRunAsBaseline, updatePipelineRun } from "../dist-Bc0-6VcX.js";
|
|
6
|
-
import { AdapterTelemetryPersistence, AppError, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, EpicIngester, GLOBSTAR, GitClient, GrammarLoader, Minimatch, Minipass, RepoMapInjector, RepoMapModule, RepoMapQueryEngine, RepoMapStorage, SymbolParser, createContextCompiler, createDispatcher, createEventEmitter, createGitWorktreeManager, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStopAfterGate, createTelemetryAdvisor, escape, formatPhaseCompletionSummary, getFactoryRunSummaries, getScenarioResultsForRun, getTwinRunsForRun, listGraphRuns, registerExportCommand, registerFactoryCommand, registerRunCommand, registerScenariosCommand, resolveStoryKeys, runAnalysisPhase, runPlanningPhase, runProbeAuthor, runSolutioningPhase, unescape, validateStopAfterFromConflict } from "../run-
|
|
6
|
+
import { AdapterTelemetryPersistence, AppError, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, EpicIngester, GLOBSTAR, GitClient, GrammarLoader, Minimatch, Minipass, RepoMapInjector, RepoMapModule, RepoMapQueryEngine, RepoMapStorage, SymbolParser, createContextCompiler, createDispatcher, createEventEmitter, createGitWorktreeManager, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStopAfterGate, createTelemetryAdvisor, escape, formatPhaseCompletionSummary, getFactoryRunSummaries, getScenarioResultsForRun, getTwinRunsForRun, listGraphRuns, registerExportCommand, registerFactoryCommand, registerRunCommand, registerScenariosCommand, resolveStoryKeys, runAnalysisPhase, runPlanningPhase, runProbeAuthor, runSolutioningPhase, unescape, validateStopAfterFromConflict } from "../run-Bz9isnn_.js";
|
|
7
7
|
import "../adapter-registry-DIcrxjH8.js";
|
|
8
8
|
import { RunManifest, SupervisorLock, ZERO_FINDINGS_BY_AUTHOR, ZERO_FINDING_COUNTS, ZERO_PROBE_AUTHOR_METRICS, aggregateProbeAuthorMetrics, parseRuntimeProbes, readCurrentRunId, resolveMainRepoRoot, resolveRunManifest, rollupFindingCounts, rollupFindingsByAuthor, rollupProbeAuthorByClass, rollupProbeAuthorMetrics, runAcTraceabilityCheck } from "../manifest-read-CDjNmdVW.js";
|
|
9
9
|
import "../errors-CwQM_6Yk.js";
|
|
@@ -8419,7 +8419,7 @@ async function runSupervisorAction(options, deps = {}) {
|
|
|
8419
8419
|
await initSchema(expAdapter);
|
|
8420
8420
|
const { runRunAction: runPipeline } = await import(
|
|
8421
8421
|
/* @vite-ignore */
|
|
8422
|
-
"../run-
|
|
8422
|
+
"../run-BjR_gPu6.js"
|
|
8423
8423
|
);
|
|
8424
8424
|
const runStoryFn = async (opts) => {
|
|
8425
8425
|
const exitCode = await runPipeline({
|
|
@@ -2,7 +2,7 @@ import "./health-B4NhX--T.js";
|
|
|
2
2
|
import "./logger-KeHncl-f.js";
|
|
3
3
|
import "./helpers-CElYrONe.js";
|
|
4
4
|
import "./dist-Bc0-6VcX.js";
|
|
5
|
-
import { normalizeGraphSummaryToStatus, registerRunCommand, resolveMaxReviewCycles, resolveProbeAuthorStateIntegrating, runRunAction, wireNdjsonEmitter } from "./run-
|
|
5
|
+
import { normalizeGraphSummaryToStatus, registerRunCommand, resolveMaxReviewCycles, resolveProbeAuthorStateIntegrating, runRunAction, wireNdjsonEmitter } from "./run-Bz9isnn_.js";
|
|
6
6
|
import "./manifest-read-CDjNmdVW.js";
|
|
7
7
|
import "./routing-DFxoKHDt.js";
|
|
8
8
|
import "./work-graph-repository-DZyJv5pV.js";
|
|
@@ -5848,6 +5848,16 @@ function runBuildVerification(options) {
|
|
|
5848
5848
|
reason: "pep-668-externally-managed"
|
|
5849
5849
|
};
|
|
5850
5850
|
}
|
|
5851
|
+
const pythonEnvNotProvisionedPattern = /\bpython3?:?\s*command not found|command not found:\s*python3?\b|\bpip3?:?\s*command not found|No module named pip\b/i;
|
|
5852
|
+
if (pythonEnvNotProvisionedPattern.test(combinedOutput)) {
|
|
5853
|
+
logger$24.warn("Python environment not provisioned (interpreter or pip missing) — skipping build pre-flight. Provide a venv (or a project-profile buildCommand that activates one) to verify Python packages.");
|
|
5854
|
+
return {
|
|
5855
|
+
status: "skipped",
|
|
5856
|
+
exitCode,
|
|
5857
|
+
output: combinedOutput,
|
|
5858
|
+
reason: "python-env-not-provisioned"
|
|
5859
|
+
};
|
|
5860
|
+
}
|
|
5851
5861
|
return {
|
|
5852
5862
|
status: "failed",
|
|
5853
5863
|
exitCode,
|
|
@@ -13081,6 +13091,24 @@ function sanitizeStoryTitle(raw) {
|
|
|
13081
13091
|
return cleaned.length > 120 ? `${cleaned.slice(0, 117)}...` : cleaned;
|
|
13082
13092
|
}
|
|
13083
13093
|
/**
|
|
13094
|
+
* obs_2026-05-26_028: detect whether a dev-story's output landed in the MAIN
|
|
13095
|
+
* checkout instead of its per-story worktree (a cwd misroute). Returns the
|
|
13096
|
+
* uncommitted files in the main checkout when running in worktree mode (the
|
|
13097
|
+
* main tree should be clean during a worktree dispatch), else an empty list.
|
|
13098
|
+
* Used to enrich the zero-diff escalation with an actionable cause rather than
|
|
13099
|
+
* the opaque verdict. Best-effort: a probe failure yields an empty list (never
|
|
13100
|
+
* blocks escalation). Exported for unit testing.
|
|
13101
|
+
*/
|
|
13102
|
+
function detectWorkOutsideWorktree(effectiveProjectRoot, projectRoot, checkDiff) {
|
|
13103
|
+
const inWorktreeMode = effectiveProjectRoot !== void 0 && projectRoot !== void 0 && effectiveProjectRoot !== projectRoot;
|
|
13104
|
+
if (!inWorktreeMode) return [];
|
|
13105
|
+
try {
|
|
13106
|
+
return checkDiff(projectRoot);
|
|
13107
|
+
} catch {
|
|
13108
|
+
return [];
|
|
13109
|
+
}
|
|
13110
|
+
}
|
|
13111
|
+
/**
|
|
13084
13112
|
* obs_2026-05-26_027: capture the reconstruction phase-input. Reads the story
|
|
13085
13113
|
* file the producing phase consumed, copies it to a durable sidecar under the
|
|
13086
13114
|
* run manifest's directory (`inputs/<run-id>/<story-key>.md`), and returns the
|
|
@@ -15177,7 +15205,13 @@ function createImplementationOrchestrator(deps) {
|
|
|
15177
15205
|
committedFileCount: gitDiffFiles?.length ?? 0
|
|
15178
15206
|
}, "Working tree clean but new commits detected since dispatch — skipping zero-diff escalation");
|
|
15179
15207
|
} else {
|
|
15180
|
-
|
|
15208
|
+
const outsideWorktreeFiles = detectWorkOutsideWorktree(effectiveProjectRoot, projectRoot, checkGitDiffFiles);
|
|
15209
|
+
const misrouted = outsideWorktreeFiles.length > 0;
|
|
15210
|
+
logger$27.warn({
|
|
15211
|
+
storyKey,
|
|
15212
|
+
misrouteSuspected: misrouted,
|
|
15213
|
+
outsideWorktreeFileCount: outsideWorktreeFiles.length
|
|
15214
|
+
}, misrouted ? "Zero-diff in worktree, but the MAIN checkout has uncommitted changes — dev-story output likely landed outside the story worktree (cwd misroute)" : "Zero-diff detected after COMPLETE dev-story — no file changes and no new commits");
|
|
15181
15215
|
eventBus.emit("orchestrator:zero-diff-escalation", {
|
|
15182
15216
|
storyKey,
|
|
15183
15217
|
reason: "zero-diff-on-complete"
|
|
@@ -15189,11 +15223,13 @@ function createImplementationOrchestrator(deps) {
|
|
|
15189
15223
|
completedAt: new Date().toISOString()
|
|
15190
15224
|
});
|
|
15191
15225
|
await writeStoryMetricsBestEffort(storyKey, "escalated", 0);
|
|
15226
|
+
const zeroDiffIssues = ["dev-story completed with COMPLETE verdict but no file changes detected in git diff"];
|
|
15227
|
+
if (misrouted) zeroDiffIssues.push(`Work appears to have landed in the MAIN checkout instead of the story worktree (${outsideWorktreeFiles.length} uncommitted file(s) at ${projectRoot}; e.g. ${outsideWorktreeFiles.slice(0, 5).join(", ")}). The output is not lost — inspect \`git -C ${projectRoot} status\`. reconcile-from-disk inspects the branch/worktree, not main, so it will not pick this up.`);
|
|
15192
15228
|
await emitEscalation({
|
|
15193
15229
|
storyKey,
|
|
15194
15230
|
lastVerdict: "zero-diff-on-complete",
|
|
15195
15231
|
reviewCycles: 0,
|
|
15196
|
-
issues:
|
|
15232
|
+
issues: zeroDiffIssues
|
|
15197
15233
|
});
|
|
15198
15234
|
await persistState();
|
|
15199
15235
|
return;
|
|
@@ -47309,4 +47345,4 @@ function registerRunCommand(program, version = "0.0.0", projectRoot = process.cw
|
|
|
47309
47345
|
|
|
47310
47346
|
//#endregion
|
|
47311
47347
|
export { AdapterTelemetryPersistence, AppError, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, EpicIngester, GLOBSTAR$1 as GLOBSTAR, GitClient, GrammarLoader, Minimatch$1 as Minimatch, Minipass, RepoMapInjector, RepoMapModule, RepoMapQueryEngine, RepoMapStorage, SymbolParser, createContextCompiler, createDispatcher, createEventEmitter, createGitWorktreeManager, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStopAfterGate, createTelemetryAdvisor, escape$1 as escape, formatPhaseCompletionSummary, getFactoryRunSummaries, getScenarioResultsForRun, getTwinRunsForRun, listGraphRuns, normalizeGraphSummaryToStatus, registerExportCommand, registerFactoryCommand, registerRunCommand, registerScenariosCommand, resolveMaxReviewCycles, resolveProbeAuthorStateIntegrating, resolveStoryKeys, runAnalysisPhase, runPlanningPhase, runProbeAuthor, runRunAction, runSolutioningPhase, unescape$1 as unescape, validateStopAfterFromConflict, wireNdjsonEmitter };
|
|
47312
|
-
//# sourceMappingURL=run-
|
|
47348
|
+
//# sourceMappingURL=run-Bz9isnn_.js.map
|