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

@outirl/plugin-sdk

v1.0.0

Published

Typed browser bridge for Outirl panel plugins

Downloads

291

Readme

Outirl Plugin SDK

@outirl/plugin-sdk connects your panel plugin to its Outirl workspace. Build panels that read project context, explore Git history, display architecture, and run the script actions available in Outirl.

The package ships ESM JavaScript and TypeScript declarations with no runtime dependencies. The same compiled SDK is used in development and production.

Install

npm install @outirl/plugin-sdk

Bundle the SDK with your plugin using a browser bundler such as Vite. Call connectOutirlPlugin() inside the plugin iframe once it mounts. The connection requires an Outirl host; importing the package alone does not open one.

import { connectOutirlPlugin, OutirlPluginError } from "@outirl/plugin-sdk";

const outirl = await connectOutirlPlugin();
const context = await outirl.context();
const unsubscribe = outirl.subscribeContext((next) => {
  console.log(next.project?.name);
});

try {
  const actions = await outirl.scripts.actions();
  console.log(context.project?.name, actions);
} catch (error) {
  if (error instanceof OutirlPluginError) console.error(error.code);
  else throw error;
}

// When unmounting the plugin:
unsubscribe();
outirl.dispose();

Plugin manifest

Your plugin must declare the permissions it needs. For example, a panel that reads the active project and lists script actions can use:

import {
  PANEL_PLUGIN_MANIFEST_VERSION,
  PANEL_PLUGIN_SDK_VERSION,
  type PanelPluginManifestV1,
} from "@outirl/plugin-sdk";

export const manifest = {
  manifestVersion: PANEL_PLUGIN_MANIFEST_VERSION,
  id: "project-actions",
  name: "Project Actions",
  description: "Script actions for the current project",
  version: "0.1.0",
  sdkVersion: PANEL_PLUGIN_SDK_VERSION,
  entry: "index.html",
  context: { project: true },
  permissions: ["context.project.read", "script.read"],
} satisfies PanelPluginManifestV1;

Save the manifest as .outirl/plugin.json and set entry to the HTML entry in your built plugin bundle. Outirl's plugin creation flow generates a project with the SDK embedded locally so it can build without fetching this package.

Capabilities

| Task | API | Manifest permission | | --- | --- | --- | | Read workspace context | context(), subscribeContext() | context.host.read, context.project.read, or context.session.read | | Explore Git history | git(), gitCommit() | git.read | | Read or refresh architecture | architecture(), refreshArchitecture() | architecture.read, architecture.refresh | | Persist plugin data | readStorage(), writeStorage() | storage.read_write | | Navigate in Outirl | navigate() | navigation.open | | Refresh or close the panel | refresh(), closePanel() | panel.refresh, panel.close | | Create or open a workspace session | sessions.create(), openSession() | session.create, session.open | | List or run script actions | scripts.actions(), scripts.run() | script.read, script.run |

The host grants capabilities from the plugin manifest; permissions lists the current grants. Calls may fail if permission is missing, context changes, or confirmation is declined. Plugin capabilities do not include arbitrary shell, filesystem, clipboard or network access.

Each connection and handshake stage times out after 15 seconds. Most requests time out after 30 seconds; architecture refresh allows 135 seconds. Dispose the connection on unmount to reject pending requests and release listeners.

Types and compatibility

Exported types include OutirlPluginApi, PanelPluginManifestV1, PanelPluginPublicContext, PluginScriptRunOptions, GitLogPage and ArchitectureResponse. Architecture describes the project's file tree and statistics returned by the host.

Use PANEL_PLUGIN_SDK_VERSION for the manifest's sdkVersion, as shown above. This host compatibility version (2.0.0) is independent of the npm package version. The SDK handles bridge messages and connection identifiers for you.

License

MIT. See LICENSE.