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

pi-files-touched

v0.2.4

Published

File-activity tracking for Pi sessions across native, RepoPrompt, shell, Codex, and nested Code and Notebook tools, with a /files-touched picker and reusable collector

Downloads

152

Readme

Files Touched for Pi (pi-files-touched)

pi-files-touched tracks file activity across the current Pi session branch and registers /files-touched, a picker for recorded reads, writes, edits, moves, and deletions. The list is sorted newest-first and has colored R/W/E/M/D operation badges and normalized paths.

Evolved from pi-mono/.pi/extensions/files.ts by Mario Zechner (MIT). See THIRD-PARTY-NOTICES.md.

Install

pi install npm:pi-files-touched

What it tracks

pi-files-touched walks the current branch of the Pi session tree and collects file activity from:

  • Pi native tools: read, write, edit tool calls matched with their tool results
  • RepoPrompt tools: rp and rp_exec tool calls: read_file, apply_edits, file_actions (create/move/delete), git mv, git rm
  • Bash commands: sed -i (edit), cp/rsync (write destination), tee/touch (write), patch (edit), curl -o/wget -O (write), cat/head/tail (read), shell output redirections (>, >>), mv (move), rm/trash (delete), heredoc body filtering
  • Codex filesystem tools when present in the session: exec_command uses the same high-confidence literal shell coverage relative to its effective working directory; apply_patch records completed adds, updates, deletes, and moves, including the completed portion of a partial patch
  • Nested Code and Notebook tools: @howaboua/pi-codex-conversion calls through exec and wait, including nested Pi tools, apply_patch, exec_command, rp, and rp_exec
  • RepoPrompt CLIs through shell tools: rp-cli and rpce-cli, using inline JSON with -c/--call and -j/--json, or commands with -e/--exec

Live nested tracking requires pi-codex-conversion 3.0.30 or newer. With that version, the extension records completed nested calls, including calls completed through wait, and distinguishes failed calls from successful ones. It saves compact file-operation records in the session and deduplicates repeated wait snapshots. Older sessions use their saved traces.

Tracking is best effort. Successful calls are recorded; failed calls are skipped unless apply_patch reports completed partial changes. Missing or truncated evidence produces per-call diagnostics and at most one visible warning per session load. The picker still lists confirmed operations. Shell tracking covers literal commands and paths, not arbitrary scripts, JSON loaded from files or stdin, or direct Deno filesystem operations.

Use absolute paths in rp-cli and rpce-cli shell commands. Relative and root-qualified CLI paths belong to the targeted RepoPrompt workspace, so unresolved paths are skipped and reported as incomplete. Nested rp calls retain the same path normalization as direct rp calls.

For saved traces that predate live completion tracking, RepoPrompt calls are recorded only when the trace still shows a successful result. Ambiguous outcomes are reported as incomplete rather than recorded as successful edits. Aborting an outer exec or wait retains confirmed operations and reports unfinished calls as incomplete.

Supported path spellings are normalized and coalesced so the same file appears once regardless of how different tools referred to it. File moves are tracked and earlier references are carried forward to the final path.

Shared core for other extensions

The tracking engine lives in extensions/_shared/files-touched-core.ts and extensions/_shared/files-touched-nested.ts. TypeBox schemas in extensions/_shared/files-touched-contract.ts validate tool arguments and saved file records. Copy all three files when using the shared collector in another extension.

Other extensions can use the collector across any segment of the session tree. Call registerFilesTouchedTracking(pi) during extension initialization to capture live nested calls. Extensions that register the collector share one recorder when loaded together.

import { collectFilesTouched, type FilesTouchedEntry, type FileTouchOperation } from "./_shared/files-touched-core.ts";

// Walk the current branch
const files = collectFilesTouched(ctx.sessionManager.getBranch(), ctx.cwd);

// Or pass any subset of session entries (e.g., the entries being compacted)
const spanFiles = collectFilesTouched(entriesToSummarize, ctx.cwd);

This is useful for extensions that generate compaction summaries, handoff documents, branch summaries, or anywhere else benefiting from a grounded file manifest instead of relying on LLM inference-mediated recall.

/files-touched

Opens an interactive picker listing all files on the current branch. You can select a file to open it in VS Code (supports Windows cmd launch hardening).

 ┌──────────────────────────────────────────────────┐
  Select file to open
  ▸ RW src/header.txt
    RE src/utils.ts
    E  src/config.ts
    W  src/synced.ts
    W  data/downloaded.json
    W  src/redirected.ts
    W  src/brand-new.ts
    W  src/copy.ts
  ↑↓ navigate • ←→ page • enter open • esc close
 └──────────────────────────────────────────────────┘

License

MIT