feat: export the globe panel for MCP servers

MCP servers that compose Core's tools can now serve the globe panel:
@gods-eye-view/core/tools/panel exports createGlobePanelResource,
panelRuntime, GLOBE_PANEL_URI and PANEL_BASE. The local MCP server uses
the same entry point.
This commit is contained in:
Sameh Khamis committed 2026-10-03 21:17:47 -07:00
1 parent eaf81024d7
commit ee05e922c0
4 files changed
+28 -2

No files matched your search

+11
View File
@@ -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),
);
});
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/);
});
+12
View File
@@ -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';