codebase-snapshot 0.21.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -2
- package/README.md +9 -4
- package/SECURITY.md +2 -2
- package/dist/bin.js +974 -609
- package/dist/{chunk-TDPYLX7X.js → chunk-NPCDJBE4.js} +49 -1
- package/dist/cli.cjs +1065 -703
- package/dist/cli.d.cts +20 -2
- package/dist/cli.d.ts +20 -2
- package/dist/cli.js +415 -101
- package/dist/{generate-worker-D56JeXwx.d.cts → generate-worker-BUNhTXkj.d.cts} +1 -1
- package/dist/{generate-worker-DakxZs-l.d.ts → generate-worker-TUMvHlgz.d.ts} +1 -1
- package/dist/index.cjs +49 -1
- package/dist/index.d.cts +180 -180
- package/dist/index.d.ts +180 -180
- package/dist/index.js +1 -1
- package/dist/mcp.cjs +49 -1
- package/dist/mcp.d.cts +2 -2
- package/dist/mcp.d.ts +2 -2
- package/dist/mcp.js +1 -1
- package/dist/{types-D5XYzksd.d.ts → types-DQXKiaXk.d.cts} +1 -1
- package/dist/{types-D5XYzksd.d.cts → types-DQXKiaXk.d.ts} +1 -1
- package/docs/cli.md +41 -15
- package/docs/contents.md +2 -0
- package/docs/deploy.md +2 -2
- package/docs/guard.md +154 -0
- package/docs/mcp-server-for-codebase.md +10 -2
- package/docs/mcp.md +9 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -10,8 +10,8 @@ This package started its public life as `@ankurhalder/codebase-snapshot`, which
|
|
|
10
10
|
moved to the unscoped name and **restarted at 0.9.0**, so the numbers below are not a continuation of
|
|
11
11
|
the old line — `0.9.0` is newer than `4.4.1`, not older.
|
|
12
12
|
|
|
13
|
-
The current line is **`0.
|
|
14
|
-
`0.
|
|
13
|
+
The current line is **`0.22.x`, with literal sub-bumps**: every change ships as its own version,
|
|
14
|
+
`0.22.0`, `0.22.1`, and so on. The number is not the promise; the entry below is. `1.0.0` is never
|
|
15
15
|
released.
|
|
16
16
|
|
|
17
17
|
GitHub carries a tag for every version and `main` carries every commit. **npm publication normally
|
|
@@ -30,6 +30,18 @@ deprecated with an explanatory message instead. `latest` has pointed at 0.9.0 si
|
|
|
30
30
|
|
|
31
31
|
---
|
|
32
32
|
|
|
33
|
+
## 0.22.0
|
|
34
|
+
|
|
35
|
+
**Change Guard: a silent-by-default check for the consumers, tests and routes an agent's edit did not touch.**
|
|
36
|
+
|
|
37
|
+
- New `guard` command. It reuses the live index (or `--no-live`), takes `--paths`, `--diff` or the working tree against `HEAD`, and reports only what is outside the change: untouched consumers, candidate tests and affected routes. The report is capped at 10 consumers, 5 tests and 5 routes; `truncated` and `omitted` record what was cut, and the trust envelope says when coverage is partial.
|
|
38
|
+
- New hook mode. `guard --hook claude|copilot|codex|raw` reads one host payload from stdin and writes the host-shaped `additionalContext`, or `{}` when there is nothing to report. It is fail-open: an error returns `{}` and a stderr note, so a broken guard cannot fail an agent turn.
|
|
39
|
+
- New portable Agent Plugins 1.0 package under `agent-plugin/`: a `change-guard` skill, Claude and Copilot hook configs, and a pinned command. It calls the CLI instead of adding MCP tools, so it adds no tool-schema context until it has a gap to report.
|
|
40
|
+
- New `docs/guard.md` and CLI reference entries. The command is in `describe`; the parser rejects `--hook` with `--paths`; `--max-chars` is bounded to 200-10000.
|
|
41
|
+
- The hook text is capped at 1,200 characters by default. A clean check is one line in text mode and an empty object in hook mode. Tests cover consumers and tests, the Claude and Copilot response shapes, silence, and the character cap.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
33
45
|
## 0.21.0
|
|
34
46
|
|
|
35
47
|
**Daily code intelligence without a native binary: seven focused MCP tools, a live in-memory index, compiler-backed symbol references, barrel-pruned impact, and a one-command review brief.**
|
package/README.md
CHANGED
|
@@ -15,17 +15,20 @@
|
|
|
15
15
|
<a href="https://ankurhalder.github.io/codebase-snapshot/"><img alt="documentation" src="https://img.shields.io/badge/docs-read-1a7f37"></a>
|
|
16
16
|
<a href="https://m8ven.ai/mcp/ankurhalder-codebase-snapshot-9hzkhs?s=readme"><img alt="M8ven Live: continuously verified" src="https://m8ven.ai/badge/mcp/ankurhalder-codebase-snapshot-9hzkhs?variant=verified"></a>
|
|
17
17
|
<a href="https://glama.ai/mcp/servers/ankurhalder/codebase-snapshot"><img alt="Glama MCP server score" src="https://glama.ai/mcp/servers/ankurhalder/codebase-snapshot/badges/score.svg"></a>
|
|
18
|
+
<a href="https://mcprush.com/to/codebase-snapshot-mcp?ref=badge"><img alt="Codebase Snapshot MCP on mcprush" src="https://mcprush.com/badge/codebase-snapshot-mcp/compact.svg"></a>
|
|
19
|
+
<a href="https://mcpservers.org/servers/ankurhalder/codebase-snapshot"><img alt="Listed on mcpservers.org" src="https://mcpservers.org/badge.svg"></a>
|
|
18
20
|
</p>
|
|
19
21
|
</div>
|
|
20
22
|
|
|
21
23
|
```bash
|
|
22
24
|
npx codebase-snapshot impact --diff HEAD # what does this change reach?
|
|
25
|
+
npx codebase-snapshot guard --changed # what did this edit leave untouched?
|
|
23
26
|
npx codebase-snapshot brief "how does auth work?" --copy
|
|
24
27
|
npx codebase-snapshot generate # persist a shareable snapshot when you need one
|
|
25
28
|
```
|
|
26
29
|
|
|
27
|
-
The first
|
|
28
|
-
tree in memory, overlay uncommitted edits, and never write into the repository. The
|
|
30
|
+
The first three work in a fresh clone: no snapshot, no config, no install. They index the working
|
|
31
|
+
tree in memory, overlay uncommitted edits, and never write into the repository. The last writes
|
|
29
32
|
`./snapshot/` — a directory you can drop into a chat, a prompt, a RAG pipeline or a repository
|
|
30
33
|
review. TypeScript and JavaScript first, but also Python, Go, Rust, Java/Kotlin, C#/.NET, PHP,
|
|
31
34
|
Ruby, C/C++, Vue, Svelte and Astro, without configuration.
|
|
@@ -226,7 +229,7 @@ Everything an agent needs is available as data, and the tool can install its own
|
|
|
226
229
|
```bash
|
|
227
230
|
npx codebase-snapshot describe --format json # contract: workflow, options, exit codes
|
|
228
231
|
npx codebase-snapshot skill --install # into .agents, .claude and .cursor
|
|
229
|
-
npx -y codebase-snapshot@0.
|
|
232
|
+
npx -y codebase-snapshot@0.22.0 mcp # or serve it over MCP
|
|
230
233
|
```
|
|
231
234
|
|
|
232
235
|
An agent told only "use `npx codebase-snapshot`" can read the contract, follow its ordered
|
|
@@ -236,7 +239,9 @@ The MCP server exposes 7 tools — impact, context, locate, read, validate, expl
|
|
|
236
239
|
`snapshot://` resources and seven prompts. Reads are live by default: uncommitted edits and new files
|
|
237
240
|
are overlaid in memory, no snapshot directory is required, an excluded file stays excluded and a
|
|
238
241
|
redacted value stays redacted. `snapshot_validate` still answers the question an agent otherwise
|
|
239
|
-
cannot ask: is the context I was given still true?
|
|
242
|
+
cannot ask: is the context I was given still true? The server is listed in the
|
|
243
|
+
[official MCP Registry](https://registry.modelcontextprotocol.io/v0.1/servers?search=io.github.ankurhalder%2Fcodebase-snapshot)
|
|
244
|
+
as `io.github.ankurhalder/codebase-snapshot`.
|
|
240
245
|
|
|
241
246
|
It speaks both protocol eras, including the `2026-07-28` revision: stateless `server/discover`,
|
|
242
247
|
required `MCP-Protocol-Version`/`Mcp-Method`/`Mcp-Name` HTTP headers, cache hints on every
|
package/SECURITY.md
CHANGED
|
@@ -6,11 +6,11 @@ Only the latest published release receives security fixes.
|
|
|
6
6
|
|
|
7
7
|
| Version | Supported |
|
|
8
8
|
| :--- | :--- |
|
|
9
|
-
| <!--@majorMinor-->0.
|
|
9
|
+
| <!--@majorMinor-->0.22<!--/@majorMinor-->.x | ✅ |
|
|
10
10
|
| anything older | ❌ |
|
|
11
11
|
|
|
12
12
|
The number line restarted at 0.9.0 when the package moved to the unscoped `codebase-snapshot` name,
|
|
13
|
-
so <!--@majorMinor-->0.
|
|
13
|
+
so <!--@majorMinor-->0.22<!--/@majorMinor-->.x is newer than 4.4.1, not older. That is explained in full in the
|
|
14
14
|
[changelog](CHANGELOG.md#a-note-on-version-numbers).
|
|
15
15
|
|
|
16
16
|
## Reporting a vulnerability
|