@infinitedusky/indusk-mcp 1.24.2 → 1.24.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.
@@ -125,6 +125,7 @@ export function runEvaluatorBackground(opts) {
125
125
  scorecardText = extracted;
126
126
  }
127
127
  const scorecard = JSON.parse(scorecardText.trim());
128
+ scorecard.timestamp = new Date().toISOString();
128
129
  if (usage)
129
130
  scorecard.usage = usage;
130
131
  scorecard.telemetryPosted = false;
@@ -245,6 +246,7 @@ async function runEvaluatorSyncInner(opts, projectGroup) {
245
246
  scorecardText = extracted;
246
247
  }
247
248
  const scorecard = JSON.parse(scorecardText.trim());
249
+ scorecard.timestamp = new Date().toISOString();
248
250
  if (syncUsage)
249
251
  scorecard.usage = syncUsage;
250
252
  scorecard.telemetryPosted = false;
@@ -46,7 +46,15 @@ export function markFinding(projectRoot, key, state) {
46
46
  export function ingestScorecard(projectRoot, scorecard) {
47
47
  const findings = readFindings(projectRoot);
48
48
  let added = 0;
49
- for (const q of scorecard.questions) {
49
+ // Defensive: the model occasionally returns a scorecard with a missing,
50
+ // null, or non-array `questions` field (it invents its own schema). The
51
+ // outer wrapper has already written the (wrong-shape) scorecard to
52
+ // results.log by this point — if we throw here, a misleading `error: true`
53
+ // entry lands right after, falsely implying the scorecard was lost.
54
+ // Tolerate the malformed shape silently; downstream consumers can still
55
+ // see the raw scorecard in results.log.
56
+ const questions = Array.isArray(scorecard.questions) ? scorecard.questions : [];
57
+ for (const q of questions) {
50
58
  if (q.answer === "yes")
51
59
  continue; // no finding for passing questions
52
60
  const key = `${scorecard.changeId}:${q.id}`;
@@ -242,6 +242,11 @@ Output ONLY the JSON scorecard as before — no commentary.`;
242
242
  return out;
243
243
  });
244
244
  const scorecard = JSON.parse(parsed.scorecardText.trim());
245
+ // Override the model-supplied timestamp with actual completion time.
246
+ // The model doesn't know the real current time and tends to round to
247
+ // 5-minute marks (e.g. 18:25:00). Use Date.now() so timestamps are
248
+ // accurate to the second.
249
+ scorecard.timestamp = new Date().toISOString();
245
250
  if (parsed.usage)
246
251
  scorecard.usage = parsed.usage;
247
252
  scorecard.telemetryPosted = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infinitedusky/indusk-mcp",
3
- "version": "1.24.2",
3
+ "version": "1.24.4",
4
4
  "description": "InDusk development system — skills, MCP tools, and CLI for structured AI-assisted development",
5
5
  "type": "module",
6
6
  "files": [