Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

@sms/plugin-admin-api

Interfaces

AdminApiOptions

Defined in: packages/plugins/admin-api/src/index.ts:15

Properties

prefix?
optional prefix?: string;

Defined in: packages/plugins/admin-api/src/index.ts:22

Route prefix. Default /api.

token?
optional token?: string;

Defined in: packages/plugins/admin-api/src/index.ts:20

Bearer token (or x-admin-token header) required on mutating routes. Without it — and without any admin-authorizer contribution — those routes are open: local development only.

Variables

ADMIN_ROUTES

const ADMIN_ROUTES: readonly ["GET  {p}/state           plugins, pending approvals, collections, points, keys, routes, schedules", "GET  {p}/catalog         what the agent sees: keys, extension points, contributions", "POST {p}/chat            { session?, text } → { reply, steps }            [token]", "POST {p}/chat/stream     { session?, text } → SSE of agent events         [token]", "GET  {p}/chat/:session   message history", "POST {p}/plugins/:id/enable | /disable                                    [token]", "DELETE {p}/plugins/:id   uninstall an agent plugin                        [token]", "POST {p}/approvals/:id/approve | /reject   { by? }                        [token]", "GET  {p}/events?limit=   audit log, newest first"];

Defined in: packages/plugins/admin-api/src/contract.ts:9

Functions

createAdminApiPlugin()

function createAdminApiPlugin(opts?): SystemPlugin;

Defined in: packages/plugins/admin-api/src/index.ts:44

Parameters

ParameterType
optsAdminApiOptions

Returns

SystemPlugin

References

ADMIN_AUTHORIZER_POINT

Re-exports ADMIN_AUTHORIZER_POINT


AdminAuthorizer

Re-exports AdminAuthorizer