codebase-snapshot 0.22.1 → 0.22.2
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 +13 -0
- package/README.md +3 -3
- package/dist/bin.js +1200 -861
- package/dist/{chunk-7AAXOTKS.js → chunk-OVH6B3GV.js} +299 -35
- package/dist/cli.cjs +1330 -998
- package/dist/cli.js +231 -163
- package/dist/index.cjs +303 -34
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp.cjs +303 -34
- package/dist/mcp.js +1 -1
- package/docs/agent.md +3 -0
- package/docs/answer.md +40 -11
- package/docs/cli.md +5 -5
- package/docs/deploy.md +2 -2
- package/docs/guard.md +14 -10
- package/docs/mcp.md +5 -5
- package/docs/security-review.md +5 -0
- package/docs/tools.md +18 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -30,6 +30,19 @@ deprecated with an explanatory message instead. `latest` has pointed at 0.9.0 si
|
|
|
30
30
|
|
|
31
31
|
---
|
|
32
32
|
|
|
33
|
+
## 0.22.2
|
|
34
|
+
|
|
35
|
+
**Line-targeted context, hidden-instruction filtering and verifiable receipts.**
|
|
36
|
+
|
|
37
|
+
- `snapshot_context` now accepts explicit `ranges`, starts an explicit `symbols` target at its parsed declaration span instead of the file head, and selects a question-relevant declaration when the question names a multi-word symbol. Returned line numbers are the real source lines, including range starts.
|
|
38
|
+
- Context and read responses remove HTML comments that look like AI instructions, zero-width characters and bidi controls before returning a body. Removals are reported in `security` and the trust envelope without echoing the payload.
|
|
39
|
+
- Context responses carry a deterministic `receipt`: per-chunk SHA-256 hashes plus a canonical digest over chunks, omissions, security findings and trust. `signReceipt: true` adds an Ed25519 signature when `SNAPSHOT_SIGNING_KEY` is configured; without a key the request fails rather than returning an unsigned object labelled signed.
|
|
40
|
+
- `guard` now reports documentation gaps: exported/component/route symbols of at least three characters that no Markdown, reStructuredText or AsciiDoc file mentions. The report adds `kind: "documentation"`, `symbols`, and `omitted.documentation`; docs gaps are conservative and only appear when the repository has a documentation surface.
|
|
41
|
+
- `snapshot_locate` sanitizes text excerpts before returning them and reports hidden-text removals.
|
|
42
|
+
- Documentation, the bundled skill and the MCP guides describe ranges, symbol spans, receipts and the docs-gap guard. Tests cover explicit symbols, explicit ranges, receipt stability and signing, hidden instructions in context and read, documentation gaps, and the failure when signing is requested without a key.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
33
46
|
## 0.22.1
|
|
34
47
|
|
|
35
48
|
**Security and trust hardening after three adversarial audit passes.**
|
package/README.md
CHANGED
|
@@ -213,7 +213,7 @@ labelled `ast`, `structural` or `heuristic`.
|
|
|
213
213
|
| `health` | Audit a snapshot's integrity and secrets; `--deep` replays every body. |
|
|
214
214
|
| `serve` | Browser UI and the MCP endpoint on loopback. |
|
|
215
215
|
| `impact --diff <ref>` | Changed files, symbol-pruned callers, routes and candidate tests from the live index. |
|
|
216
|
-
| `guard` | What the change reaches that the diff does not; `--hook` stays fail-open. |
|
|
216
|
+
| `guard` | What the change reaches that the diff does not: consumers, tests, routes and undocumented public symbols; `--hook` stays fail-open. |
|
|
217
217
|
| `brief` | One redacted review pack for a question, a diff or changed paths. |
|
|
218
218
|
| `init` | Interactive (or `--yes`) setup that writes a self-documenting config. |
|
|
219
219
|
| `explain <path>` | Why one path is included, which part it lands in, or why it was skipped. |
|
|
@@ -238,7 +238,7 @@ Everything an agent needs is available as data, and the tool can install its own
|
|
|
238
238
|
```bash
|
|
239
239
|
npx codebase-snapshot describe --format json # contract: workflow, options, exit codes
|
|
240
240
|
npx codebase-snapshot skill --install # into .agents, .claude and .cursor
|
|
241
|
-
npx -y codebase-snapshot@0.22.
|
|
241
|
+
npx -y codebase-snapshot@0.22.2 mcp # or serve it over MCP
|
|
242
242
|
```
|
|
243
243
|
|
|
244
244
|
An agent told only "use `npx codebase-snapshot`" can read the contract, follow its ordered
|
|
@@ -321,7 +321,7 @@ others.
|
|
|
321
321
|
| [AI agents](https://github.com/ankurhalder/codebase-snapshot/blob/main/docs/agent.md) | The contract, the skill, what an agent should avoid |
|
|
322
322
|
| [MCP server](https://github.com/ankurhalder/codebase-snapshot/blob/main/docs/mcp.md) | 7 tools, resources, both protocol eras, modern HTTP conformance |
|
|
323
323
|
| [MCP tools](https://github.com/ankurhalder/codebase-snapshot/blob/main/docs/tools.md) | Every tool schema and an example call |
|
|
324
|
-
| [snapshot_context](https://github.com/ankurhalder/codebase-snapshot/blob/main/docs/answer.md) | One question,
|
|
324
|
+
| [snapshot_context](https://github.com/ankurhalder/codebase-snapshot/blob/main/docs/answer.md) | One question, declaration spans or ranges, a hard token budget, hidden-text filtering and a verifiable receipt |
|
|
325
325
|
| [Glossary](https://github.com/ankurhalder/codebase-snapshot/blob/main/docs/glossary.md) | Codebase snapshot, token budget, manifest, drift, MCP and agent experience |
|
|
326
326
|
| [FAQ](https://github.com/ankurhalder/codebase-snapshot/blob/main/docs/faq.md) | Direct answers about MCP, tokens, secrets, CI and comparisons |
|
|
327
327
|
| [All documentation](https://github.com/ankurhalder/codebase-snapshot/blob/main/docs/contents.md) | Every page, grouped by the job you are doing |
|