mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-06 19:34:01 +00:00
Merge pull request #919 from bilawalsidhu/feat/export-globe-panel
feat: export the globe panel for MCP servers
This commit is contained in:
5 files changed
+37
-2
No files matched your search
@@ -255,6 +255,7 @@
|
|||||||
"./sources/map-features": "./src/sources/overpassFeatures.js",
|
"./sources/map-features": "./src/sources/overpassFeatures.js",
|
||||||
"./tools": "./src/tools/index.js",
|
"./tools": "./src/tools/index.js",
|
||||||
"./tools/mcp": "./src/tools/mcp/index.js",
|
"./tools/mcp": "./src/tools/mcp/index.js",
|
||||||
|
"./tools/panel": "./src/tools/panel.js",
|
||||||
"./tools/services": "./src/tools/services.js",
|
"./tools/services": "./src/tools/services.js",
|
||||||
"./view": "./src/view/index.js"
|
"./view": "./src/view/index.js"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3168,6 +3168,15 @@
|
|||||||
],
|
],
|
||||||
"external": []
|
"external": []
|
||||||
},
|
},
|
||||||
|
"tools-panel": {
|
||||||
|
"exports": ["./tools/panel"],
|
||||||
|
"modules": [
|
||||||
|
"src/tools/panel.js",
|
||||||
|
"src/tools/globePanel.js",
|
||||||
|
"src/app/globePanelRuntime.js"
|
||||||
|
],
|
||||||
|
"external": []
|
||||||
|
},
|
||||||
"tools-services": {
|
"tools-services": {
|
||||||
"exports": ["./tools/services"],
|
"exports": ["./tools/services"],
|
||||||
"modules": [
|
"modules": [
|
||||||
|
|||||||
@@ -7,8 +7,10 @@ import {
|
|||||||
coreTools,
|
coreTools,
|
||||||
catalogForSurface,
|
catalogForSurface,
|
||||||
} from '../../src/tools/index.js';
|
} from '../../src/tools/index.js';
|
||||||
import { panelRuntime } from '../../src/app/globePanelRuntime.js';
|
import {
|
||||||
import { createGlobePanelResource } from '../../src/tools/globePanel.js';
|
createGlobePanelResource,
|
||||||
|
panelRuntime,
|
||||||
|
} from '../../src/tools/panel.js';
|
||||||
import { createMcpServer } from '../../src/tools/mcp/index.js';
|
import { createMcpServer } from '../../src/tools/mcp/index.js';
|
||||||
import { DEFAULT_API_BASE, createLocalToolServices } from './services.js';
|
import { DEFAULT_API_BASE, createLocalToolServices } from './services.js';
|
||||||
|
|
||||||
|
|||||||
@@ -122,3 +122,14 @@ test('a view that only follows an aircraft is framed where the aircraft is', asy
|
|||||||
/not reported now/.test(error.message),
|
/not reported now/.test(error.message),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('the package exports the panel resource and its runtime together', async () => {
|
||||||
|
const panel = await import('gods-eye-view/tools/panel');
|
||||||
|
const resource = panel.createGlobePanelResource({
|
||||||
|
runtime: panel.panelRuntime,
|
||||||
|
panelKey: 'key',
|
||||||
|
});
|
||||||
|
assert.equal(resource.uri, panel.GLOBE_PANEL_URI);
|
||||||
|
assert.equal(panel.PANEL_BASE, '/panel/');
|
||||||
|
assert.match(resource.text, /panelRuntime|function/);
|
||||||
|
});
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
/**
|
||||||
|
* The MCP Apps globe panel for MCP servers that compose Core's tools: the
|
||||||
|
* panel resource and the script its page runs. A server serves the panel
|
||||||
|
* build at PANEL_BASE and passes the same key to the resource and to the
|
||||||
|
* tool services (see src/tools/services.js).
|
||||||
|
*/
|
||||||
|
export {
|
||||||
|
GLOBE_PANEL_URI,
|
||||||
|
PANEL_BASE,
|
||||||
|
createGlobePanelResource,
|
||||||
|
} from './globePanel.js';
|
||||||
|
export { panelRuntime } from '../app/globePanelRuntime.js';
|
||||||
Reference in new issue
Block a user