npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@quilltap/plugin-types

v1.14.0

Published

Type definitions for Quilltap plugin development

Downloads

1,955

Readme

@quilltap/plugin-types

Type definitions for building Quilltap plugins.

Installation

npm install --save-dev @quilltap/plugin-types

Usage

Basic Plugin

import type {
  LLMProviderPlugin,
  LLMProvider,
  LLMParams,
  LLMResponse
} from '@quilltap/plugin-types';

export const plugin: LLMProviderPlugin = {
  metadata: {
    providerName: 'MY_PROVIDER',
    displayName: 'My Provider',
    description: 'A custom LLM provider',
    abbreviation: 'MYP',
    colors: {
      bg: 'bg-blue-100',
      text: 'text-blue-800',
      icon: 'text-blue-600',
    },
  },
  config: {
    // Setting requiresApiKey: true adds this provider to the API Keys dropdown
    // in Settings, allowing users to store API keys for your provider
    requiresApiKey: true,
    requiresBaseUrl: false,
    apiKeyLabel: 'API Key',
  },
  capabilities: {
    chat: true,
    imageGeneration: false,
    embeddings: false,
    webSearch: false,
  },
  attachmentSupport: {
    supportsAttachments: false,
    supportedMimeTypes: [],
    description: 'No file attachments supported',
  },
  createProvider: () => new MyProvider(),
  getAvailableModels: async (apiKey) => ['model-1', 'model-2'],
  validateApiKey: async (apiKey) => true,
  renderIcon: ({ className }) => <MyIcon className={className} />,
};

Submodule Imports

You can import from specific submodules for more granular imports:

// LLM types only
import type { LLMProvider, LLMParams, LLMResponse } from '@quilltap/plugin-types/llm';

// Plugin types only
import type { LLMProviderPlugin, PluginManifest } from '@quilltap/plugin-types/plugins';

// Common utilities
import { createConsoleLogger, PluginError } from '@quilltap/plugin-types/common';

Error Handling

The package provides standard error classes for consistent error handling:

import {
  PluginError,
  ApiKeyError,
  ProviderApiError,
  RateLimitError
} from '@quilltap/plugin-types';

// Throwing errors
throw new ApiKeyError('Invalid API key', 'my-plugin');
throw new RateLimitError('Rate limited', 60, 'my-plugin');

// Catching errors
try {
  await provider.sendMessage(params, apiKey);
} catch (error) {
  if (error instanceof RateLimitError) {
    console.log(`Retry after ${error.retryAfter} seconds`);
  } else if (error instanceof ProviderApiError) {
    console.log(`API error: ${error.statusCode}`);
  }
}

Logging

Use the built-in logger for development:

import { createConsoleLogger } from '@quilltap/plugin-types';

const logger = createConsoleLogger('my-plugin', 'debug');

logger.debug('Initializing plugin', { version: '1.0.0' });
logger.info('Plugin ready');
logger.warn('Deprecated feature used');
logger.error('Failed to connect', { endpoint: 'api.example.com' }, error);

Type Reference

LLM Types

| Type | Description | |------|-------------| | LLMProvider | Core provider interface | | LLMParams | Request parameters | | LLMResponse | Complete response | | StreamChunk | Streaming response chunk | | LLMMessage | Conversation message | | FileAttachment | File attachment for multimodal | | ToolCall | Tool/function call | | ImageGenParams | Image generation parameters | | ImageGenResponse | Image generation response |

Plugin Types

| Type | Description | |------|-------------| | LLMProviderPlugin | Main plugin interface | | ProviderMetadata | UI display metadata | | ProviderCapabilities | Capability flags | | AttachmentSupport | File attachment config | | PluginManifest | Plugin manifest schema |

Common Types

| Type | Description | |------|-------------| | PluginLogger | Logger interface | | LogLevel | Log level type | | PluginError | Base error class | | ApiKeyError | API key validation error | | ProviderApiError | Provider API error | | RateLimitError | Rate limit error |

Plugin Manifest

Every Quilltap plugin needs a quilltap-manifest.json file:

{
  "$schema": "https://quilltap.io/schemas/plugin-manifest.json",
  "name": "qtap-plugin-my-provider",
  "title": "My Provider",
  "description": "A custom LLM provider for Quilltap",
  "version": "1.0.0",
  "author": {
    "name": "Your Name",
    "email": "[email protected]"
  },
  "license": "MIT",
  "compatibility": {
    "quilltapVersion": ">=1.7.0"
  },
  "capabilities": ["LLM_PROVIDER"],
  "category": "PROVIDER",
  "main": "dist/index.js",
  "status": "STABLE"
}

Documentation

License

MIT