🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

patchloom

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

patchloom - npm Package Compare versions

Comparing version
0.20.0
to
0.21.0
+2
-2
npm-shrinkwrap.json

@@ -26,3 +26,3 @@ {

"name": "patchloom",
"version": "0.20.0"
"version": "0.21.0"
},

@@ -546,3 +546,3 @@ "node_modules/@isaacs/cliui": {

"requires": true,
"version": "0.20.0"
"version": "0.21.0"
}
{
"artifactDownloadUrls": [
"https://github.com/patchloom/patchloom/releases/download/patchloom-v0.20.0"
"https://github.com/patchloom/patchloom/releases/download/patchloom-v0.21.0"
],

@@ -136,3 +136,3 @@ "author": "Sebastien Tardif",

},
"version": "0.20.0",
"version": "0.21.0",
"volta": {

@@ -139,0 +139,0 @@ "node": "18.14.1",

@@ -27,2 +27,4 @@ <p align="center">

**Not a generic filesystem MCP.** Default MCP filesystem servers read/write files as text. Patchloom adds dry-run previews, parser-backed config and markdown edits, AST ops, multi-file `batch`/`tx` with undo, and stable `error_kind` peels for hosts. Full coding agents (Claude Code, Codex, Cursor) own the loop; Patchloom is the **tool layer** they (or a Rust embedder) call.
![Patchloom demo: 6 edits across 4 files in JSON, YAML, and TOML — one command, comments preserved](demo/demo.gif)

@@ -45,3 +47,3 @@

**[Why Patchloom?](#why-patchloom)** | **[Install](#install)** | **[Quick start](#quick-start)** | **[Commands](#commands)** | **[Comparison](#how-patchloom-compares)** | **[Architecture](#how-it-works-with-your-ai-agent)** | **[Status](#status)**
**[Why Patchloom?](#why-patchloom)** | **[Install](#install)** | **[Quick start](#quick-start)** | **[Commands](#commands)** | **[Comparison](#how-patchloom-compares)** | **[When to use what](#when-to-use-what)** | **[Architecture](#how-it-works-with-your-ai-agent)** | **[Status](#status)**

@@ -307,4 +309,5 @@ ---

// Fail closed: zero matches become EditErrorKind::NoMatch (agent hosts)
let opts = ReplaceOptions { require_change: true, ..Default::default() };
// Agent hosts: shared primary+fallback policy (unique, require_change, fuzzy @ 0.90)
let opts = ReplaceOptions::for_agent();
// Fail closed: zero matches become EditErrorKind::NoMatch
match api::replace_in_content("body", "missing", "x", &opts) {

@@ -314,2 +317,3 @@ Ok(r) => println!("changed={}", r.changed),

}
// After fuzzy Apply: refuse over-wide spans before trust (api::fuzzy_span_suspicious)
// Invalid options and bad regex peel InvalidInput (CLI/tx typed errors included)

@@ -345,3 +349,3 @@ match api::replace_in_content("body", "", "x", &ReplaceOptions::default()) {

Replace fail-closed / shell-token options: CLI `replace --require-change` and `--command-position` (also plan/MCP fields and `ReplaceOptions` on the library). Library-only AST mutators: `ast_rename` / `ast_replace_in_symbol` / `ast_rename_batch` (feature `ast` + `files`), and `FunctionSigEdit::parse_rust`. Full surface: [docs.rs/patchloom](https://docs.rs/patchloom).
Replace fail-closed / shell-token options: CLI `replace --require-change` and `--command-position` (also plan/MCP fields and `ReplaceOptions` on the library). Agent hosts: `ReplaceOptions::for_agent()` plus `api::fuzzy_span_suspicious` after fuzzy Apply. Library-only AST mutators: `ast_rename` / `ast_replace_in_symbol` / `ast_rename_batch` (feature `ast` + `files`), and `FunctionSigEdit::parse_rust`. Host checklist: [Embedder host](docs/getting-started/embedder-host.md). Full surface: [docs.rs/patchloom](https://docs.rs/patchloom).

@@ -455,2 +459,20 @@ ## Getting started

## When to use what
| Need | Prefer | Prefer something else |
|------|--------|------------------------|
| JSON/YAML/TOML by path | Patchloom `doc` | Generic filesystem MCP / blind text replace |
| Multi-doc YAML stream | Patchloom selectors (`0.key`) | Bare key on stream root |
| Structural code pattern search | [ast-grep](https://github.com/ast-grep/ast-grep) | Text-only grep for shapes |
| Identifier rename in code | Patchloom `ast rename` | Fuzzy text replace for symbols |
| Multi-file atomic apply + undo | Patchloom `batch` / `tx` | N sequential shell edits |
| Cloud merge of LLM snippets | Morph Fast Apply (etc.) | Patchloom for local deterministic configs |
| Full agent product | Claude Code / Codex / Cursor | Patchloom alone |
Longer write-ups: [Comparisons](docs/getting-started/comparisons.md) · [Embedder host checklist](docs/getting-started/embedder-host.md) · [MCP setup](docs/getting-started/mcp-setup.md)
**Library hosts:** `ReplaceOptions::for_agent()`, peels via `edit_error_kind` / `is_*`, and after fuzzy Apply `api::fuzzy_span_suspicious` (Patchloom does not auto-refuse over-wide spans).
**Context budget:** line-range `read`, `search --count` / `--files-with-matches`, one `batch`/`tx`, `--jsonl` for large streams.
## How it works with your AI agent

@@ -457,0 +479,0 @@

Sorry, the diff of this file is too big to display