mio-agent-runtime 0.8.0 → 0.10.0

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/README.md CHANGED
@@ -74,6 +74,7 @@ mio task record-outcome --outcome success Record a task outcome (--yes to appl
74
74
  mio --json status Machine-readable status
75
75
  mio --json agents Machine-readable agents
76
76
  mio --json evolution status Machine-readable evolution module health
77
+ mio --version Print the version and exit (-V)
77
78
  ```
78
79
 
79
80
  ## MCP 工具
package/bin/mio.js CHANGED
@@ -2797,6 +2797,14 @@ function observeCommand(args) {
2797
2797
  observer.startForeground(MIO_HOME)
2798
2798
  }
2799
2799
 
2800
+ function versionCommand(useJson) {
2801
+ // Read from the package manifest so the installed copy reports its own version
2802
+ // instead of a hardcoded string that drifts on every release.
2803
+ const pkg = require('../package.json')
2804
+ if (useJson) console.log(JSON.stringify({ name: pkg.name, version: pkg.version }))
2805
+ else console.log(pkg.version)
2806
+ }
2807
+
2800
2808
  function help() {
2801
2809
  console.log(`Mio Agent Runtime CLI
2802
2810
 
@@ -2860,6 +2868,7 @@ Usage:
2860
2868
  mio --json status Machine-readable status
2861
2869
  mio --json agents Machine-readable agents
2862
2870
  mio --json evolution status Machine-readable evolution module health
2871
+ mio --version Print the version and exit (-V)
2863
2872
  `)
2864
2873
  }
2865
2874
 
@@ -2915,6 +2924,9 @@ async function main() {
2915
2924
  return digestCommand(args, useJson)
2916
2925
  case 'evolution':
2917
2926
  return evolutionCommand(args, useJson)
2927
+ case '--version':
2928
+ case '-V':
2929
+ return versionCommand(useJson)
2918
2930
  case 'help':
2919
2931
  case '--help':
2920
2932
  return help()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mio-agent-runtime",
3
- "version": "0.8.0",
3
+ "version": "0.10.0",
4
4
  "description": "Mio Agent Runtime installer and MCP intelligence layer",
5
5
  "license": "MIT",
6
6
  "type": "commonjs",
@@ -11,10 +11,24 @@
11
11
 
12
12
  const path = require('path')
13
13
 
14
+ // Same two-step resolution as server/runtime-modules.js: the published package
15
+ // first, then the workspace source. In a checkout the @akemi-mio/* packages are
16
+ // NOT linked into node_modules (there is no node_modules/@akemi-mio at all), so
17
+ // without the fallback every mio.insight.* tool stayed gated off even though the
18
+ // source sits right there in packages/insight. In a published install only the
19
+ // package exists, so the fallback never runs.
20
+ function loadInsight() {
21
+ try {
22
+ return require('@akemi-mio/insight')
23
+ } catch (_) {
24
+ return require(path.resolve(__dirname, '..', '..', 'insight'))
25
+ }
26
+ }
27
+
14
28
  let InsightStore = null
15
29
  let InsightGenerator = null
16
30
  try {
17
- const insight = require('@akemi-mio/insight')
31
+ const insight = loadInsight()
18
32
  InsightStore = insight.InsightStore
19
33
  InsightGenerator = insight.InsightGenerator
20
34
  } catch {}
@@ -17,10 +17,22 @@ const path = require('path')
17
17
  // Observer research pipeline (optional -- installed via @akemi-mio/observer).
18
18
  // Loaded lazily at module level so the CLI can report availability without the
19
19
  // MCP server having to pass its own handles down.
20
+ // Two-step resolution, same as server/runtime-modules.js and insight-store.js:
21
+ // the published package first, then the workspace source. A checkout has no
22
+ // node_modules/@akemi-mio, so without the fallback the whole mio.observer.*
23
+ // family stays gated off while its source is sitting in packages/observer.
24
+ function loadObserver() {
25
+ try {
26
+ return require('@akemi-mio/observer')
27
+ } catch (_) {
28
+ return require(path.resolve(__dirname, '..', '..', 'observer'))
29
+ }
30
+ }
31
+
20
32
  let ObserverStore = null
21
33
  let ObserverService = null
22
34
  try {
23
- const obs = require('@akemi-mio/observer')
35
+ const obs = loadObserver()
24
36
  ObserverStore = obs.ObserverStore
25
37
  ObserverService = obs.ObserverService
26
38
  } catch {}