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

@kisaki3/extension-sdk

v0.0.11

Published

Authoring SDK for the Kisaki extension system

Readme

@kisaki3/extension-sdk

Authoring SDK for Kisaki extensions.

Use this package from extension code. It re-exports the public contracts from @kisaki3/extension-api and adds the small authoring surface that extension entry points use directly.

Exports

  • defineExtension(definition).
  • kisaki, a lazy bridge to host capabilities such as library, network, notify, events, runtime, scrapers, ingest, commands, background tasks, and webviews.
  • createWebviewRpc(transport, functions), a typed bidirectional RPC sugar over one webview session's postMessage/onMessage.
  • All public types and validation helpers exported by @kisaki3/extension-api.

@kisaki3/extension-sdk/webview

Browser-side entry imported by webview documents:

  • webview, the in-document client: params, theme, typography, onThemeChange, onTypographyChange, postMessage, onMessage, and close. The client mirrors the active app theme as --kisaki-* color/radius variables and the resolved typography as --kisaki-font-* / --kisaki-text-* variables on the document root, injecting the app font stylesheets.
  • createWebviewRpc, the same RPC sugar bound to the document side.

@kisaki3/extension-sdk/base.css

Framework-agnostic base layer (reset, typography, selection, scrollbars) built from the mirrored --kisaki-* variables. Pure CSS — works with or without Tailwind; import it in every webview document.

@kisaki3/extension-sdk/tailwind.css

Optional Tailwind v4 convenience layer (only for documents that use Tailwind). It maps the mirrored --kisaki-* variables onto Tailwind color tokens so documents use the same semantic utilities as the app:

@import 'tailwindcss';
@import '@kisaki3/extension-sdk/base.css';
@import '@kisaki3/extension-sdk/tailwind.css';

Example

import { createWebviewRpc, defineExtension, kisaki } from '@kisaki3/extension-sdk'
import type { HostFunctions, UiFunctions } from '../shared/contract'

export default defineExtension({
  activate(context) {
    context.contributions.cardActions.register({
      id: 'open-settings',
      label: 'Settings',
      async run() {
        const webview = await kisaki.webviews.open({
          entry: 'main/index.html',
          title: 'Settings',
          surface: { kind: 'dialog', size: 'md' }
        })

        createWebviewRpc<UiFunctions, HostFunctions>(webview, {
          loadState: async () => ({
            enabled: (await context.storage.get<boolean>('enabled')) ?? true
          }),
          saveState: (state) => context.storage.set('enabled', state.enabled)
        })
      }
    })
  }
})

Inside the webview document:

import { createWebviewRpc, webview } from '@kisaki3/extension-sdk/webview'
import type { HostFunctions } from '../../shared/contract'

const host = createWebviewRpc<HostFunctions>(webview)
const state = await host.loadState()

Boundary

The SDK does not assemble ExtensionContext, configure runtime bridges, or own extension lifecycle cleanup. The shared extension host owns those runtime responsibilities so extension code cannot forge another extension's identity. Webview documents only ever talk to their own extension host code through the message channel; host capabilities stay in the extension entry.