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

@_daniel_jiang/ai-host

v0.1.2

Published

景行 AI 宿主嵌入 SDK(FAB → 居中工作室模态;iframe Hub/Widget)

Downloads

375

Readme

@_daniel_jiang/ai-host

景行 AI 宿主嵌入 SDK(新包)。相对 @_daniel_jiang/host-sdk 1.x:

  • 壳层:右下 FAB → 圆形展开 → 居中工作室模态(不再用右侧抽屉)
  • Hub UI:/host/hub?layout=studio 左会话记录 / 右任务运行
  • 协议:与 host-sdk 共用 agent-host postMessage 通道,API 仍为 AgentHost.*

表单提交与附件上传均在 Agent Widget iframe 内完成。

维护者改 SDK / 发版:本仓库 pnpm run build:ai-host / publish:ai-host。host-sdk 1.x 冻结维护,仅修关键。

安装

npm install @_daniel_jiang/ai-host
# 或 yarn add @_daniel_jiang/ai-host
{
  "dependencies": {
    "@_daniel_jiang/ai-host": "^0.1.0"
  }
}

官方源:https://www.npmjs.com/package/@_daniel_jiang/ai-host

用法

import { AgentHost } from '@_daniel_jiang/ai-host'

await AgentHost.init({
  host: 'edc',
  bootstrap: () =>
    fetch('/boot-admin/agent/bootstrap?hosts=edc', { credentials: 'include' }).then((r) => r.json()),
})

AgentHost.registerPage(
  'edc_patient_list',
  [{
    id: 'form_fill',
    workflow: 'edc_form_fill',
    label: 'AI 填表',
    host: 'edc',
    prefilled: () => ({ /* ... */ }),
    enabled: () => true,
    hostContext: { refresh: 'patient_list' },
  }],
  {
    refreshKey: 'patient_list',
    onRefresh: () => refreshPatientList(),
  },
)

或脚本标签:

<script src="https://your-agent-origin/sdk/ai-host.js"></script>
<script>
  AgentHost.init({ /* ... */ })
</script>

与 host-sdk 的关系

| | host-sdk 1.x | ai-host 0.x | |---|---|---| | 包名 | @_daniel_jiang/host-sdk | @_daniel_jiang/ai-host | | 壳 | 右侧抽屉(可半屏) | FAB 展开居中模态 | | Hub | 窄栏折叠会话 | studio 左右栏 | | 全局名 | AgentHost | AgentHost(兼容) | | 产物 | agent-host.js | ai-host.js |

迁移:改依赖包名与脚本 URL 即可,业务侧 init / registerPage 一般无需改。