substrate-ai 0.19.38 → 0.19.40

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, 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, getRunningPipelineRuns, getSessionCostSummary, getSessionCostSummaryFiltered, getStoryMetricsForRun, getTokenUsageSummary, incrementRunRestarts, initSchema, initializeDolt, listRunMetrics, loadParentRunDecisions, supersedeDecision, tagRunAsBaseline, updatePipelineRun } from "../dist-BUcEqXA1.js";
6
6
  import "../adapter-registry-DXLMTmfD.js";
7
- import { AdapterTelemetryPersistence, AppError, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, EpicIngester, GitClient, GrammarLoader, RepoMapInjector, RepoMapModule, RepoMapQueryEngine, RepoMapStorage, SymbolParser, createContextCompiler, createDispatcher, createEventEmitter, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStopAfterGate, createTelemetryAdvisor, formatPhaseCompletionSummary, getFactoryRunSummaries, getScenarioResultsForRun, getTwinRunsForRun, listGraphRuns, registerExportCommand, registerFactoryCommand, registerRunCommand, registerScenariosCommand, resolveStoryKeys, runAnalysisPhase, runPlanningPhase, runSolutioningPhase, validateStopAfterFromConflict } from "../run-D_863wfb.js";
7
+ import { AdapterTelemetryPersistence, AppError, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, EpicIngester, GitClient, GrammarLoader, RepoMapInjector, RepoMapModule, RepoMapQueryEngine, RepoMapStorage, SymbolParser, createContextCompiler, createDispatcher, createEventEmitter, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStopAfterGate, createTelemetryAdvisor, formatPhaseCompletionSummary, getFactoryRunSummaries, getScenarioResultsForRun, getTwinRunsForRun, listGraphRuns, registerExportCommand, registerFactoryCommand, registerRunCommand, registerScenariosCommand, resolveStoryKeys, runAnalysisPhase, runPlanningPhase, runSolutioningPhase, validateStopAfterFromConflict } from "../run-2OJcvfpA.js";
8
8
  import "../errors-BZnrgeyp.js";
9
9
  import "../routing-CcBOCuC9.js";
10
10
  import "../decisions-C0pz9Clx.js";
@@ -25,7 +25,7 @@ import { randomUUID } from "node:crypto";
25
25
  import { z } from "zod";
26
26
  import * as fs from "node:fs/promises";
27
27
  import { access as access$1, readFile as readFile$1, readdir as readdir$1 } from "node:fs/promises";
28
- import { appendFileSync, chmodSync, cpSync, existsSync as existsSync$1, mkdirSync as mkdirSync$1, readFileSync as readFileSync$1, readdirSync as readdirSync$1, realpathSync, rmSync as rmSync$1, statSync, unlinkSync as unlinkSync$1, writeFileSync as writeFileSync$1 } from "fs";
28
+ import { appendFileSync, chmodSync, cpSync, existsSync as existsSync$1, mkdirSync as mkdirSync$1, readFileSync as readFileSync$1, readdirSync as readdirSync$1, realpathSync as realpathSync$1, rmSync as rmSync$1, statSync, unlinkSync as unlinkSync$1, writeFileSync as writeFileSync$1 } from "fs";
29
29
  import { homedir } from "os";
30
30
  import { createRequire } from "node:module";
31
31
  import { fileURLToPath as fileURLToPath$1 } from "node:url";
@@ -4833,7 +4833,7 @@ async function runSupervisorAction(options, deps = {}) {
4833
4833
  await initSchema(expAdapter);
4834
4834
  const { runRunAction: runPipeline } = await import(
4835
4835
  /* @vite-ignore */
4836
- "../run-mGdGxU_1.js"
4836
+ "../run-XIj_0pbw.js"
4837
4837
  );
4838
4838
  const runStoryFn = async (opts) => {
4839
4839
  const exitCode = await runPipeline({
@@ -8646,7 +8646,7 @@ async function main() {
8646
8646
  const __cli_filename = fileURLToPath(import.meta.url);
8647
8647
  const isMainModule = (() => {
8648
8648
  try {
8649
- return realpathSync(process.argv[1]) === realpathSync(__cli_filename);
8649
+ return realpathSync$1(process.argv[1]) === realpathSync$1(__cli_filename);
8650
8650
  } catch {
8651
8651
  return false;
8652
8652
  }
@@ -7,14 +7,14 @@ import { access, readFile, readdir, stat } from "fs/promises";
7
7
  import { EventEmitter } from "node:events";
8
8
  import yaml from "js-yaml";
9
9
  import * as actualFS from "node:fs";
10
- import { accessSync, existsSync, mkdirSync, readFileSync, readdirSync, rmSync, unlinkSync, unwatchFile, watchFile, writeFileSync } from "node:fs";
10
+ import { accessSync, existsSync, mkdirSync, readFileSync, readdirSync, realpathSync, rmSync, unlinkSync, unwatchFile, watchFile, writeFileSync } from "node:fs";
11
11
  import { exec, execFile, execSync, spawn } from "node:child_process";
12
12
  import path, { basename as basename$1, dirname as dirname$1, extname as extname$1, isAbsolute, join as join$1, posix, resolve as resolve$1, win32 } from "node:path";
13
13
  import { tmpdir } from "node:os";
14
14
  import { createHash, randomUUID } from "node:crypto";
15
15
  import { z } from "zod";
16
16
  import { access as access$1, lstat, mkdir as mkdir$1, readFile as readFile$1, readdir as readdir$1, readlink, realpath, stat as stat$1, unlink, writeFile as writeFile$1 } from "node:fs/promises";
17
- import { existsSync as existsSync$1, lstatSync, mkdirSync as mkdirSync$1, readFileSync as readFileSync$1, readdir as readdir$2, readdirSync as readdirSync$1, readlinkSync, realpathSync, unlinkSync as unlinkSync$1, writeFileSync as writeFileSync$1 } from "fs";
17
+ import { existsSync as existsSync$1, lstatSync, mkdirSync as mkdirSync$1, readFileSync as readFileSync$1, readdir as readdir$2, readdirSync as readdirSync$1, readlinkSync, realpathSync as realpathSync$1, unlinkSync as unlinkSync$1, writeFileSync as writeFileSync$1 } from "fs";
18
18
  import { promisify } from "node:util";
19
19
  import { fileURLToPath } from "node:url";
20
20
  import { execFile as execFile$1, spawn as spawn$1 } from "child_process";
@@ -11552,6 +11552,7 @@ function createImplementationOrchestrator(deps) {
11552
11552
  if (!_phaseEndMs.has(storyKey)) _phaseEndMs.set(storyKey, new Map());
11553
11553
  _phaseEndMs.get(storyKey).set(phase, Date.now());
11554
11554
  _completedDispatches++;
11555
+ recordDispatchAgent(storyKey, phase, agentId ?? "claude-code");
11555
11556
  }
11556
11557
  function incrementDispatches(storyKey) {
11557
11558
  _storyDispatches.set(storyKey, (_storyDispatches.get(storyKey) ?? 0) + 1);
@@ -11642,7 +11643,7 @@ function createImplementationOrchestrator(deps) {
11642
11643
  cost_usd: tokenAgg.cost,
11643
11644
  review_cycles: reviewCycles,
11644
11645
  dispatches: _storyDispatches.get(storyKey) ?? 0,
11645
- primary_agent_id: storyAgentId ?? agentId ?? void 0,
11646
+ primary_agent_id: storyAgentId ?? agentId ?? "claude-code",
11646
11647
  dispatch_agents_json: _storyAgents.has(storyKey) ? JSON.stringify(_storyAgents.get(storyKey)) : void 0
11647
11648
  });
11648
11649
  if (stateStore !== void 0) stateStore.recordMetric({
@@ -18360,13 +18361,28 @@ const logger$2 = createLogger("mesh-reporter");
18360
18361
  let _cachedVersion;
18361
18362
  function getSubstrateVersion() {
18362
18363
  if (_cachedVersion !== void 0) return _cachedVersion;
18364
+ const candidates = [];
18363
18365
  try {
18364
18366
  const __dirname = dirname$1(fileURLToPath(import.meta.url));
18365
- const pkg = JSON.parse(readFileSync(join$1(__dirname, "..", "..", "..", "package.json"), "utf-8"));
18366
- _cachedVersion = pkg.version;
18367
- } catch {
18368
- _cachedVersion = "unknown";
18367
+ candidates.push(join$1(__dirname, "..", "..", "..", "package.json"));
18368
+ } catch {}
18369
+ if (process.argv[1]) {
18370
+ let cliPath = process.argv[1];
18371
+ try {
18372
+ cliPath = realpathSync(cliPath);
18373
+ } catch {}
18374
+ const cliDir = dirname$1(cliPath);
18375
+ candidates.push(join$1(cliDir, "..", "package.json"));
18376
+ candidates.push(join$1(cliDir, "..", "..", "package.json"));
18369
18377
  }
18378
+ for (const candidate of candidates) try {
18379
+ const pkg = JSON.parse(readFileSync(candidate, "utf-8"));
18380
+ if (pkg.version && (pkg.name === "substrate-ai" || pkg.name === "substrate")) {
18381
+ _cachedVersion = pkg.version;
18382
+ return _cachedVersion;
18383
+ }
18384
+ } catch {}
18385
+ _cachedVersion = "unknown";
18370
18386
  return _cachedVersion;
18371
18387
  }
18372
18388
  async function loadVerificationResults(runId, runsDir) {
@@ -36596,13 +36612,13 @@ while (this[FLUSHCHUNK](this[BUFFERSHIFT]()) && this[BUFFER].length);
36596
36612
 
36597
36613
  //#endregion
36598
36614
  //#region node_modules/path-scurry/dist/esm/index.js
36599
- const realpathSync$1 = realpathSync.native;
36615
+ const realpathSync$2 = realpathSync$1.native;
36600
36616
  const defaultFS = {
36601
36617
  lstatSync,
36602
36618
  readdir: readdir$2,
36603
36619
  readdirSync: readdirSync$1,
36604
36620
  readlinkSync,
36605
- realpathSync: realpathSync$1,
36621
+ realpathSync: realpathSync$2,
36606
36622
  promises: {
36607
36623
  lstat,
36608
36624
  readdir: readdir$1,
@@ -42733,4 +42749,4 @@ function registerRunCommand(program, _version = "0.0.0", projectRoot = process.c
42733
42749
 
42734
42750
  //#endregion
42735
42751
  export { AdapterTelemetryPersistence, AppError, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, EpicIngester, GitClient, GrammarLoader, RepoMapInjector, RepoMapModule, RepoMapQueryEngine, RepoMapStorage, SymbolParser, createContextCompiler, createDispatcher, createEventEmitter, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStopAfterGate, createTelemetryAdvisor, formatPhaseCompletionSummary, getFactoryRunSummaries, getScenarioResultsForRun, getTwinRunsForRun, listGraphRuns, normalizeGraphSummaryToStatus, registerExportCommand, registerFactoryCommand, registerRunCommand, registerScenariosCommand, resolveMaxReviewCycles, resolveStoryKeys, runAnalysisPhase, runPlanningPhase, runRunAction, runSolutioningPhase, validateStopAfterFromConflict, wireNdjsonEmitter };
42736
- //# sourceMappingURL=run-D_863wfb.js.map
42752
+ //# sourceMappingURL=run-2OJcvfpA.js.map
@@ -2,7 +2,7 @@ import "./health-DMu0MJ-N.js";
2
2
  import "./logger-KeHncl-f.js";
3
3
  import "./helpers-CElYrONe.js";
4
4
  import "./dist-BUcEqXA1.js";
5
- import { normalizeGraphSummaryToStatus, registerRunCommand, resolveMaxReviewCycles, runRunAction, wireNdjsonEmitter } from "./run-D_863wfb.js";
5
+ import { normalizeGraphSummaryToStatus, registerRunCommand, resolveMaxReviewCycles, runRunAction, wireNdjsonEmitter } from "./run-2OJcvfpA.js";
6
6
  import "./routing-CcBOCuC9.js";
7
7
  import "./decisions-C0pz9Clx.js";
8
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "substrate-ai",
3
- "version": "0.19.38",
3
+ "version": "0.19.40",
4
4
  "description": "Substrate — multi-agent orchestration daemon for AI coding agents",
5
5
  "type": "module",
6
6
  "license": "MIT",