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

@arnilo/prism-coding-agent

v0.3.2

Published

Optional coding-agent tools (shell, read, write, edit, repo_list, repo_search, glob, delete, move, opt-in Git/check/ask-user-decision, and durable plan/checkpoint helpers) package for Prism.

Readme

@arnilo/prism-coding-agent

Optional first-party coding tools package for Prism. Provides host shell/filesystem/repository tools — shell, read, write, edit, repo_list, repo_search, glob, delete, move — plus opt-in structured Git/check tools via createGitTools(), opt-in createAskUserDecisionTool({ ask }) (durable runs surface as shared elicitation decisions), and durable plan/checkpoint helpers for workflow composition — as Prism ToolDefinition objects. Inert until a host imports it and registers the tools into a ToolRegistry. No tool is auto-registered; hosts pick factories (or filter aggregator output) and may mix in their own ToolDefinitions.

Behavior is a behavioral port of the pi coding agent's bash/read/write/edit tools, adapted to Prism's ToolDefinition / ToolResult contracts (no @earendil-works/* or typebox dependencies). List/search/glob/Git are native Prism tools (hand-rolled glob; no picomatch/ripgrep).

⚠️ These tools perform real shell and filesystem operations on the host. They provide no sandbox. Gate them with Prism PermissionPolicy / ToolValidator / trust policies before registering them for any provider turn. For disposable sandbox composition with required workspaceMode, use @arnilo/prism-coding-security (createSandboxCodingComposition). See the coding agent tools docs and the host security guide.

Install

npm install @arnilo/prism-coding-agent

@arnilo/prism is a peer dependency. runCodingGoalVerify also peers @arnilo/prism-workflows.

Usage

Register the full coding set (nine tools):

import { createToolRegistry } from "@arnilo/prism";
import { createCodingTools } from "@arnilo/prism-coding-agent";

const tools = createToolRegistry(createCodingTools(process.cwd()));

Read-only subset (inspection-only agents — includes glob):

import { createReadOnlyTools } from "@arnilo/prism-coding-agent";

const tools = createToolRegistry(createReadOnlyTools(process.cwd()));

Shared ToolsOptions.executionPolicy applies to every tool returned by full, all, and read-only aggregators unless a per-tool policy overrides it.

Individual tools with options:

import {
  createShellTool,
  createWriteTool,
  createAskUserDecisionTool,
  createReadPathSet,
  createReadTool,
  createEditTool,
} from "@arnilo/prism-coding-agent";

const shell = createShellTool(process.cwd(), {
  shellPath: "/bin/bash",        // force bash; default: SHELL env → /bin/bash → sh
  commandPrefix: "set -euo pipefail",
  maxLines: 500,
  timeout: 600,
  maxTotalOutputBytes: 64 * 1024 * 1024,
});

const remoteWrite = createWriteTool(process.cwd(), {
  operations: {
    writeFile: async (abs, content) => { /* ship to remote */ },
    mkdir: async (dir) => { /* mkdir -p remotely */ },
  },
});

// Optional soft guard: share one ReadPathSet across read/write/edit.
const readPaths = createReadPathSet();
const read = createReadTool(process.cwd(), { readPathSet: readPaths });
const write = createWriteTool(process.cwd(), { requireReadBeforeWrite: true, readPathSet: readPaths });
const edit = createEditTool(process.cwd(), { requireReadBeforeWrite: true, readPathSet: readPaths });

// Opt-in: not in createCodingTools(). Host owns the UI.
const askUser = createAskUserDecisionTool({
  ask: async ({ question, options }) => {
    const selectedId = await host.promptChoice(question, options);
    return { selectedId };
  },
});

Tools

