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

agent-universe-chat

v0.0.1

Published

agentUniverse-chat 是面向业务的 Chat UI SDK,提供了一套完整的聊天机器人解决方案,包括会话管理、消息管理、技能管理、Copilot模式、事件订阅、移动端适配、主题切换等功能。 能够帮助业务侧快速的实现商业级别的大模型对话服务。

Readme

agentUniverse-chat

agentUniverse-chat 是面向业务的 Chat UI SDK,提供了一套完整的聊天机器人解决方案,包括会话管理、消息管理、技能管理、Copilot模式、事件订阅、移动端适配、主题切换等功能。 能够帮助业务侧快速的实现商业级别的大模型对话服务。


快速使用

import AuChat from 'agentUniverse-chat';

const chat = new AuChat({
  container: document.getElementById('chat'), // 挂载的 DOM 元素
  disableSession: true, // 是否禁用会话管理
});

chat.open();

Config 配置项

Method 方法

会话&消息管理

配置消息

interface Config {
  // 管理左侧会话的增删改查
  sessionHandler?: {
    initSessionList(): Promise<Session[]>;
    addSession({title}: {title: string}): Promise<void>;
    deleteSession(sessionId: string): Promise<void>;
    updateSession(sessionId: string, title: string): Promise<void>;
  }

  // 管理消息列表的初始化
  messageHandler?: {
    initMessageList(sessionId: string): Promise<{ messageList: any[], attachment: Session['attachment'] }>;
  }

session 实例的数据结构见: message 实例的数据结构见:

监听消息

import { Event } from 'agentUniverse-chat';

chat.on(Event.MESSAGE_SEND, (role, message) => {
  console.log(role, message);
});

发送消息

模块

Card 卡片

import { Card } from 'agentUniverse-chat';

chat.
<Card.Markdown type={'text'}>{ message.content }</Card.Markdown>

Skill 技能

MessageAction 消息动作

Event 事件

插槽

HeadSlot 头部插槽

AsideSlot 侧边插槽

WelcomeSlot 欢迎页插槽