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

@okdoc-ai/plugin-sdk

v1.13.8

Published

SDK for building OkDoc AI-powered plugins — MCP-aligned types, decorators, AI format converters, and iframe SDK.

Downloads

1,506

Readme

@okdoc-ai/plugin-sdk

CI GitHub Release License

SDK for building okDoc AI-powered plugins. Provides MCP-aligned types, decorators, AI format converters, and a standalone iframe SDK for creating plugins that integrate with the okDoc voice assistant.

Plugin types

| Type | Runtime | Best for | |------|---------|----------| | Iframe plugin | Standalone HTML page in an <iframe> | Third-party developers, any tech stack, full isolation | | Remote plugin | Angular web component loaded at runtime | First-party / trusted plugins, deep host integration |

Quick start — Iframe plugin (no npm required)

Add a single <script> tag and declare your tools:

<script src="https://cdn.jsdelivr.net/gh/okDoc-ai/plugin-sdk/cdn/okdoc-iframe-sdk.js"></script>
<script>
  const sdk = OkDocIframeSDK.create({
    pluginId: 'my-plugin',
    displayName: 'My Plugin',
    tools: [
      {
        name: 'greet',
        description: 'Say hello',
        inputSchema: {
          type: 'object',
          properties: { name: { type: 'string', description: 'Name to greet' } },
          required: ['name'],
        },
        handler: async ({ name }) => ({
          content: [{ type: 'text', text: `Hello, ${name}!` }],
        }),
      },
    ],
  });
</script>

TypeScript support: Drop okdoc-iframe-sdk-global.d.ts into your project for full autocompletion.

See the full guide: DOCS/IframePluginGuide.md

Quick start — Remote plugin (Angular)

npm install @okdoc-ai/plugin-sdk
import { OkDocPlugin, McpTool } from '@okdoc-ai/plugin-sdk';

@OkDocPlugin({
  pluginId: 'weather',
  displayName: 'Weather Plugin',
  version: '1.0.0',
})
class WeatherPlugin {
  @McpTool({
    name: 'get_weather',
    description: 'Get the current weather for a city',
    inputSchema: {
      type: 'object',
      properties: { city: { type: 'string', description: 'City name' } },
      required: ['city'],
    },
  })
  async getWeather({ city }: { city: string }) {
    return { content: [{ type: 'text', text: `Weather in ${city}: Sunny, 25°C` }] };
  }
}

See the full guide: DOCS/RemotePluginGuide.md

Exports

| Import path | Purpose | |-------------|---------| | @okdoc-ai/plugin-sdk | Core types, decorators (@OkDocPlugin, @McpTool), metadata readers, registration | | @okdoc-ai/plugin-sdk/angular | Angular integration (OkDocNotifier, OKDOC_NOTIFIER_TOKEN) | | @okdoc-ai/plugin-sdk/handler | Host-side AI format converters (toGeminiFunctionDeclarations, toOpenAiFunctions) |

CDN / jsdelivr

The standalone iframe SDK is served via jsdelivr:

https://cdn.jsdelivr.net/gh/okDoc-ai/plugin-sdk@<version>/cdn/okdoc-iframe-sdk.js

Replace <version> with a specific tag (e.g. 1.0.0) or use semver ranges (@1, @1.0).

Documentation

| Guide | Description | |-------|-------------| | Iframe Plugin Guide | Build iframe plugins (any tech stack, no npm) | | Remote Plugin Guide | Build Angular remote plugins | | Sample Remote Component Guide | Step-by-step sample remote component | | Ionic Angular Project Setup | Host app project setup reference |

Building from source

npm install
npm run build:all    # TypeScript compilation + iframe SDK bundle

Build outputs:

  • dist/ — ES module library (main SDK)
  • dist/okdoc-iframe-sdk.js — Standalone IIFE bundle for <script> tags
  • cdn/ — jsdelivr-ready copies of the iframe SDK files

Releasing

Use the interactive release script:

npm run release 1.2.0

The script walks you through each step (version bump → build → commit → tag → push) with yes / skip / cancel prompts. On push, GitHub Actions creates the release automatically.

Telemetry

The iframe SDK reports anonymous plugin metadata (plugin name, version, tool names) to okDoc servers when a plugin is discovered by a host application. This helps us understand how the SDK and plugins are used in the ecosystem.

License

Apache License 2.0 — Copyright 2025 okDoc AI