substrate-ai 0.4.2 → 0.4.4
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-B9G5NI16.js";
|
|
3
3
|
import { createLogger } from "../logger-D2fS2ccL.js";
|
|
4
4
|
import { AdapterRegistry } from "../adapter-registry-rSOJ9Kvz.js";
|
|
5
5
|
import { CURRENT_CONFIG_FORMAT_VERSION, CURRENT_TASK_GRAPH_VERSION, PartialSubstrateConfigSchema } from "../config-migrator-DtZW1maj.js";
|
|
@@ -622,7 +622,8 @@ async function runInitAction(options) {
|
|
|
622
622
|
config_format_version: CURRENT_CONFIG_FORMAT_VERSION,
|
|
623
623
|
task_graph_version: CURRENT_TASK_GRAPH_VERSION,
|
|
624
624
|
global: DEFAULT_CONFIG.global,
|
|
625
|
-
providers: configProviders
|
|
625
|
+
providers: configProviders,
|
|
626
|
+
telemetry: DEFAULT_CONFIG.telemetry
|
|
626
627
|
};
|
|
627
628
|
const routingPolicy = structuredClone(DEFAULT_ROUTING_POLICY);
|
|
628
629
|
await mkdir(substrateDir, { recursive: true });
|
|
@@ -2708,7 +2709,7 @@ async function runSupervisorAction(options, deps = {}) {
|
|
|
2708
2709
|
const expDb = expDbWrapper.db;
|
|
2709
2710
|
const { runRunAction: runPipeline } = await import(
|
|
2710
2711
|
/* @vite-ignore */
|
|
2711
|
-
"../run-
|
|
2712
|
+
"../run-CXPqJdGe.js"
|
|
2712
2713
|
);
|
|
2713
2714
|
const runStoryFn = async (opts) => {
|
|
2714
2715
|
const exitCode = await runPipeline({
|
|
@@ -22,6 +22,7 @@ import { EventEmitter } from "node:events";
|
|
|
22
22
|
import { createHash, randomUUID } from "node:crypto";
|
|
23
23
|
import { freemem, platform } from "node:os";
|
|
24
24
|
import { createServer } from "node:http";
|
|
25
|
+
import { createGunzip, createInflate } from "node:zlib";
|
|
25
26
|
|
|
26
27
|
//#region rolldown:runtime
|
|
27
28
|
var __create = Object.create;
|
|
@@ -110,6 +111,10 @@ const DEFAULT_CONFIG = {
|
|
|
110
111
|
claude: DEFAULT_CLAUDE_PROVIDER,
|
|
111
112
|
codex: DEFAULT_CODEX_PROVIDER,
|
|
112
113
|
gemini: DEFAULT_GEMINI_PROVIDER
|
|
114
|
+
},
|
|
115
|
+
telemetry: {
|
|
116
|
+
enabled: true,
|
|
117
|
+
port: 4318
|
|
113
118
|
}
|
|
114
119
|
};
|
|
115
120
|
|
|
@@ -12281,11 +12286,14 @@ var IngestionServer = class {
|
|
|
12281
12286
|
res.end(JSON.stringify({ status: "ok" }));
|
|
12282
12287
|
return;
|
|
12283
12288
|
}
|
|
12289
|
+
const encoding = req.headers["content-encoding"];
|
|
12290
|
+
let stream = req;
|
|
12291
|
+
if (encoding === "gzip" || encoding === "deflate") stream = encoding === "gzip" ? req.pipe(createGunzip()) : req.pipe(createInflate());
|
|
12284
12292
|
const chunks = [];
|
|
12285
|
-
|
|
12293
|
+
stream.on("data", (chunk) => {
|
|
12286
12294
|
chunks.push(chunk);
|
|
12287
12295
|
});
|
|
12288
|
-
|
|
12296
|
+
stream.on("end", () => {
|
|
12289
12297
|
const bodyStr = Buffer.concat(chunks).toString("utf-8");
|
|
12290
12298
|
logger$7.trace({
|
|
12291
12299
|
url: req.url,
|
|
@@ -12309,10 +12317,12 @@ var IngestionServer = class {
|
|
|
12309
12317
|
res.writeHead(200, { "Content-Type": "application/json" });
|
|
12310
12318
|
res.end("{}");
|
|
12311
12319
|
});
|
|
12312
|
-
|
|
12320
|
+
stream.on("error", (err) => {
|
|
12313
12321
|
logger$7.warn({ err }, "Error reading OTLP request body");
|
|
12314
|
-
res.
|
|
12315
|
-
|
|
12322
|
+
if (!res.headersSent) {
|
|
12323
|
+
res.writeHead(400);
|
|
12324
|
+
res.end("Bad Request");
|
|
12325
|
+
}
|
|
12316
12326
|
});
|
|
12317
12327
|
}
|
|
12318
12328
|
};
|
|
@@ -21081,4 +21091,4 @@ function registerRunCommand(program, _version = "0.0.0", projectRoot = process.c
|
|
|
21081
21091
|
|
|
21082
21092
|
//#endregion
|
|
21083
21093
|
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 };
|
|
21084
|
-
//# sourceMappingURL=run-
|
|
21094
|
+
//# sourceMappingURL=run-B9G5NI16.js.map
|