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

@archships/dim-plugin-grep-glob

v0.0.9

Published

Official grep-glob plugin for dim-agent-sdk.

Readme

@archships/dim-plugin-grep-glob

Official supported filesystem search plugin for dim-agent-sdk.

What it adds

  • glob: list files that match a glob pattern
  • grep: regex-first content search with grouped output, pagination, and file/count modes

Permissions

  • requests fs: 'read'

Usage

import { createAgent, createModel } from '@archships/dim-agent-sdk'
import { createGrepGlobPlugin } from '@archships/dim-plugin-grep-glob'

const agent = createAgent({
  model: createModel(adapter),
  plugins: [createGrepGlobPlugin()],
  includeBuiltinTools: false,
})

Path overrides

path accepts relative and absolute file or directory paths. Relative paths resolve against the active session cwd; absolute paths keep their absolute location. File paths are converted to their parent directory plus a basename filter so grep and glob can target one file.

Glob behavior

glob now returns richer discovery metadata and accepts:

  • pattern: glob pattern to match
  • path: optional file or directory path
  • limit: optional maximum number of returned files; defaults to 100
  • sortBy: mtime or path; defaults to mtime

The tool renders a summary line plus file paths in text output, and exposes files, numFiles, truncated, durationMs, resolved path, and sortBy in structuredContent.

Example:

{
  "pattern": "src/**/*.ts",
  "path": ".",
  "limit": 20,
  "sortBy": "mtime"
}

Grep behavior

grep now defaults to grouped content output and accepts:

  • pattern: regex pattern to search for
  • path: optional file or directory path
  • include or glob: optional file glob filter
  • outputMode: content, files, or count
  • beforeContext, afterContext, context
  • ignoreCase, lineNumbers, headLimit, offset, multiline, timeoutMs

It also accepts compatibility aliases such as output_mode, head_limit, -A, -B, -C, -i, and -n.

Example:

{
  "pattern": "createAgent\\(",
  "include": "*.{ts,tsx}",
  "outputMode": "content",
  "context": 1,
  "headLimit": 20,
  "timeoutMs": 3000
}

Notes

  • tool execution uses the standard file system gateway
  • official glob / grep tool path overrides resolve relative paths against the active cwd and accept absolute paths
  • grep remains regex-first, but now defaults timeoutMs to 3000 and forwards it to the filesystem gateway
  • content mode pre-bounds regex scanning when headLimit > 0, so early pages do not always scan the full repository
  • regex mode rejects high-risk constructs such as lookbehind, backreferences, and broad repeated groups, and uses bounded regex search budgets with input-size caps
  • the plugin also injects prompt guidance that tells models to narrow path / include, prefer glob before open-ended grep, and reduce scope after timeouts
  • this plugin is covered by the centralized plugin integration smoke tests