getEndpoints method

List<ServerEndpoint> getEndpoints()

Returns the list of registered API endpoints.

Implementation

List<ServerEndpoint> getEndpoints() => const [
  ServerEndpoint(
    path: '/api/chat',
    method: HttpMethod.post,
    description: 'Send a message and receive a streaming response.',
  ),
  ServerEndpoint(
    path: '/api/status',
    method: HttpMethod.get,
    description: 'Server health and session info.',
  ),
  ServerEndpoint(
    path: '/api/sessions',
    method: HttpMethod.get,
    description: 'List active sessions.',
  ),
  ServerEndpoint(
    path: '/api/sessions',
    method: HttpMethod.post,
    description: 'Create a new session.',
  ),
  ServerEndpoint(
    path: '/api/sessions/:id',
    method: HttpMethod.delete,
    description: 'End an active session.',
  ),
  ServerEndpoint(
    path: '/api/tools',
    method: HttpMethod.get,
    description: 'List available tools.',
  ),
  ServerEndpoint(
    path: '/api/tools/:name',
    method: HttpMethod.post,
    description: 'Execute a tool directly.',
  ),
  ServerEndpoint(
    path: '/api/config',
    method: HttpMethod.get,
    description: 'Get current configuration.',
  ),
  ServerEndpoint(
    path: '/api/config',
    method: HttpMethod.put,
    description: 'Update configuration.',
  ),
  ServerEndpoint(
    path: '/api/ws',
    method: HttpMethod.get,
    description: 'WebSocket upgrade for streaming.',
  ),
];