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

@fullstack-ai-infra/digital-employee

v0.1.0

Published

A self-hosted runtime for role-based digital employees.

Readme

Digital Employee:可复用的数字员工运行时

English

Digital Employee 是一个开源、自托管的数字员工运行时。它把岗位身份、知识源、工具权限、消息入口和人工接力做成可配置能力。

首个已经交付的岗位是 answer-agent:一个默认只读、答案带出处、证据不足就转人工的团队答疑员工。

安装正式版本

同一个 0.1.0 版本通过三个公开渠道分发:

| 渠道 | 安装或下载方式 | | --- | --- | | npm | npm install --global @fullstack-ai-infra/[email protected] | | GHCR | docker pull ghcr.io/fullstack-ai-infra/digital-employee:0.1.0 | | GitHub Release | 从 Releases 下载软件包和校验文件 |

npm 安装后,可以在任意目录运行无需凭证的演示:

digital-employee ask --question "What should I include in an incident report?"

也可以直接通过容器启动 HTTP 演示:

docker run --rm -p 3000:3000 \
  ghcr.io/fullstack-ai-infra/digital-employee:0.1.0

不是只开源一个机器人

answer-agent 是岗位模板,不是整个产品。岗位模板负责定义:

  • 它是谁、服务什么领域;
  • 可以读取哪些知识;
  • 可以使用哪些工具;
  • 哪些操作只读,哪些操作必须审批;
  • 没把握时交给谁。

同一个运行时后续可以承载项目助理、运营员工等岗位,而不需要复制消息、记忆、权限和审计代码。

flowchart LR
  C["消息入口<br/>Console · HTTP · 钉钉"] --> R["数字员工运行时"]
  R --> P["岗位模板<br/>answer-agent"]
  R --> M["模型<br/>本地抽取 · OpenAI-compatible"]
  R --> K["授权知识<br/>文件 · Git · DWS"]
  R --> H["人工接力"]
  K --> D["带来源和时间的引用"]

五分钟本地跑通

需要 Node.js 20 或更高版本。默认演示只读取仓库里的公开示例资料,不需要模型密钥、钉钉应用或 DWS 登录。

git clone https://github.com/fullstack-ai-infra/digital-employee.git
cd digital-employee
npm install
npm run demo -- --question "What should I include in an incident report?"

它会从批准的示例手册中提取相关段落,并附带来源:

Based on the approved source “Example team handbook”:

## Incident reports
Include the application version, sanitized command, complete error category,
and the time window...

Sources:
- Example team handbook: source://demo-handbook/handbook.md

再问一个需要实际执行的请求:

npm run demo -- --question "Approve a production deployment for me."

只读岗位不会假装已经操作:

I could not find enough approved evidence. Please ask a maintainer.

Human review: human-support (model_requested)

四种入口

单次问答:

npm run ask -- --config ./configs/demo.json --question "..."

交互式命令行:

npm start -- --config ./configs/demo.json

本地 HTTP:

npm run serve -- --config ./configs/demo.json --port 3000

内置 HTTP 入口默认无状态,并拒绝客户端自选 requestIdactorIdsessionId,避免共享 Bearer Token 的调用方串到其他人的会话历史。需要多轮 HTTP 会话时,应先在核心前增加按用户认证的网关。

钉钉 Stream:

cp configs/dingtalk-dws.example.json configs/local.json
export DINGTALK_CLIENT_ID='...'
export DINGTALK_CLIENT_SECRET='...'
export OPENAI_API_KEY='...'
npm start -- --config ./configs/local.json --channel dingtalk

钉钉适配器会先把用户与会话标识哈希化,再交给通用运行时。默认日志不输出问题正文、用户 ID 和会话 Webhook。

DWS:数字员工连接钉钉工作空间的能力层

答疑岗位把 DWS 当作“眼睛”,读取经过批准的:

  • 钉钉文档;
  • AI 听记摘要与转写;
  • 指定群、指定时间范围内的聊天记录;
  • Wiki 空间和节点;
  • 钉盘文件元数据。

DWS 连接器要求显式 profile 和逐条 approvedQueries。它不会自动选择账号、扫描整个组织、自动翻页或跟随搜索结果读取更多对象。详细边界见 DWS 连接器文档

DWS 的安装、授权和完整能力请查看 DingTalk Workspace CLI 开源仓库

当前能力

| 能力 | 状态 | | --- | --- | | 通用渠道、知识源、模型、岗位接口 | 已交付 | | 只读 answer-agent 岗位 | 已交付 | | Console 与 HTTP 入口 | 已交付 | | 钉钉 Stream 入口 | 已交付;真实应用凭证集成验证需要单独环境 | | 文件、Git、DWS 知识源 | 已交付 | | 引用、人工接力、仅确认反馈后学习 FAQ | 已交付 | | 项目助理、运营员工等岗位 | 规划中 | | 写工具与审批流 | 规划中;首版禁用 | | 托管式多租户 SaaS | 0.1 非目标 |

安全默认值

  • answer-agent 默认只读。
  • 不发现知识源,不做全账号采集。
  • DWS 命令和参数均使用只读白名单,并强制 JSON 输出。
  • answer-agent 的回答如果没有解析到批准来源中的有效引用,会直接转人工。
  • 模型请求、DWS 子进程和钉钉回复都有超时及大小限制。
  • OpenAI-compatible 地址默认拒绝字面量和 DNS 解析后的私网地址,只有显式开启 allowPrivateNetwork 才能使用。
  • 钉钉会话 Webhook 只接受官方 HTTPS 域名。
  • 会话记忆有 TTL 和容量上限。
  • FAQ 只有在反馈被明确标记为已验证后才会学习。
  • 结构化错误自动清理凭证字段,不返回调用栈。

接入私有知识或新增工具前,请先阅读 SECURITY.md架构说明验证账本 会明确区分自动化测试、容器实测、DWS 真实读取以及尚未完成的真实凭证验证。

mem 的关系

Digital Employee 负责消息入口、岗位策略、问答编排、引用、反馈和人工接力;mem 可以作为后续可选的长期记忆与检索后端,本项目不重复建设 memory plane。

开发

npm ci
npm run check
npm audit --omit=dev --audit-level=high

贡献方式见 CONTRIBUTING.md。项目采用 Apache-2.0 许可证。