codebase-snapshot 0.9.4 → 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 +84 -0
- package/README.md +4 -1
- package/dist/bin.js +594 -304
- package/dist/{chunk-FCWD4LY7.js → chunk-3KUL3QRH.js} +564 -318
- package/dist/{chunk-EWZYK3VX.js → chunk-ZKZOGGM3.js} +33 -7
- package/dist/cli.cjs +697 -411
- package/dist/cli.d.cts +7 -1
- package/dist/cli.d.ts +7 -1
- package/dist/cli.js +19 -6
- package/dist/index.cjs +570 -312
- 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 +29 -2
- package/docs/mcp.md +3 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -21,6 +21,90 @@ 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
|
+
|
|
70
|
+
## 0.9.5
|
|
71
|
+
|
|
72
|
+
### Every question in the wizard is reversible
|
|
73
|
+
|
|
74
|
+
The first run asked five questions and accepted one answer each. Reaching the part-size question and
|
|
75
|
+
changing your mind meant killing the process and starting again — and at the review screen,
|
|
76
|
+
answering **No** to "Write this and continue?" threw the same cancellation Ctrl+C does, so "that is
|
|
77
|
+
not what I meant" ended the run instead of correcting it.
|
|
78
|
+
|
|
79
|
+
- **`←` goes back** on any list or text field, `b` on any list or confirmation. Each footer names
|
|
80
|
+
the keys that question actually accepts: `text` takes `←` alone (`b` there is a character you are
|
|
81
|
+
typing) and `confirm` takes `b` alone (`←`/`→` already mean yes/no).
|
|
82
|
+
- **Back is a step, not a restart.** The five questions are now steps — scope → part size →
|
|
83
|
+
artifacts → credentials → review. Going back re-asks the previous one with your earlier answer
|
|
84
|
+
still selected, and back from the first step returns to *"How should I set this up?"* rather than
|
|
85
|
+
out of the wizard.
|
|
86
|
+
- **`No` at the review steps back.** It used to abort. Ctrl+C is still how you say stop.
|
|
87
|
+
- **Answers are rebuilt, not mutated.** Re-entering the scope step clears the globs it added, so
|
|
88
|
+
choosing "skip tests", going back, and choosing "everything" no longer leaves `**/*.test.*` in
|
|
89
|
+
the written config.
|
|
90
|
+
|
|
91
|
+
Four new tests drive real keypress events through a fake TTY, alongside the four that already
|
|
92
|
+
covered the forward path.
|
|
93
|
+
|
|
94
|
+
### A clean first run
|
|
95
|
+
|
|
96
|
+
Setup printed a Node `DEP0190` deprecation warning after installing dependencies: `spawnSync` was
|
|
97
|
+
given an args array *and* `shell: true`, which Node deprecated because the arguments are
|
|
98
|
+
concatenated rather than escaped. The Windows path now hands the shell one pre-formed command
|
|
99
|
+
string — both halves are fixed literals from `detectPackageManager` — and every other platform
|
|
100
|
+
spawns with no shell at all.
|
|
101
|
+
|
|
102
|
+
### Still untested here
|
|
103
|
+
|
|
104
|
+
The MCP server has not been run against a real client. Its protocol is exercised against the built
|
|
105
|
+
binary, but a client's own configuration, timeouts and approval prompts are theirs. That is the next
|
|
106
|
+
thing to check, not something this release proves.
|
|
107
|
+
|
|
24
108
|
## 0.9.4
|
|
25
109
|
|
|
26
110
|
### The snapshot is now something an agent can ask for
|
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
|