mikser-io 7.8.0 → 7.8.1
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/src/engine.js +4 -2
- package/src/mcp.js +8 -2
- package/src/plugins/api.js +7 -2
- package/src/plugins/preview.js +6 -1
package/package.json
CHANGED
package/src/engine.js
CHANGED
|
@@ -250,11 +250,13 @@ export async function setup(options) {
|
|
|
250
250
|
// plugin's router falls through to the static handler and
|
|
251
251
|
// gets served from <outputFolder>.
|
|
252
252
|
runtime.options.app.use(express.static(runtime.options.outputFolder))
|
|
253
|
-
logger.info('Serving %s
|
|
253
|
+
logger.info('Serving %s at http://localhost:%d/',
|
|
254
|
+
runtime.options.outputFolder.replace(runtime.options.workingFolder + '/', ''),
|
|
255
|
+
runtime.options.port)
|
|
254
256
|
|
|
255
257
|
await new Promise(resolve => {
|
|
256
258
|
runtime.options.app.listen(runtime.options.port, () => {
|
|
257
|
-
logger.info('Server listening
|
|
259
|
+
logger.info('Server listening: http://localhost:%d', runtime.options.port)
|
|
258
260
|
resolve()
|
|
259
261
|
})
|
|
260
262
|
})
|
package/src/mcp.js
CHANGED
|
@@ -473,10 +473,16 @@ function mountEndpoint(app, substrate, path, ep, endpointName) {
|
|
|
473
473
|
const authLabel = ep.token
|
|
474
474
|
? 'token'
|
|
475
475
|
: (ep.allowRemote ? 'public, REMOTE OPEN' : 'public, loopback-only')
|
|
476
|
+
// Print as a full URL when we know the port so the operator can
|
|
477
|
+
// copy/click straight from the log. Falls back to bare path for
|
|
478
|
+
// external-app setups where the engine doesn't own the listener.
|
|
479
|
+
const location = runtime.options.port
|
|
480
|
+
? `http://localhost:${runtime.options.port}${path}`
|
|
481
|
+
: path
|
|
476
482
|
if (endpointName) {
|
|
477
|
-
logger.info('MCP endpoint mounted: %s (tools=[%s] [%s])',
|
|
483
|
+
logger.info('MCP endpoint mounted: %s (tools=[%s] [%s])', location, toolsLabel, authLabel)
|
|
478
484
|
} else {
|
|
479
|
-
logger.info('MCP mounted: %s [%s]',
|
|
485
|
+
logger.info('MCP mounted: %s [%s]', location, authLabel)
|
|
480
486
|
}
|
|
481
487
|
}
|
|
482
488
|
}
|
package/src/plugins/api.js
CHANGED
|
@@ -637,8 +637,13 @@ export default ({
|
|
|
637
637
|
const authLabel = ep.token
|
|
638
638
|
? 'token'
|
|
639
639
|
: (ep.allowRemote ? 'public, REMOTE OPEN' : 'public, loopback-only')
|
|
640
|
-
|
|
641
|
-
|
|
640
|
+
// Full URL when the engine owns the listener (port is known).
|
|
641
|
+
// Falls back to the path alone for external-app setups.
|
|
642
|
+
const location = runtime.options.port
|
|
643
|
+
? `http://localhost:${runtime.options.port}${base}/${name}`
|
|
644
|
+
: `${base}/${name}`
|
|
645
|
+
logger.info('Api endpoint mounted: %s (ops=[%s] [%s])',
|
|
646
|
+
location, [...allowedOps].join(','), authLabel)
|
|
642
647
|
}
|
|
643
648
|
|
|
644
649
|
// MCP tool registrations. MCP is in-process: whoever can reach
|
package/src/plugins/preview.js
CHANGED
|
@@ -124,7 +124,12 @@ export default ({
|
|
|
124
124
|
}
|
|
125
125
|
res.type(entry.mime).send(entry.bytes)
|
|
126
126
|
})
|
|
127
|
-
|
|
127
|
+
// Full URL when port is known; bare path otherwise. The /:filename
|
|
128
|
+
// segment is left off — it's filled at request time per preview.
|
|
129
|
+
const location = runtime.options.port
|
|
130
|
+
? `http://localhost:${runtime.options.port}${cfg.path}`
|
|
131
|
+
: cfg.path
|
|
132
|
+
logger.info('Preview route mounted: %s (cache cap: %d MB)', location, Math.round(cfg.maxBytes / 1024 / 1024))
|
|
128
133
|
})
|
|
129
134
|
|
|
130
135
|
// Gating on runtime.options.mcp inside onLoaded matches the route-
|