Socket
Book a DemoInstallSign in
Socket

ai.matey.http

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ai.matey.http

HTTP framework adapters for AI Matey - Universal AI Adapter System

latest
Source
npmnpm
Version
0.2.2
Version published
Maintainers
1
Created
Source

ai.matey.http

HTTP framework adapters for AI Matey - Universal AI Adapter System.

Part of the ai.matey monorepo.

Installation

npm install ai.matey.http

Overview

This package provides HTTP framework integrations for serving AI Matey bridges as API endpoints. Supports multiple popular Node.js and edge frameworks.

Included Adapters

  • Express - Express.js middleware
  • Fastify - Fastify handler
  • Hono - Hono middleware (works on edge)
  • Koa - Koa middleware
  • Node - Native Node.js HTTP handler
  • Deno - Deno HTTP handler

For core HTTP utilities (auth, CORS, rate limiting), see ai.matey.http-core.

Usage

Express

import express from 'express';
import { ExpressMiddleware } from 'ai.matey.http';
import { Bridge } from 'ai.matey.core';

const app = express();
const bridge = new Bridge({ frontend, backend });

const middleware = new ExpressMiddleware({ bridge });
app.post('/v1/chat/completions', middleware.handler());

Fastify

import Fastify from 'fastify';
import { FastifyHandler } from 'ai.matey.http';

const fastify = Fastify();
const handler = new FastifyHandler({ bridge });

fastify.post('/v1/chat/completions', handler.handler());

Hono

import { Hono } from 'hono';
import { HonoMiddleware } from 'ai.matey.http';

const app = new Hono();
const middleware = new HonoMiddleware({ bridge });

app.post('/v1/chat/completions', middleware.handler());

Node.js Native HTTP

import http from 'http';
import { NodeHTTPListener } from 'ai.matey.http';

const listener = new NodeHTTPListener({ bridge });
const server = http.createServer(listener.handler());

Deno

import { DenoHandler } from 'ai.matey.http';

const handler = new DenoHandler({ bridge });
Deno.serve(handler.handler());

API Reference

See the TypeScript definitions for detailed API documentation.

License

MIT - see LICENSE for details.

Keywords

ai

FAQs

Package last updated on 01 Dec 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts