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-network-protocol/dsh-anp

v0.1.5

Published

ANP discovery and authenticated interaction for DeepSeek Harness

Readme

DSH ANP

DeepSeek Harness(DSH)的 ANP 智能体发现与身份认证调用插件。

English | 简体中文

ANP 协议 · 共享身份底座 · 三协议服务端 · Apache-2.0

解决什么问题

Personal Agent 不应该在每一个服务或 Service Agent 上重复创建账户和管理私钥。本插件让 DSH 智能体复用一套用户创建、私钥保留在本地的身份,按用户授权发现外部智能体、读取描述并调用业务接口。

共享身份通过三种协议复用,但各自使用不同的认证机制:

| 协议 | 身份与授权机制 | 客户端 | | --- | --- | --- | | ANP | 以已发布的 did:wba 身份对 HTTP 请求签名,不要求 ANP OAuth Token。 | 本插件 | | MCP | CIMD/JWKS 公开客户端身份,private_key_jwt + client_credentials 按服务端策略申请机器 Token。 | DSH MCP 集成 | | PAP 0.3 | 共享身份签发 Delegation,按请求使用 Poppy-Session;账户授权是可选且独立的过程。 | DSH PAP |

复用身份不等于绕过服务端准入、资源授权和用户操作授权;三种协议的 Token 和证明材料不能混用。

核心能力

| 工具 | 功能 | | --- | --- | | anp_discover({domain}) | 获取目标域名下的 /.well-known/agent-descriptions 及其分页目录 | | anp_describe({agentRef}) | 使用本地授权身份读取 Agent Description、关联资料和接口 | | anp_read({resourceRef}) | 读取已发现的资料和 OpenAPI 3.x,并生成操作引用 | | anp_call({operationRef, path?, query?, body?}) | 调用 OpenAPI 声明的业务接口并对请求签名 |

调用所需的 agentRef、resourceRef、operationRef 必须来自前一步结果;不会把私钥交给模型。其他接口协议可见,但尚不能直接执行。

安装

要求 Node.js 22.13+、具有 Cordis 4.1 和工具注册表的 DSH Host,以及同一 Host 内已安装的 ANP Identity。用户须先建立本地身份,并通过 AWiki 身份服务 等发布 DID 公共材料。

已有可用 npm 包的情况下,安装 DSH Bundle:

pnpm dsh plugin --profile <profile> add @agent-network-protocol/dsh-anp

从源码构建验证:

git clone https://github.com/agent-network-protocol/dsh-anp.git
cd dsh-anp
npm ci
npm run build
npm test

安装不等于启用。 插件默认关闭,不会自动创建身份或获得签名授权。

Host 配置

先在公共身份插件中将 @agent-network-protocol/dsh-anp/plugin 加入 allowConsumers 与 userConsumers,并针对目标域名配置 httpAllowedOrigins。之后配置插件:

- id: anp
  name: '@agent-network-protocol/dsh-anp/plugin'
  config:
    enabled: true
    allowedOrigins:
      - 'https://agent.agent-network-protocol.com'
    identityRef:
      storeId: '<existing-store-id>'
      identityId: '<existing-identity-id>'
      did: '<existing-did:wba>'

上述身份引用必须来自已存在、已发布的本地身份。首次请求会申请本地授权;等待批准时应在身份管理器中批准,再重试。长期授权可复用,一次性授权只覆盖对应操作;撤销后调用会被拒绝。建议只允许明确的 HTTPS Origin。

使用线上实例验证

线上示例:三协议服务健康检查、ANP 官网、公开帖子。

配置好身份后,在 DSH 中依次使用:

anp_discover({ "domain": "agent.agent-network-protocol.com" })
anp_describe({ "agentRef": "<上一步返回的引用>" })
anp_read({ "resourceRef": "<上一步返回的 OpenAPI 引用>" })
anp_call({ "operationRef": "<post_create 对应的操作引用>",
           "body": { "content": "Hello from DSH via ANP" } })

尖括号中的值需要从实际工具返回结果中取得,不能直接照抄。还可以通过发现的 protocol_list、protocol_get 操作读取 ANP 指定版本、指定语言的文档。发布成功后,在官网帖子页面查看结果。

原理和安全边界

DSH Agent → dsh-anp 工具 → 同一 Host 的 ANP Identity
                               └ 本地私钥签名
                         → HTTPS ANP Service Agent
                         → 共享的文档 / 留言 / 帖子业务
  • 公共目录发现不需要签名;读取描述、资源和业务调用使用授权签名通道。
  • 模型不能获得原始私钥、设备断言或 OAuth 断言;所有签名都经由本地身份底座。
  • 限制目标 HTTPS Origin;HTTP、带凭据 URL、片段和重定向均被拒绝。'*' 通配允许所有 HTTPS Origin,必须在插件和身份服务两端显式配置并取得用户批准。
  • 引用存放在当前插件实例中;重启后须重新发现。POST 等副作用请求不会自动重试。

相关项目

ANP Identity · AWiki User Service · DSH PAP · Service Agent · DSH Harness Identity

许可

Apache-2.0。

域名自动接入与统一权限

Host 一次性启用域名接入,并设置 enabled: true, autoConnect: true 后,只给域名即可发现和连接。本版本使用共享“协议管理”规则;原始域名沿目录、描述、接口和操作完整传递,不靠服务地址后缀猜测白名单,不同发现源不会借用同一引用。

身份 Host 在原生认证发送边界独立复查规则:允许不重复弹窗,询问消耗一次精确操作授权,禁止不发送业务请求。支持明确声明的 POST 只读语义;冲突、未知、支付和额外权限仍保守确认。当前身份、插件、发现绑定、策略版本和已有拒绝记录均会复查,不能退回通用 HTTP 租约绕过。不确定写入绝不自动重放。

需要 Identity 0.1.15 或更高版本的 Host API,缺少 API 时失败关闭;适配器 0.1.4 要求 Identity >=0.1.15。原静态精确域名模式保留已有授权。等待确认默认 120 秒,由 approvalWaitMs、approvalPollMs 配置。持续规则可通过 Identity 的 protocol_permissions 工具在所有者确认后修改,不开放通用签名;两站三协议真实读写已验证,版本组合为适配器 0.1.4 与 Identity 0.1.15。