substrate-ai 0.16.4 → 0.16.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
|
@@ -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-mKdPlyIj.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-Cz-Qy4iA.js"
|
|
4363
4363
|
);
|
|
4364
4364
|
const runStoryFn = async (opts) => {
|
|
4365
4365
|
const exitCode = await runPipeline({
|
|
@@ -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-mKdPlyIj.js";
|
|
6
6
|
import "./routing-CcBOCuC9.js";
|
|
7
7
|
import "./decisions-C0pz9Clx.js";
|
|
8
8
|
|
|
@@ -22987,7 +22987,10 @@ function createGraphExecutor() {
|
|
|
22987
22987
|
total_cost_usd: pipelineManager.getTotalCost(),
|
|
22988
22988
|
node_count: graph.nodes.size
|
|
22989
22989
|
});
|
|
22990
|
-
} catch {
|
|
22990
|
+
} catch (persistErr) {
|
|
22991
|
+
const msg = persistErr instanceof Error ? persistErr.message : String(persistErr);
|
|
22992
|
+
console.warn(`[executor] graph_runs upsert failed for run ${config.runId}: ${msg}`);
|
|
22993
|
+
}
|
|
22991
22994
|
};
|
|
22992
22995
|
let completedNodes = [];
|
|
22993
22996
|
let nodeRetries = {};
|
|
@@ -23021,7 +23024,7 @@ function createGraphExecutor() {
|
|
|
23021
23024
|
executed_at: new Date().toISOString()
|
|
23022
23025
|
}).catch((err) => {
|
|
23023
23026
|
const msg = err instanceof Error ? err.message : String(err);
|
|
23024
|
-
console.
|
|
23027
|
+
console.warn(`[executor] scenario_results persistence failed for run ${config.runId}: ${msg}`);
|
|
23025
23028
|
});
|
|
23026
23029
|
};
|
|
23027
23030
|
config.eventBus.on("scenario:completed", scenarioHandler);
|
|
@@ -23035,7 +23038,10 @@ function createGraphExecutor() {
|
|
|
23035
23038
|
started_at: runStartedAt,
|
|
23036
23039
|
node_count: graph.nodes.size
|
|
23037
23040
|
});
|
|
23038
|
-
} catch {
|
|
23041
|
+
} catch (persistErr) {
|
|
23042
|
+
const msg = persistErr instanceof Error ? persistErr.message : String(persistErr);
|
|
23043
|
+
console.warn(`[executor] graph_runs insert failed for run ${config.runId}: ${msg}`);
|
|
23044
|
+
}
|
|
23039
23045
|
let currentNode;
|
|
23040
23046
|
if (config.checkpointPath) {
|
|
23041
23047
|
const checkpoint = await checkpointManager.load(config.checkpointPath);
|
|
@@ -23264,7 +23270,10 @@ function createGraphExecutor() {
|
|
|
23264
23270
|
cost_usd: nodeCost,
|
|
23265
23271
|
...outcome.failureReason !== void 0 ? { failure_reason: outcome.failureReason } : {}
|
|
23266
23272
|
});
|
|
23267
|
-
} catch {
|
|
23273
|
+
} catch (persistErr) {
|
|
23274
|
+
const msg = persistErr instanceof Error ? persistErr.message : String(persistErr);
|
|
23275
|
+
console.warn(`[executor] graph_node_results insert failed for node ${currentNode.id}: ${msg}`);
|
|
23276
|
+
}
|
|
23268
23277
|
}
|
|
23269
23278
|
if (!skipCompletedPush) completedNodes.push(currentNode.id);
|
|
23270
23279
|
skipCompletedPush = false;
|
|
@@ -29157,8 +29166,8 @@ async function factorySchema(adapter) {
|
|
|
29157
29166
|
`);
|
|
29158
29167
|
await adapter.exec(`
|
|
29159
29168
|
CREATE TABLE IF NOT EXISTS graph_node_results (
|
|
29160
|
-
id INTEGER PRIMARY KEY
|
|
29161
|
-
run_id VARCHAR(255) NOT NULL
|
|
29169
|
+
id INTEGER PRIMARY KEY AUTO_INCREMENT,
|
|
29170
|
+
run_id VARCHAR(255) NOT NULL ,
|
|
29162
29171
|
node_id VARCHAR(255) NOT NULL,
|
|
29163
29172
|
attempt INTEGER NOT NULL DEFAULT 1,
|
|
29164
29173
|
status VARCHAR(32) NOT NULL,
|
|
@@ -29173,8 +29182,8 @@ async function factorySchema(adapter) {
|
|
|
29173
29182
|
await adapter.exec("CREATE INDEX IF NOT EXISTS idx_graph_node_results_run ON graph_node_results(run_id)");
|
|
29174
29183
|
await adapter.exec(`
|
|
29175
29184
|
CREATE TABLE IF NOT EXISTS scenario_results (
|
|
29176
|
-
id INTEGER PRIMARY KEY
|
|
29177
|
-
run_id VARCHAR(255) NOT NULL
|
|
29185
|
+
id INTEGER PRIMARY KEY AUTO_INCREMENT,
|
|
29186
|
+
run_id VARCHAR(255) NOT NULL ,
|
|
29178
29187
|
node_id VARCHAR(255) NOT NULL,
|
|
29179
29188
|
iteration INTEGER NOT NULL DEFAULT 1,
|
|
29180
29189
|
total_scenarios INTEGER NOT NULL,
|
|
@@ -29192,7 +29201,7 @@ async function factorySchema(adapter) {
|
|
|
29192
29201
|
CREATE TABLE IF NOT EXISTS twin_runs (
|
|
29193
29202
|
id VARCHAR(255) PRIMARY KEY,
|
|
29194
29203
|
run_id VARCHAR(255),
|
|
29195
|
-
twin_name
|
|
29204
|
+
twin_name VARCHAR(255) NOT NULL,
|
|
29196
29205
|
started_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
29197
29206
|
stopped_at DATETIME,
|
|
29198
29207
|
status VARCHAR(32) NOT NULL DEFAULT 'running',
|
|
@@ -29201,8 +29210,8 @@ async function factorySchema(adapter) {
|
|
|
29201
29210
|
`);
|
|
29202
29211
|
await adapter.exec(`
|
|
29203
29212
|
CREATE TABLE IF NOT EXISTS twin_health_failures (
|
|
29204
|
-
id INTEGER PRIMARY KEY
|
|
29205
|
-
twin_name
|
|
29213
|
+
id INTEGER PRIMARY KEY AUTO_INCREMENT,
|
|
29214
|
+
twin_name VARCHAR(255) NOT NULL,
|
|
29206
29215
|
run_id VARCHAR(255),
|
|
29207
29216
|
checked_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
29208
29217
|
error_message TEXT NOT NULL
|
|
@@ -29287,6 +29296,10 @@ function registerFactoryCommand(program, options) {
|
|
|
29287
29296
|
type: "graph:completed",
|
|
29288
29297
|
...e
|
|
29289
29298
|
}));
|
|
29299
|
+
eventBus.on("factory:config-reloaded", (e) => emit({
|
|
29300
|
+
type: "factory:config-reloaded",
|
|
29301
|
+
...e
|
|
29302
|
+
}));
|
|
29290
29303
|
}
|
|
29291
29304
|
process.stdout.write(`Running graph pipeline from ${graphPath}\n`);
|
|
29292
29305
|
const runId = randomUUID();
|
|
@@ -29326,6 +29339,11 @@ function registerFactoryCommand(program, options) {
|
|
|
29326
29339
|
const oldThreshold = executorConfig.satisfactionThreshold;
|
|
29327
29340
|
executorConfig.satisfactionThreshold = newThreshold;
|
|
29328
29341
|
process.stderr.write(`[hot-reload] satisfaction_threshold changed: ${oldThreshold} → ${newThreshold}\n`);
|
|
29342
|
+
eventBus.emit("factory:config-reloaded", {
|
|
29343
|
+
key: "satisfaction_threshold",
|
|
29344
|
+
oldValue: oldThreshold,
|
|
29345
|
+
newValue: newThreshold
|
|
29346
|
+
});
|
|
29329
29347
|
}
|
|
29330
29348
|
} catch {}
|
|
29331
29349
|
});
|
|
@@ -31023,4 +31041,4 @@ function registerRunCommand(program, _version = "0.0.0", projectRoot = process.c
|
|
|
31023
31041
|
|
|
31024
31042
|
//#endregion
|
|
31025
31043
|
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 };
|
|
31026
|
-
//# sourceMappingURL=run-
|
|
31044
|
+
//# sourceMappingURL=run-mKdPlyIj.js.map
|