Socket
Book a DemoInstallSign in
Socket

ai.matey.types

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ai.matey.types

Type definitions for AI Matey - Universal AI Adapter System

latest
Source
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

ai.matey.types

TypeScript type definitions for the ai.matey ecosystem

Part of the ai.matey monorepo.

Installation

npm install ai.matey.types

Exports

Core IR Types

  • IRChatRequest - Universal chat request format
  • IRChatResponse - Universal chat response format
  • IRMessage - Individual message in conversation
  • IRStreamChunk - Streaming response chunk
  • IRParameters - Generation parameters (temperature, maxTokens, etc.)
  • IRMetadata - Request/response metadata and provenance
  • IRTool - Tool/function definition
  • IRUsage - Token usage statistics

Adapter Interfaces

  • FrontendAdapter - Interface for frontend adapters
  • BackendAdapter - Interface for backend adapters
  • AdapterMetadata - Adapter capability metadata

Middleware

  • Middleware - Middleware interface
  • MiddlewareContext - Middleware execution context

Streaming

  • StreamMode - Streaming mode ('delta' | 'accumulated')
  • StreamingConfig - Streaming configuration options

Utilities

  • MessageRole - Message role type
  • MessageContent - Content block types
  • FinishReason - Generation completion reasons
  • IRCapabilities - Adapter capabilities
  • IRWarning - Semantic drift warnings

Usage

import {
  IRChatRequest,
  IRChatResponse,
  IRMessage,
  IRStreamChunk,
  FrontendAdapter,
  BackendAdapter,
  Middleware
} from 'ai.matey.types';

// Create a chat request
const request: IRChatRequest = {
  messages: [
    { role: 'user', content: 'Hello!' }
  ],
  parameters: {
    model: 'gpt-4',
    temperature: 0.7
  },
  metadata: {
    requestId: 'req_123',
    timestamp: Date.now(),
    provenance: { frontend: 'openai' }
  }
};

Documentation

For comprehensive documentation of the IR format, see:

License

MIT - see LICENSE for details.

Keywords

ai

FAQs

Package last updated on 29 Nov 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