codebase-snapshot 0.9.5 → 0.9.6
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 +46 -0
- package/README.md +4 -1
- package/dist/bin.js +405 -203
- package/dist/{chunk-B336MMNC.js → chunk-3KUL3QRH.js} +379 -222
- package/dist/{chunk-4AHHSNGG.js → chunk-ZKZOGGM3.js} +33 -7
- package/dist/cli.cjs +508 -310
- package/dist/cli.d.cts +7 -1
- package/dist/cli.d.ts +7 -1
- package/dist/cli.js +16 -2
- package/dist/index.cjs +384 -215
- package/dist/index.d.cts +54 -2
- package/dist/index.d.ts +54 -2
- package/dist/index.js +1 -1
- package/dist/mcp.cjs +31 -4
- package/dist/mcp.d.cts +14 -1
- package/dist/mcp.d.ts +14 -1
- package/dist/mcp.js +2 -2
- package/docs/cli.md +19 -2
- package/docs/mcp.md +3 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -21,6 +21,52 @@ Two versions exist on the registry that are not releases, and both are deprecate
|
|
|
21
21
|
Deleting them requires account-level rights that the release pipeline does not have, so they are
|
|
22
22
|
deprecated with an explanatory message instead. `latest` has pointed at 0.9.0 since it existed.
|
|
23
23
|
|
|
24
|
+
## 0.9.6
|
|
25
|
+
|
|
26
|
+
### It tells you when it is out of date
|
|
27
|
+
|
|
28
|
+
The tool's claim is that you can prove a thing is current, so it now asks that about itself. After
|
|
29
|
+
a command finishes, if a newer release is published, it says so on stderr:
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
↑ codebase-snapshot 0.9.6 is available — you have 0.9.5.
|
|
33
|
+
npm install -g codebase-snapshot
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
The constraints matter more than the feature, because this is a network call in a tool people run
|
|
37
|
+
in CI and behind firewalls:
|
|
38
|
+
|
|
39
|
+
- **One GET, no identifier.** `registry.npmjs.org/codebase-snapshot/latest` and nothing else. The
|
|
40
|
+
registry learns that some machine ran this version; there is no telemetry, query string or install
|
|
41
|
+
id.
|
|
42
|
+
- **It never runs where it costs something.** Not when stdout is not a terminal, not in CI, not in
|
|
43
|
+
any `--format json` invocation, and never in `mcp` — the server still makes no outbound
|
|
44
|
+
connections at all, which `docs/mcp.md` promises.
|
|
45
|
+
- **It cannot break a command.** A 1.2 s cap, every failure returns null, and a cold cache is a miss
|
|
46
|
+
rather than an error. The request starts before the command and is awaited after it, so on real
|
|
47
|
+
work it overlaps entirely and adds no wall time.
|
|
48
|
+
- **One request per machine per day.** A 24 h cache holds the answer; a *failed* check is remembered
|
|
49
|
+
for one hour, so a single blip neither hides a release for a day nor retries on every run.
|
|
50
|
+
- **Off if you want.** `--no-update-check` or `CODEBASE_SNAPSHOT_NO_UPDATE_CHECK=1`.
|
|
51
|
+
|
|
52
|
+
### A tool argument that arrived as a string is no longer rejected
|
|
53
|
+
|
|
54
|
+
Reported from a real client session: the same `snapshot_read` call worked through one code path and
|
|
55
|
+
failed through another because the client serialised `fromLine` as `"1"`. A digit string is the same
|
|
56
|
+
value in a different spelling, and the caller cannot fix what their client did — so numeric fields
|
|
57
|
+
now accept it.
|
|
58
|
+
|
|
59
|
+
This is not a loosening of validation: only fields the schema declares as numbers are converted, only
|
|
60
|
+
strings that parse to a finite number are converted, and `"ten"` still fails with the type message.
|
|
61
|
+
`"1.5"` for an integer field still fails too.
|
|
62
|
+
|
|
63
|
+
### Also
|
|
64
|
+
|
|
65
|
+
- `--no-update-check` is scoped to the commands that can show the notice; it is not accepted by
|
|
66
|
+
`describe`, `skill` or `mcp`, whose scope would make it a flag that does nothing.
|
|
67
|
+
- The `describe` contract gained the option, and the contract-diff test keeps it in step with the
|
|
68
|
+
parser.
|
|
69
|
+
|
|
24
70
|
## 0.9.5
|
|
25
71
|
|
|
26
72
|
### Every question in the wizard is reversible
|
package/README.md
CHANGED
|
@@ -188,6 +188,9 @@ to trust it.
|
|
|
188
188
|
Exit codes: `0` success · `1` drift, refused generation, or nothing to snapshot · `2` usage error,
|
|
189
189
|
or a first run with no terminal and no `--autopilot`.
|
|
190
190
|
|
|
191
|
+
Once a day it checks the npm registry for a newer release and mentions it on stderr — skipped in CI,
|
|
192
|
+
in any `--format json` run, and in `mcp`. Turn it off with `--no-update-check`.
|
|
193
|
+
|
|
191
194
|
→ [Full CLI reference](https://github.com/ankurhalder/codebase-snapshot/blob/main/docs/cli.md)
|
|
192
195
|
|
|
193
196
|
## For AI agents
|
|
@@ -197,7 +200,7 @@ Everything an agent needs is available as data, and the tool can install its own
|
|
|
197
200
|
```bash
|
|
198
201
|
npx codebase-snapshot describe --format json # contract: workflow, options, exit codes
|
|
199
202
|
npx codebase-snapshot skill --install # into .claude/skills + .cursor/rules
|
|
200
|
-
npx -y codebase-snapshot@0.9.
|
|
203
|
+
npx -y codebase-snapshot@0.9.6 mcp # or serve it over MCP
|
|
201
204
|
```
|
|
202
205
|
|
|
203
206
|
An agent told only "use `npx codebase-snapshot`" can read the contract, follow its ordered
|