substrate-ai 0.4.5 → 0.4.6
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 { DEFAULT_CONFIG, DEFAULT_ROUTING_POLICY, DatabaseWrapper, DoltClient, DoltNotInstalled, DoltRepoMapMetaRepository, DoltSymbolRepository, 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 { DEFAULT_CONFIG, DEFAULT_ROUTING_POLICY, DatabaseWrapper, DoltClient, DoltNotInstalled, DoltRepoMapMetaRepository, DoltSymbolRepository, 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-CkYqARL5.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-B_W_-Pp9.js"
|
|
2713
2713
|
);
|
|
2714
2714
|
const runStoryFn = async (opts) => {
|
|
2715
2715
|
const exitCode = await runPipeline({
|
|
@@ -5975,7 +5975,7 @@ function containsAnchorKey(content) {
|
|
|
5975
5975
|
function parseYamlResult(yamlText, schema) {
|
|
5976
5976
|
let raw;
|
|
5977
5977
|
try {
|
|
5978
|
-
raw = yaml.load(yamlText);
|
|
5978
|
+
raw = yaml.load(sanitizeYamlEscapes(yamlText));
|
|
5979
5979
|
} catch (err) {
|
|
5980
5980
|
const message = err instanceof Error ? err.message : String(err);
|
|
5981
5981
|
return {
|
|
@@ -6001,6 +6001,51 @@ function parseYamlResult(yamlText, schema) {
|
|
|
6001
6001
|
error: `Schema validation error: ${result.error.message}`
|
|
6002
6002
|
};
|
|
6003
6003
|
}
|
|
6004
|
+
/**
|
|
6005
|
+
* Valid YAML escape sequences in double-quoted strings (YAML 1.2 spec).
|
|
6006
|
+
* Any backslash followed by a character NOT in this set is invalid.
|
|
6007
|
+
*/
|
|
6008
|
+
const VALID_YAML_ESCAPES = new Set([
|
|
6009
|
+
"0",
|
|
6010
|
+
"a",
|
|
6011
|
+
"b",
|
|
6012
|
+
"t",
|
|
6013
|
+
" ",
|
|
6014
|
+
"n",
|
|
6015
|
+
"v",
|
|
6016
|
+
"f",
|
|
6017
|
+
"r",
|
|
6018
|
+
"e",
|
|
6019
|
+
" ",
|
|
6020
|
+
"\"",
|
|
6021
|
+
"/",
|
|
6022
|
+
"\\",
|
|
6023
|
+
"N",
|
|
6024
|
+
"_",
|
|
6025
|
+
"L",
|
|
6026
|
+
"P",
|
|
6027
|
+
"x",
|
|
6028
|
+
"u",
|
|
6029
|
+
"U"
|
|
6030
|
+
]);
|
|
6031
|
+
/**
|
|
6032
|
+
* Sanitize invalid backslash escape sequences in YAML double-quoted strings.
|
|
6033
|
+
*
|
|
6034
|
+
* LLMs frequently emit invalid escapes like `\$` or `\#` inside double-quoted
|
|
6035
|
+
* YAML values (e.g., `vi.mock('\$lib/types/review')`). js-yaml rejects these.
|
|
6036
|
+
* This function strips the backslash from invalid sequences, turning `\$` → `$`.
|
|
6037
|
+
*
|
|
6038
|
+
* Only operates within double-quoted string regions to avoid corrupting
|
|
6039
|
+
* single-quoted strings, block scalars, or unquoted values.
|
|
6040
|
+
*/
|
|
6041
|
+
function sanitizeYamlEscapes(yamlText) {
|
|
6042
|
+
return yamlText.replace(/"(?:[^"\\]|\\.)*"/g, (match$1) => {
|
|
6043
|
+
return match$1.replace(/\\(.)/g, (esc, ch) => {
|
|
6044
|
+
if (VALID_YAML_ESCAPES.has(ch)) return esc;
|
|
6045
|
+
return ch;
|
|
6046
|
+
});
|
|
6047
|
+
});
|
|
6048
|
+
}
|
|
6004
6049
|
|
|
6005
6050
|
//#endregion
|
|
6006
6051
|
//#region src/modules/agent-dispatch/dispatcher-impl.ts
|
|
@@ -21091,4 +21136,4 @@ function registerRunCommand(program, _version = "0.0.0", projectRoot = process.c
|
|
|
21091
21136
|
|
|
21092
21137
|
//#endregion
|
|
21093
21138
|
export { DEFAULT_CONFIG, DEFAULT_ROUTING_POLICY, DatabaseWrapper, DoltClient, DoltNotInstalled, DoltRepoMapMetaRepository, DoltSymbolRepository, 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 };
|
|
21094
|
-
//# sourceMappingURL=run-
|
|
21139
|
+
//# sourceMappingURL=run-CkYqARL5.js.map
|