substrate-ai 0.4.10 → 0.4.11

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 { AppError, DEFAULT_CONFIG, DEFAULT_ROUTING_POLICY, DatabaseWrapper, DoltClient, DoltNotInstalled, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, 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-BErnJT9a.js";
2
+ import { AppError, DEFAULT_CONFIG, DEFAULT_ROUTING_POLICY, DatabaseWrapper, DoltClient, DoltNotInstalled, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, 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-B_08vO01.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-BbdWeKiB.js"
2712
+ "../run-DbCq_Ynr.js"
2713
2713
  );
2714
2714
  const runStoryFn = async (opts) => {
2715
2715
  const exitCode = await runPipeline({
@@ -13494,7 +13494,7 @@ var LogTurnAnalyzer = class {
13494
13494
  const turns = merged.map(({ representative: log$2, inputTokens, outputTokens, cacheReadTokens, costUsd }, idx) => {
13495
13495
  const prevContext = runningContext;
13496
13496
  runningContext += inputTokens + cacheReadTokens;
13497
- const freshTokens = inputTokens - cacheReadTokens;
13497
+ const freshTokens = inputTokens;
13498
13498
  const totalInput = inputTokens + cacheReadTokens;
13499
13499
  const cacheHitRate = totalInput > 0 ? cacheReadTokens / totalInput : 0;
13500
13500
  return {
@@ -14262,24 +14262,31 @@ var TelemetryPipeline = class {
14262
14262
  }
14263
14263
  /**
14264
14264
  * Log-only analysis path (AC3, AC6): processes turns from LogTurnAnalyzer
14265
- * through efficiency scoring and persistence.
14266
- *
14267
- * Categorizer and consumer analyzer remain span-only for now (story 27-16).
14265
+ * through efficiency scoring, category stats, and persistence.
14268
14266
  */
14269
14267
  async _processStoryFromTurns(storyKey, turns) {
14270
14268
  if (turns.length === 0) return;
14271
14269
  const efficiencyScore = this._efficiencyScorer.score(storyKey, turns);
14272
- await Promise.all([this._persistence.storeTurnAnalysis(storyKey, turns).catch((err) => logger$6.warn({
14273
- err,
14274
- storyKey
14275
- }, "Failed to store turn analysis")), this._persistence.storeEfficiencyScore(efficiencyScore).catch((err) => logger$6.warn({
14276
- err,
14277
- storyKey
14278
- }, "Failed to store efficiency score"))]);
14270
+ const categoryStats = this._categorizer.computeCategoryStatsFromTurns(turns);
14271
+ await Promise.all([
14272
+ this._persistence.storeTurnAnalysis(storyKey, turns).catch((err) => logger$6.warn({
14273
+ err,
14274
+ storyKey
14275
+ }, "Failed to store turn analysis")),
14276
+ this._persistence.storeEfficiencyScore(efficiencyScore).catch((err) => logger$6.warn({
14277
+ err,
14278
+ storyKey
14279
+ }, "Failed to store efficiency score")),
14280
+ categoryStats.length > 0 ? this._persistence.storeCategoryStats(storyKey, categoryStats).catch((err) => logger$6.warn({
14281
+ err,
14282
+ storyKey
14283
+ }, "Failed to store category stats")) : Promise.resolve()
14284
+ ]);
14279
14285
  logger$6.info({
14280
14286
  storyKey,
14281
14287
  turns: turns.length,
14282
- compositeScore: efficiencyScore.compositeScore
14288
+ compositeScore: efficiencyScore.compositeScore,
14289
+ categories: categoryStats.length
14283
14290
  }, "TelemetryPipeline: story analysis from turns complete");
14284
14291
  }
14285
14292
  };
@@ -21601,4 +21608,4 @@ function registerRunCommand(program, _version = "0.0.0", projectRoot = process.c
21601
21608
 
21602
21609
  //#endregion
21603
21610
  export { AppError, DEFAULT_CONFIG, DEFAULT_ROUTING_POLICY, DatabaseWrapper, DoltClient, DoltNotInstalled, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, 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 };
21604
- //# sourceMappingURL=run-BErnJT9a.js.map
21611
+ //# sourceMappingURL=run-B_08vO01.js.map
@@ -1,4 +1,4 @@
1
- import { registerRunCommand, runRunAction } from "./run-BErnJT9a.js";
1
+ import { registerRunCommand, runRunAction } from "./run-B_08vO01.js";
2
2
  import "./logger-D2fS2ccL.js";
3
3
  import "./config-migrator-DtZW1maj.js";
4
4
  import "./helpers-BihqWgVe.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "substrate-ai",
3
- "version": "0.4.10",
3
+ "version": "0.4.11",
4
4
  "description": "Substrate — multi-agent orchestration daemon for AI coding agents",
5
5
  "type": "module",
6
6
  "license": "MIT",