Skip to content

Feature/http routes - #36

Merged
mattvb91 merged 6 commits into
devfrom
feature/http-routes
Nov 10, 2026
Merged

mattvb91 merged 6 commits into
devfrom
feature/http-routes

Conversation

@mattvb91

Copy link
Copy Markdown
Member

No description provided.

@mattvb91
mattvb91 merged commit 2e49a85 into dev Nov 10, 2026
2 checks passed
@mattvb91
mattvb91 deleted the feature/http-routes branch November 10, 2026 19:26
GET /api/game/routes lists every route of the game server, read from the
Express app when asked: method, path, path parameters, whether the
engine, the game or a plugin registered it, and whether it only exists
in development. Plugins are told apart by wrapping their setup and http
hooks. Routes say what they do with describeRoute(), which is optional;
the engine's own routes are described.

The CLI dashboard gets a Routes tab and the editor a Server tab in the
bottom dock, both showing that list as a table.
The activity bar now switches between the scene editor and the server's
endpoint list, which takes the whole area next to the bar instead of a
tab in the bottom dock. It is laid over the editor, so the viewport and
the docks keep their state. The placeholder icons that did nothing are
gone.
The activity bar gets a third entry that lists the plugins in the
project's mavonengine.json: version, target, description, license,
supported engine range and readme, plus the HTTP endpoints and prefabs
that come from each one. Plugins that are missing or invalid are listed
with the reason.

The details come from a new dev server endpoint, GET
/__mavonengine/plugins, which reads the config and the packages from
disk on every request. Endpoints come from the game server's route
list and prefabs from the editor's registry.

Readmes are rendered by a small Markdown renderer that builds React
elements, drops HTML and loads no images.
GET /api/game/plugins lists the plugins of the server's project: every
plugin in mavonengine.json with its version, target and prefabs, plus
plugins passed to the server directly, and whether each one's server
entry is running. Readmes are left out; the dev server still sends them
to the editor.

The dashboard fetches the list together with the routes and shows it on
a sixth tab: a table of the plugins, and for the selected one its
details, prefabs and the HTTP endpoints it registered.
…d and editor

plugins.json at the repository root lists the plugins anyone can
install, starting with @mavonengine/http-monitoring. It is read from
the main branch on GitHub whenever it is asked for:

- `mavonengine plugins` prints it, marking what the project has
- the dashboard's Plugins tab and the editor's Plugins view show the
  plugins the project doesn't have yet
- the editor shows an available plugin's readme, fetched from the
  `readme` URL the list gives for it

Under `mavonengine dev` those plugins, and from the editor any other
package, can be installed without leaving the tool. `mavonengine dev`
runs the install, adds plugins to mavonengine.json and restarts the dev
script. The editor reaches it through the Vite dev server, which takes
install requests only from localhost and from the game's own page, and
refuses anything a shell could read as more than a package.

Both ask first: installing a package runs its code on the machine, so
the dialog says so, links to the source and wants a confirmation that
it was checked.
The name follows the connection in a message of its own. The test read
the server's players once, right after the browser said it was
connected, and failed when the server had the player but not yet its
name. It now asks again until the name is there, and says which names
it got when it isn't.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant