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

@sidleo3/agent-instructions-plus

v0.2.6

Published

agent-instructions-plus: preset 选择性接管 AGENTS.md 注入,安装零改动,取消即恢复内置 agent-instructions。

Readme

@sidleo3/agent-instructions-plus

按 preset 选择性接管 DSH 的 AGENTS.md 指令注入。以可配置的四层扫描(cwd / 项目 / 上级遍历 / 全局)替代内置 dsh-agent-instructions 的固定发现逻辑 —— 但只在用户显式勾选的 preset 中生效

核心设计

  • 安装零改动:插件安装后不做任何事,不复制、不修改任何 preset,内置 agent-instructions 照常工作
  • 用户决定生效范围:在 Web GUI(Settings → Plugins → AGENTS注入)里勾选要接管的 preset(多选)
  • 完全替代:勾选某个 preset 后,该 preset 被复制为 agent-instructions-plus-<id>,副本中内置 agent-instructions 行被 disabled,由本插件的注入管线接管
  • 取消即恢复:取消勾选删除副本,内置预设原样不动,agent-instructions 恢复工作
  • 不生效的 preset 不受影响:未勾选的 preset 完全保持内置行为

Features

  • Four scanning layers: cwd (highest) → project/parents (mutually exclusive) → global (lowest)
  • scanParents mode: Walk every ancestor from cwd upward to filesystem root — no depth limit
  • Custom candidates: Add/remove base instruction file names and local overlay names
  • Custom project-root markers: Configure which files/dirs identify a project root
  • Web GUI card: Settings → Plugins → AGENTS注入 — preset 多选 + 四层扫描配置
  • Provider interface: Exposes the discovery provider on context for consumers

Installation

# From npm
dsh plugin --profile web add @sidleo3/agent-instructions-plus

# From local checkout
dsh plugin --profile web add link:/path/to/agent-instructions-plus

安装后重启 DSH。无需任何额外操作——插件不会改动任何 preset,内置 agent-instructions 继续工作。

使用:在 GUI 中按 preset 启用

  1. 打开 Settings → Plugins → AGENTS注入
  2. 在「生效的预设」列表里勾选要接管的 preset(多选,仅列出含 agent-instructions 行的预设)
  3. 勾选后立即生效:该 preset 被复制为 agent-instructions-plus-<id>(位于 ~/.dsh/.agent-presets/),副本内 agent-instructions 行被禁用,注入管线接管
  4. 新会话选择该 preset 时,使用本插件的四层扫描注入 AGENTS.md
  5. 取消勾选 = 删除副本,恢复内置 agent-instructions(新建会话生效)

已运行中的会话不受勾选/取消影响(preset 组合在会话创建时固定);改动对之后新建的会话生效。

Configuration

interface InstructionScanConfig {
  scanCwd: boolean          // default: true
  scanProject: boolean      // default: true (mutually exclusive with scanParents)
  scanParents: boolean      // default: false (mutually exclusive with scanProject)
  scanGlobal: boolean       // default: true
  instructionFileCandidates: string[]       // default: ['AGENTS.md', 'CLAUDE.md']
  localInstructionFileCandidates: string[]  // default: ['AGENTS.local.md', 'CLAUDE.local.md']
  projectRootMarkers: string[]              // default: ['.git']
  dshHome: string           // default: '~/.dsh'
}

How it works

  1. Install = no-op:host 入口只注册 provider 与 GUI RPC,不碰任何 preset
  2. User picks presets:GUI 调 /api/agent-instructions-plus/presets/apply,host 用 ctx.agentPresets.copy() 复制内置预设 → 副本禁用 agent-instructions 行 → 插入 /preset 注入管线行
  3. Injection:副本 preset 中 /preset 行的注入管线按四层扫描发现并注入 AGENTS.md,完全替代内置发现
  4. Removal:GUI 调 /api/agent-instructions-plus/presets/remove 删除副本目录,内置预设原样恢复

Development

pnpm build        # tsdown → lib/index.js + lib/preset.js + lib/client.js
pnpm typecheck    # tsc --noEmit

Notes

  • provider 字面值保持 instruction-scan,兼容旧 bundle 已持久化的消息;插件标识/路由/包名已全部改为 agent-instructions-plus
  • 升级 DSH 后,若内置 preset 被覆盖为原版,已生成的副本仍在但可能基于旧内容;在 GUI 里取消再勾选即可基于新版重建