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.
- package/dist/cli/index.js +19 -12
- 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")))
|
|
14027
|
-
|
|
14028
|
-
|
|
14029
|
-
|
|
14030
|
-
const
|
|
14031
|
-
|
|
14032
|
-
|
|
14033
|
-
const
|
|
14034
|
-
|
|
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
|
-
|
|
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");
|