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

@fuxi-ailabs/dsh-audit

v1.1.0

Published

SIFT audit adapter for DSH: session evidence, auth injection, and skill/root/agent audit

Readme

dsh-audit

DSH 的 SIFT audit 适配插件。它只负责把 DSH 会话转换为 SIFT 证据,调用原生 sift audit,并返回审计摘要与报告路径。

环境检查、SIFT 原生 report、报告浏览和其他评测能力不在这里实现,后续分别由独立插件承载。

依赖

建议安装并启用:

dsh-provider-auth

providerAuth 是运行期软依赖。缺少它时,仍会尝试使用显式配置或环境变量中的认证信息。

使用

Web / TUI

/sift audit --kind skill --skill archify
/sift audit --kind root
/sift audit --kind agent --agent developer

/sift audit <declaration-path> --kind skill|root|agent

常用参数:

--sid <sid>             指定要审计的会话,默认当前会话
--skill <name>          skill 名称
--skill-path <path>     显式 SKILL.md 或 skill 目录
--declaration-path <p>  root/agent 的显式声明路径
--agent <label>         子代理 label
--no-subagents          不包含子会话证据
--no-refine             关闭 SIFT 指令精炼
--no-headline           关闭 headline 生成

插件固定向 SIFT 传入 --turn-refs,让 FAIL / INDETERMINATE finding 在支持时携带 turn_refs,供后续轨迹定位使用。

显式 --declaration-path 可以是普通 Markdown(例如 workflow.md 或 AGENTS.md)。缺少 YAML frontmatter 时,dsh-audit 会自动补一个最小声明头;已经有 frontmatter 的文件保持原样。

旧的 audit skill <name>、audit root、audit agent <label> 写法仍兼容。

Headless

只提供工具:

sift_audit

参数示例:

{
  "kind": "skill",
  "skillName": "archify",
  "sid": "session-...",
  "includeDescendants": true,
  "refineInstructions": false,
  "generateHeadline": false
}

skill 默认通过调用者 agent 的 agent.ctx 解析,因此与模型实际看到的 preset / skill catalog 一致。需要审计 catalog 外的 skill 时传 skillPath。

Auth 注入

dsh-audit 通过 providerAuth 解析:

显式配置
  > DSH_SIFT_* / ANTHROPIC_*
  > DSH credentials DEEPSEEK_API_KEY

之后构建 SIFT 子进程环境:

ANTHROPIC_AUTH_TOKEN
ANTHROPIC_BASE_URL
ANTHROPIC_MODEL

默认:

baseUrl = https://api.deepseek.com/anthropic
model   = deepseek-chat

服务接口

插件向 Host 暴露 siftAudit 服务:

inspectSession({ sid, includeDescendants })
audit({ sid, kind, skillName, skillPath, ... })

inspectSession() 还会返回 root 声明候选:

rootDeclarationCandidates: Array<{
  path: string
  source: 'user-message' | 'root-read' | 'workspace-instruction'
  score: number
  reason: string
}>

候选来源依次考虑 root 用户消息中的 Markdown 路径、首次子 Agent dispatch 前的 root Read,以及工作区 AGENTS.md / CLAUDE.md。UX 会预填最高分候选,并允许选择其他候选。

inspectSession() 同时返回当前 Session 的子 Agent:

agents: Array<{ sid: string; label: string; description: string; agentType: string }>

UX 的 Agent 审计使用该列表选择 label,不再要求用户手工输入。

Web / TUI 工作台应通过该服务调用审计,不要直接启动 SIFT。服务会完成 Session 证据转换、Skill 声明解析和子进程执行。

服务还提供按 Session 管理的历史接口:

listAuditRuns({ sid })
listAllAuditRuns()
latestAuditRun({ sid })
deleteAuditRun({ sid, runId })

历史记录直接来自 outputRoot/<sid>/<runId>/,删除时会校验目标必须是该 Session 下的直接子目录。 listAllAuditRuns() 会扫描 outputRoot 下的所有 Session,用于全局审计历史页面。

如果 Skill 已从 catalog 删除,但执行时完整的 <skill_instructions> 仍保存在 Session 轨迹中,插件会从轨迹恢复正文并将声明来源标记为 session-transcript。

Audit 语义

  • skill audit:声明来自调用者 agent 的 skill catalog
  • root audit:优先使用主作用域真实调用的 skill 正文;没有时回退 AGENTS.md / CLAUDE.md
  • agent audit:从 root 的 subagent 调用/结果建立子会话到唯一 label 的映射,声明使用实际 dispatch prompt

skill audit 支持同一 Session 中多次 Skill 调用。转换子会话时,每个 child Session 使用自己的 sid 作为 SIFT parent_tool_use_id scope,避免多个子 Agent 的 Skill 段互相串味。

配置

- id: dsh-audit
  config:
    siftBin: sift
    autoInstall: true
    outputRoot: ~/.dsh-insight/dsh-audit
    includeDescendants: true
    refineInstructions: true
    generateHeadline: true

边界

当前只实现 audit。以下能力不注册命令或工具:

  • doctor / 环境检查
  • 原生 sift report
  • audit 报告索引与浏览
  • agents 独立列表
  • eval / run / trigger / gate