Skip to main content
Neuron favors small interfaces discovered through runtime inventory. Choose the extension point that matches the protocol boundary.

HTTP resources

Register one owned resource during module startup and unregister that same instance during shutdown. Declare supported methods, authentication schemes, user-session use, content negotiation, and synchronous/asynchronous behavior explicitly. Parse and bound the request before reading large bodies or contacting other services. For application-style APIs, the Neuron HTTP Router adds controllers, nested routes, binding, middleware, authorization, and generated OpenAPI. Keep controllers thin and place business policy behind services.

Agent resources

The Agent module discovers IAgentResource implementations and registers them below /Agent. Existing endpoint classes are the executable pattern:
  • constructor: resource path and JSON/XML pattern expressions;
  • GetAuthenticationSchemes: public, signed, JWT, or other authentication;
  • POST: consume validated pattern variables and return a named dictionary/XML result;
  • paired .req resources: canonical input schemas;
  • paired integration fixtures/tests: contract protection.
When adding an operation, update JSON and XML together or explicitly document that only one representation is supported.

Content negotiation

InternetContent locates encoders, decoders, and converters by media type. Registering a converter can affect calls across the process, including MCP Internet Content and Markdown rendering. Preserve charset, filename, content type, and errors; never reinterpret arbitrary bytes as text.

XMPP handlers

Register the narrowest local-name and namespace pair. Validate stanza type, sender/full JID, target node, tokens, and provisioning before acting. Save the exact delegate for unregistration. IQ handlers must return either a result or a standards-compliant error and must not leave requests hanging.

Things adapters

Implement the smallest capabilities supported by the backing device. Sensor reads should stream typed fields and errors; control parameters should validate before side effects; concentrator nodes need stable extended addresses; commands and queries must advertise support rather than relying on product type.

Global extension risks

Inventory-based converters, Script functions, handlers, and content types can collide globally. Before shipping, search the combined runtime for route, local-name/namespace, function, and media-type conflicts and start a host containing the entire production assembly set.