UNPKG

@juspay/neurolink

Version:

The pipe layer of an AI nervous system: one interface connecting provider neurons to your application, across three inference types — generate, stream and decide. `decide` returns typed, calibrated judgements from a non-generative model (~400ms, ~$0.00002

50 lines (49 loc) • 2.48 kB
/** * Route Builders * Pre-built route definitions for common NeuroLink endpoints */ import type { CreateRoutesOptions, RouteDefinition, RouteGroup } from "../../types/index.js"; export { createAgentRoutes } from "./agentRoutes.js"; export { createClaudeProxyRoutes } from "./claudeProxyRoutes.js"; export { createHealthRoutes } from "./healthRoutes.js"; export { createOpenAIProxyRoutes } from "./openaiProxyRoutes.js"; export { createCodexProxyRoutes } from "./codexProxyRoutes.js"; export { createGeminiProxyRoutes } from "./geminiProxyRoutes.js"; export { createMCPRoutes } from "./mcpRoutes.js"; export { createMemoryRoutes } from "./memoryRoutes.js"; export { createOpenApiRoutes } from "./openApiRoutes.js"; export { createToolRoutes } from "./toolRoutes.js"; export { createTranscribeRoutes } from "./transcribeRoutes.js"; /** * Create all standard routes * Convenience method that combines all route groups * * NOTE on the Codex outbound fallback's `anthropic` target: this function * does not thread `loopbackPort`/`internalDispatch` into * `createCodexProxyRoutes`, so that target cannot dispatch when the feature * is enabled through `options.runtimeConfigProvider` here — only the CLI * proxy command wires the in-process loopback directly. Route creation logs * one warning when this gap applies; see `CreateRoutesOptions.runtimeConfigProvider` * and docs/features/codex-proxy-support.md. */ export declare function createAllRoutes(basePath?: string, options?: CreateRoutesOptions): RouteGroup[]; /** * Register all routes with a server adapter * * With `options.perUserAuth` this also turns on the adapter's * `carryMiddlewareState` (`enableMiddlewareStateCarry()`): the agent routes can * only take identity from `ctx.user` if the adapter hands the handler what * authentication middleware set. An adapter without that method must carry * state itself; otherwise the routes see a user only where the adapter happens * to share its context (Hono, when the client sent its own `X-Request-ID`), and * every other request runs as anonymous. */ export declare function registerAllRoutes(adapter: { registerRouteGroup: (group: RouteGroup) => void; listRoutes?: () => RouteDefinition[]; enableMiddlewareStateCarry?: () => void; hasAuthenticationMiddleware?: () => boolean; noteSensitiveRoutes?: (options?: { allowUnauthenticated?: boolean; }) => void; }, basePath?: string, options?: CreateRoutesOptions): void;