mio-agent-runtime 0.8.0 → 0.9.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/package.json +1 -1
- package/server/insight-store.js +15 -1
- package/server/observer-store.js +13 -1
package/package.json
CHANGED
package/server/insight-store.js
CHANGED
|
@@ -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 =
|
|
31
|
+
const insight = loadInsight()
|
|
18
32
|
InsightStore = insight.InsightStore
|
|
19
33
|
InsightGenerator = insight.InsightGenerator
|
|
20
34
|
} catch {}
|
package/server/observer-store.js
CHANGED
|
@@ -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 =
|
|
35
|
+
const obs = loadObserver()
|
|
24
36
|
ObserverStore = obs.ObserverStore
|
|
25
37
|
ObserverService = obs.ObserverService
|
|
26
38
|
} catch {}
|