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

@relune/plugin-guest

v1.1.0

Published

TypeScript guest types and helpers for Relune plugins

Readme

Relune TypeScript Guest SDK

@relune/plugin-guest 为 TypeScript 插件提供与 Client 合同一致的 WIT 类型、manifest schema 和少量纯 JavaScript 辅助函数。SDK 不包含 SpiderMonkey、WASI 适配器或插件运行时。

依赖

插件项目推荐固定 SDK 版本:

{
  "dependencies": {
    "@relune/plugin-guest": "1.1.0"
  }
}
import { paragraphJson, utf8ContentText, utf8Text } from "@relune/plugin-guest";
import type { ProcessorWorld } from "@relune/plugin-guest";
import { hashXxh364 } from "relune:client-plugin/[email protected]";

WIT worlds 与契约规范

SDK 使用 jco guest-types 从 wit/plugin.wit 为 processor-plugin 和 connector-plugin 两个 world 生成 TypeScript 声明。WIT 包为 relune:[email protected];清单规范为 Plugin Spec 1.1(specVersion: "1.1"),模式文件位于 schema/plugin-manifest.schema.json。

ProcessorWorld 和 ConnectorWorld 类型分别描述两个 world 的导出。最小 TypeScript 示例保存在仓库的 examples/ 目录。

process(host, content, request) 中的 content 是可选只读资源,不在请求中包含文件字节。readContentAll / utf8ContentText 以最多 64 KiB 的重复 range 读取实现有界完整读取,必须由调用方指定文件长度上限。输出通过 host.createContentWriter(maxBytes)、分块 write、seal 创建只读资源;children 用 childCandidates 与 childContents 按序配对,人脸输出使用 typed faceDetections 和平行的 faceCrops。paragraphJson 生成 DocumentBlock schemaVersion: 2 的段落 JSON;utf8Text 对 guest 自有 Uint8Array 执行严格 UTF-8 解码。指纹哈希须调用 world 导入的 relune:client-plugin/utils hashXxh364,由宿主提供。

Guest 运行边界

组件必须只实现对应 world,不启用 WASI;构建使用 jco componentize --disable all。运行时只有 WIT host 和 utils 导入,没有 Node.js 运行时能力。插件逻辑不可调用 Node.js fs、http 等 Node 内建模块。