| Tool | Input | Result | | --- | --- | --- | | shell | { command, timeout? } | Combined output + metadata.exitCode; 600-second default timeout and 64 MiB total-output cap. Non-zero exit is not an error. Prefer dedicated tools when they fit. | | read | { path, offset?, limit? } | Streamed bounded text page or bounded [note, ImageContent]. Continue with suggested offset when truncated. | | write | { path, content, force? } | Full overwrite; bounded UTF-8 input; optional read-before-write. | | edit | { path, edits: [{oldText,newText}], force? } | Exact-then-fuzzy replace; fuzzy may succeed silently — prefer exact oldText; duplicates fail closed. | | repo_list | { path?, includeHidden?, maxDepth?, maxResults?, offset? } | Deterministic relative entries; paginates with nextOffset. Prefer glob for patterns. | | repo_search | { query, path?, mode?, caseSensitive?, includeHidden?, context?, maxMatches?, outputMode? } | Literal search; outputMode: content | files_with_matches | count. | | glob | { pattern, path?, includeHidden?, maxDepth?, maxResults?, offset? } | Filename match (*/?/**; no braces). Files only. | | delete | { path } | High-risk: file or empty dir only; no trash. | | move | { from, to, overwrite? } | High-risk rename/move; overwrite default false; no trash. | | git_* / coding_check | via createGitTools(cwd, { commitIdentity, checks? }) | Opt-in structured Git + named checks. Not in createCodingTools(). | | ask_user_decision | via createAskUserDecisionTool({ ask }) | Opt-in user choice. Not in default aggregators. |

pi name mapping

| Prism | pi | | --- | --- | | shell | bash | | read / write / edit | read / write / edit | | repo_list / repo_search / glob / delete / move | (native; no pi equivalent shipped) |

Phase 4 non-goals

No PDF reader, trash daemon, or PTY in 0.0.21. Phase 9 optionals: createLanguageIntelligence, createProcessSessions, createGitHubForge. See coding agent tools docs, language intelligence, process sessions, and forge integration.

Exports

Factories: createShellTool, createReadTool, createWriteTool, createEditTool, createRepoListTool, createRepoSearchTool, createGlobTool, createDeleteTool, createMoveTool, createCodingTools, createReadOnlyTools, createAllTools, createGitTools, createCodingCheckTool, createAskUserDecisionTool, createLocalBashOperations, createLocalRepositoryOperations, createGitAwareRepositoryOperations, createLanguageIntelligence, createProcessSessions, createGitHubForge, createGitOperations, createReadPathSet.

Helpers: detectSupportedImageMimeType, detectSupportedImageMimeTypeFromFile, getShellConfig, killProcessTree, waitForChildProcess, withFileMutationQueue, resolveRepositoryLimits, matchGlobPattern, validateGlobPattern, writeCodingPlanFile, readCodingPlanFile, buildCodingCheckpointMetadata, validateCodingCheckpointMetadata, assertCodingResumeAllowed, fingerprintJson, runCodingGoalVerify, createCodingGoalVerifyWorkflow, suspendAskUserDecision, createAskUserDecisionResumeValidator, validateAskUserDecisionResume, validateAskUserDecisionAgentResume. Default/hard coding, repository, Git, and plan/checkpoint limit constants are exported for host configuration.

Interactive terminals (0.2.6, plan 026): createProcessSessions takes an optional host-selected PTY ptyBackendpty: true delegates only to it (bounded geometry/TERM, attach timeout, resize rate limit, backend metadata caps; ERR_PRISM_PROCESS_PTY_*); without a backend, PTY fails closed as unsupported before spawn and the non-PTY path is unchanged.

Host-indexed search (0.2.6, plan 026): createIndexedRepositoryOperations composes a host index with the literal fallback; indexed_literal/semantic modes are explicit, stale/failed/unsupported indexes fail closed with ERR_PRISM_INDEX_* (no silent downgrade), and results are containment-checked and labeled untrusted_index. See docs/indexed-code-search.md.

Durable workspace lifecycle (0.2.6, plan 026): createCodingWorkspaceLifecycle registers host repositories and creates/locks/verifies/removes linked worktrees per task, with CheckpointStore CAS records, LeaseStore fencing, credential-free remote fingerprints, and a cleanup policy refusing dirty/locked/unowned/mismatched trees unless allowed. See docs/coding-workspaces.md.

Bounded patch review and diagnostics (0.2.6, plan 026): createCodingPatchReviewManifest + assertCodingPatchAccepted bind review decisions to patch digest + artifact revision + repository/worktree/base/head identity (pending/accepted/rejected/superseded, composed over the server ArtifactService, never applying or committing automatically); normalizeDiagnostics/diagnosticDelta normalize host-parsed check output and LSP push/pull results into one bounded shape with deterministic added/removed/unchanged deltas; LanguageIntelligence.syncDocument/diagnosticDelta stay opt-in (standalone factory, never baked into tool construction). See docs/coding-review-and-diagnostics.md.

Durable process recovery (0.2.6, plan 026): with checkpoints + leases + ownerId, createProcessSessions persists intent before spawn and CAS/fence-writes every transition; recover() is attach-if-attested via a host recoveryBackend, otherwise starting/running records atomically become unknown — no fabricated exit, no PID probing, replica-fenced so two replicas cannot both own a process. See docs/process-sessions.md.

Option/operation types: ToolsOptions, ShellToolOptions/BashOperations, ReadToolOptions/ReadOperations/ReadTextOptions/ReadTextResult, WriteToolOptions/WriteOperations, EditToolOptions/EditOperations/EditToolDetails, DeleteToolOptions/DeleteOperations, MoveToolOptions/MoveOperations, GlobToolOptions, ReadPathSet.

Text reads stop after one page or maxScanBytes instead of loading the file. Custom ReadOperations must implement bounded readText and statFile; custom EditOperations must implement statFile and honor the supplied read cap/signal. Successful truncated shell output is retained in an exclusive Unix 0600 temp file owned by the host; timeout, abort, output-limit, and spill failures remove unpublished spill files. Hosts should delete published metadata.fullOutputPath files after use.

Network-free adversarial evaluation fixtures live in src/__tests__/eval-fixtures.test.ts and reuse @arnilo/prism-evals for CI thresholds. See examples/coding-browser-evaluation.ts, examples/coding-tools-capability-gaps.ts, and docs/evaluations.md.

License

MIT