mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 10:53:59 +00:00
Load the God's Eye View panel through the MCP server
Hosts serve panels from their own sites and may refuse other addresses; Codex refuses any address on the user's machine. The panel now never requests the app's server: it loads the app's panel build and data through panel_request, a tool only the panel may call, which requests the path from the app's server. One path in every host; only map providers load directly. npm run build:panel writes the panel build to dist/panel, served at /panel/: one app script, one stylesheet, Cesium's script, and Cesium's workers as one script Cesium runs from memory. Tools may now be marked app-only. The panel CORS rules are gone.
This commit is contained in:
1 parent
b11d54d8b8
commit
996b95eb45
20 files changed
+1265
-437
No files matched your search
@@ -3,7 +3,7 @@
|
||||
* factories and the application request services. `fetchImpl` must resolve
|
||||
* the sources' relative `/api/...` paths; in a browser the page's own fetch
|
||||
* does, and elsewhere a caller supplies a resolving fetch. `appUrl` is the
|
||||
* address the app is served from.
|
||||
* address the app is served from; `app.fetch` requests the app's own paths.
|
||||
*/
|
||||
|
||||
import { createAlprTileSource } from '../layers/alpr/source.js';
|
||||
@@ -45,7 +45,7 @@ export function createToolServices({ fetchImpl, appUrl }) {
|
||||
throw new TypeError('A fetch implementation is required');
|
||||
const requests = createApplicationRequestServices({ fetchImpl });
|
||||
return {
|
||||
app: { baseUrl: appUrl },
|
||||
app: { baseUrl: appUrl, fetch: fetchImpl },
|
||||
earthquakes: createUsgsEarthquakeSource({ fetchImpl }),
|
||||
fires: createFirmsSource({ fetchImpl }),
|
||||
launches: createLaunchSource({ fetchImpl }),
|
||||
|
||||
Reference in new issue
Block a user