Expand description
Admin API endpoints for policy CRUD, plus catalogs of available plugin
types and on-disk scripts. Policy mutations rewrite the in-memory gateway
config and trigger validation + graph recompilation via SharedState::reload.
Functionsยง
- delete_
policy ๐ DELETE /api/policies/{name}โ removes the named policy, then revalidates and recompiles. Returns{"status": "deleted"}on success.- get_
policy ๐ GET /api/policies/{name}โ returns the named policy as JSON.- list_
plugin_ ๐types GET /api/pluginsโ returns the static catalog of node/plugin types (type id + human-readable description) that the UIโs node-graph editor offers in its palette. Always200 OK.- list_
policies ๐ GET /api/policiesโ returns all configured policies as a JSON array.- list_
scripts ๐ GET /api/scriptsโ lists scripted-plugin files found in theplugins/directory next to the config directory (currently.luaonly).- plugin_
catalog ๐ - The palette catalog:
(type, description)for every registered node type. - router
- Builds the router for
/api/policies,/api/plugins, and/api/scripts. - update_
policy ๐ PUT /api/policies/{name}โ upserts a policy from the JSON body (the path name overrides any name in the body), then revalidates and recompiles all route graphs. Returns{"status": "updated"}on success.- validate_
policy ๐ POST /api/policies/validateโ validates + compiles a policy against the live supernodes, plugin configs and stores, without persisting it. Body is the policy definition itself ({"nodes": [...], "edges": [...], ...}); anameis optional and, if absent, is not saved anywhere. Mirrors the MCPvalidate_policytool so a human in the UI and an agent driving the gateway see the same verdict.