substrate-ai 0.20.72 → 0.20.73

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.
Files changed (2) hide show
  1. package/dist/cli/index.js +19 -12
  2. package/package.json +1 -1
package/dist/cli/index.js CHANGED
@@ -14023,20 +14023,27 @@ async function runReportAction(options) {
14023
14023
  return 1;
14024
14024
  }
14025
14025
  const statePath = join(dbRoot, ".substrate", "state");
14026
- if (existsSync$1(join(statePath, ".dolt"))) try {
14027
- const doltClient = new DoltClient({ repoPath: statePath });
14028
- const storyKeys = Object.keys(manifest.per_story_state);
14029
- if (storyKeys.length > 0) {
14030
- const placeholders = storyKeys.map(() => "?").join(", ");
14031
- const rows = await doltClient.query(`SELECT story_key, completed_at FROM wg_stories WHERE story_key IN (${placeholders})`, storyKeys);
14032
- for (const row of rows) {
14033
- const state = manifest.per_story_state[row.story_key];
14034
- if (state && !state.completed_at && row.completed_at) state.completed_at = row.completed_at;
14026
+ if (existsSync$1(join(statePath, ".dolt"))) {
14027
+ let doltClient = null;
14028
+ try {
14029
+ doltClient = new DoltClient({ repoPath: statePath });
14030
+ const storyKeys = Object.keys(manifest.per_story_state);
14031
+ if (storyKeys.length > 0) {
14032
+ const placeholders = storyKeys.map(() => "?").join(", ");
14033
+ const rows = await doltClient.query(`SELECT story_key, completed_at FROM wg_stories WHERE story_key IN (${placeholders})`, storyKeys);
14034
+ for (const row of rows) {
14035
+ const state = manifest.per_story_state[row.story_key];
14036
+ if (state && !state.completed_at && row.completed_at) state.completed_at = row.completed_at;
14037
+ }
14038
+ logger$1.debug({ storyCount: rows.length }, "Dolt wg_stories enrichment applied");
14035
14039
  }
14036
- logger$1.debug({ storyCount: rows.length }, "Dolt wg_stories enrichment applied");
14040
+ } catch (err) {
14041
+ logger$1.debug({ err }, "Dolt enrichment unavailable — using manifest-only data (degraded mode)");
14042
+ } finally {
14043
+ if (doltClient !== null) await doltClient.close().catch((err) => {
14044
+ logger$1.debug({ err }, "DoltClient.close() failed — non-fatal");
14045
+ });
14037
14046
  }
14038
- } catch (err) {
14039
- logger$1.debug({ err }, "Dolt enrichment unavailable — using manifest-only data (degraded mode)");
14040
14047
  }
14041
14048
  const halts = await readNotificationsForRun(resolvedRunId, dbRoot).catch((err) => {
14042
14049
  logger$1.debug({ err }, "notification read failed — continuing without halt data");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "substrate-ai",
3
- "version": "0.20.72",
3
+ "version": "0.20.73",
4
4
  "description": "Substrate — multi-agent orchestration daemon for AI coding agents",
5
5
  "type": "module",
6
6
  "license": "MIT",