mirror of
https://gh-proxy.org/https://github.com/klinsmaya/CLIProxyAPI.git
synced 2026-11-09 18:06:50 +08:00
feat(pluginhost): introduce browser-navigable plugin resources in Management API
- Added `resources` field in `management.register` for defining browser-accessible resources. - Updated examples and documentation to reflect resource-based paths under `/v0/resource/plugins/<pluginID>/...`. - Replaced legacy `GET` menu routes with resource-based implementations for consistent plugin behavior. - Enhanced request handling for resource paths, including proper response headers and streamlined test coverage.
This commit is contained in:
@@ -187,7 +187,9 @@ PUT /v0/management/plugins/{pluginID}/config
|
||||
PATCH /v0/management/plugins/{pluginID}/config
|
||||
```
|
||||
|
||||
Plugin-owned Management API routes are registered through `management.register` and handled through `management.handle`.
|
||||
Plugin-owned Management API routes are registered through the `routes` field of `management.register` and handled through `management.handle`.
|
||||
|
||||
Browser-navigable menu resources are registered through the `resources` field of `management.register`. CPA exposes those resources under `/v0/resource/plugins/<pluginID>/...`; for example, a plugin with ID `example` and resource path `/status` is served as `/v0/resource/plugins/example/status`.
|
||||
|
||||
## Trust Boundary
|
||||
|
||||
|
||||
Reference in New Issue
Block a user