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

@ahip/examples

v0.2.0-preview

Published

Examples, fixtures, and showcase data for the Agent-Human Interaction Protocol.

Readme

@ahip/examples

Agent-Human Interaction Protocol 的 examples、fixtures 与 showcase 数据。

本包用于测试 AHIP 校验、渲染、fallback、自定义扩展处理和本地 applet 解析。这里的 examples 属于参考集成材料,不是完整规范文本。

English | 仓库首页 | 文档入口

安装

npm install @ahip/core @ahip/react @ahip/examples

包含内容

  • 标准内容、审批、支付和 artifact 的有效 AHIP fixtures。
  • 用于校验拒绝测试的无效 fixtures。
  • 用于 registry 集成的自定义 block 与 widget fixtures。
  • 用于 fallback 覆盖的不支持 block 与 widget fixtures。
  • Gomoku(五子棋)showcase。
  • 示例宿主工具,用于演示 action dispatch、artifact opening、block/widget registries 和本地 applet lookup。

基础 Fixture 用法

import { validateAHIPItem } from "@ahip/core";
import { standardBlockItem } from "@ahip/examples";

const result = validateAHIPItem(standardBlockItem.item);

if (!result.valid) {
  throw new Error(result.errors.join("\n"));
}

示例 React 宿主接入

import { AHIPItemRenderer } from "@ahip/react";
import { createExampleHostDemo, gomokuGameStartItem } from "@ahip/examples";

const host = createExampleHostDemo();

export function ExampleView() {
  return (
    <AHIPItemRenderer
      item={gomokuGameStartItem.item}
      actionDispatcher={host.actionDispatcher}
      artifactOpener={host.artifactOpener}
      appletRegistry={host.appletRegistry}
      blockRendererRegistry={host.blockRendererRegistry}
      widgetRegistry={host.widgetRegistry}
    />
  );
}

重要导出

  • validFixtures
  • invalidFixtures
  • extensionFixtures
  • appletBoundaryFixtures
  • gomokuShowcaseFixtures
  • standardBlockItem
  • approvalRequestItem
  • paymentRequestItem
  • artifactAnnouncementItem
  • customBlockRegistryItem
  • unsupportedBlockFallbackItem
  • widgetRegistryItem
  • unsupportedWidgetFallbackItem
  • partialFailureRenderItem
  • gomokuGameStartItem
  • gomokuHumanMoveSubmissionItem
  • gomokuUpdatedBoardItem
  • gomokuGameFinishedItem
  • gomokuAppletManifest
  • gomokuAppletRegistrationFlow
  • createExampleHostDemo
  • createLocalAppletRegistry

边界说明

  • Fixtures 用于集成测试、demo 和宿主评估。
  • 示例宿主刻意保持很小,不是生产 runtime。
  • Gomoku showcase 演示本地 applet 注册与解析,不引入远程 applet 加载。
  • 协议语义应以 @ahip/core 的 schema/types 和项目文档为准,不能只从 examples 推断。

更多文档