mio-agent-runtime 0.13.1 → 0.13.2

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/bin/mio.js CHANGED
@@ -1884,6 +1884,9 @@ function printObserverPipeline(result) {
1884
1884
  }
1885
1885
  if (!result.completed) {
1886
1886
  console.log(`Observer pipeline did not complete: ${result.reason || 'unknown reason'}`)
1887
+ // Show what the run actually produced, so a failing exit code is diagnosable
1888
+ // instead of a bare "unknown reason".
1889
+ console.log(` sections=${result.sections || 0} topic=${result.topic || 'none'} insight=${result.insightId || 'none'}`)
1887
1890
  process.exitCode = 1
1888
1891
  return
1889
1892
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mio-agent-runtime",
3
- "version": "0.13.1",
3
+ "version": "0.13.2",
4
4
  "description": "Mio Agent Runtime installer and MCP intelligence layer",
5
5
  "license": "MIT",
6
6
  "type": "commonjs",
@@ -33,7 +33,7 @@
33
33
  "@akemi-mio/evolution-strategy": "^0.1.0",
34
34
  "@akemi-mio/evolution-safety": "^0.1.0",
35
35
  "@akemi-mio/evolution-scheduler": "^0.1.0",
36
- "@akemi-mio/observer": "^0.1.1",
36
+ "@akemi-mio/observer": "^0.1.2",
37
37
  "@akemi-mio/insight": "^0.1.0"
38
38
  },
39
39
  "main": "index.js",
@@ -306,12 +306,22 @@ function createObserverStore(options = {}) {
306
306
  }
307
307
  }
308
308
  const payload = envelope.payload || {}
309
+ // dagState.state is COMPLETED on @akemi-mio/observer >= 0.1.2, which marks the
310
+ // dag COMPLETED *before* publishInsight snapshots it into the envelope.
311
+ // Older producers published while the dag still said STORED even though the
312
+ // run had in fact finished, and a strict COMPLETED check turned every success
313
+ // into completed:false (D5). This branch only exists when publishing
314
+ // succeeded, so STORED counts as completed; anything else is a real failure
315
+ // and must carry a reason, otherwise the CLI can only print "unknown reason".
316
+ const state = envelope.dagState ? envelope.dagState.state : null
317
+ const completed = state === 'COMPLETED' || state === 'STORED'
309
318
  return {
310
319
  dryRun: false,
311
320
  baseDir,
312
321
  mode,
313
322
  ran: true,
314
- completed: envelope.dagState && envelope.dagState.state === 'COMPLETED',
323
+ completed,
324
+ ...(completed ? {} : { reason: `unexpected dag state: ${state || 'missing'} (expected COMPLETED)` }),
315
325
  type: envelope.type,
316
326
  taskId: envelope.dagState ? envelope.dagState.taskId : null,
317
327
  topic: payload.topic || null,