codebase-snapshot 0.20.2 → 0.20.3

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 CHANGED
@@ -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.20.3
34
+
35
+ **The deep sweep found one real bottleneck: the skipped-secret check re-read the snapshot per token.**
36
+
37
+ `secrets.skipped` compares values from excluded sensitive files against the artifacts. Each token
38
+ triggered a full directory walk plus a fresh read of every artifact file, so a snapshot with the
39
+ maximum 400+ tokens caused close to 2 GiB of reads for a single check. The artifact texts are now
40
+ read once and shared across all tokens; the comparison is byte-identical, only the I/O changed.
41
+ Found by the final pre-publish sweep, which also re-verified redaction idempotence, pack parity
42
+ (JSON/XML/markdown all normalise to LF), exit codes (0/1/2), the 0.20 patch-line guard and a
43
+ 100/100 scratch snapshot with packs enabled.
44
+
33
45
  ## 0.20.2
34
46
 
35
47
  **The release gate now proves the snapshot against the repository, and the JSON pack stops carrying
package/README.md CHANGED
@@ -211,7 +211,7 @@ Everything an agent needs is available as data, and the tool can install its own
211
211
  ```bash
212
212
  npx codebase-snapshot describe --format json # contract: workflow, options, exit codes
213
213
  npx codebase-snapshot skill --install # into .claude/skills + .cursor/rules
214
- npx -y codebase-snapshot@0.20.2 mcp # or serve it over MCP
214
+ npx -y codebase-snapshot@0.20.3 mcp # or serve it over MCP
215
215
  ```
216
216
 
217
217
  An agent told only "use `npx codebase-snapshot`" can read the contract, follow its ordered
package/dist/bin.js CHANGED
@@ -2199,7 +2199,7 @@ function applySpansKeepingQuotes(line, spans) {
2199
2199
 
2200
2200
  // src/version.ts
2201
2201
  var GENERATOR_NAME = "codebase-snapshot";
2202
- var GENERATOR_VERSION = "0.20.2";
2202
+ var GENERATOR_VERSION = "0.20.3";
2203
2203
  var SCHEMA_VERSION = "3.0.0";
2204
2204
  var LEGACY_GENERATOR_NAMES = ["@ankurhalder/codebase-snapshot"];
2205
2205
  function isOurGeneratorName(name) {
@@ -12141,13 +12141,14 @@ function secretTokens(text2) {
12141
12141
  }
12142
12142
  return [...tokens];
12143
12143
  }
12144
- function artifactTextContains(snapshotDir, token) {
12144
+ function readArtifactTexts(snapshotDir) {
12145
+ const texts = [];
12145
12146
  for (const relative15 of walk(snapshotDir)) {
12146
12147
  if (!TEXT_ARTIFACT.test(relative15)) continue;
12147
12148
  const text2 = readText2(path16.join(snapshotDir, relative15));
12148
- if (text2 !== null && text2.includes(token)) return true;
12149
+ if (text2 !== null) texts.push(text2);
12149
12150
  }
12150
- return false;
12151
+ return texts;
12151
12152
  }
12152
12153
  function findHostPaths(snapshotDir, repoDir) {
12153
12154
  const patterns = [
@@ -13214,13 +13215,15 @@ function auditSnapshot(options) {
13214
13215
  );
13215
13216
  const leakedFrom = [];
13216
13217
  let compared = 0;
13218
+ const artifactTexts = readArtifactTexts(snapshotDir);
13219
+ const artifactContains = (token) => artifactTexts.some((text2) => text2.includes(token));
13217
13220
  for (const record of skippedSensitive.slice(0, 40)) {
13218
13221
  if (record.path.includes("[REDACTED") || compared > 400) continue;
13219
13222
  const text2 = readText2(path16.join(repoDir, record.path));
13220
13223
  if (text2 === null) continue;
13221
13224
  for (const token of secretTokens(text2)) {
13222
13225
  compared += 1;
13223
- if (artifactTextContains(snapshotDir, token)) leakedFrom.push(record.path);
13226
+ if (artifactContains(token)) leakedFrom.push(record.path);
13224
13227
  }
13225
13228
  }
13226
13229
  checks.push(
@@ -4002,7 +4002,7 @@ function applySpansKeepingQuotes(line, spans) {
4002
4002
 
4003
4003
  // src/version.ts
4004
4004
  var GENERATOR_NAME = "codebase-snapshot";
4005
- var GENERATOR_VERSION = "0.20.2";
4005
+ var GENERATOR_VERSION = "0.20.3";
4006
4006
  var SCHEMA_VERSION = "3.0.0";
4007
4007
  var LEGACY_GENERATOR_NAMES = ["@ankurhalder/codebase-snapshot"];
4008
4008
  function isOurGeneratorName(name) {
@@ -10304,13 +10304,14 @@ function secretTokens(text2) {
10304
10304
  }
10305
10305
  return [...tokens];
10306
10306
  }
10307
- function artifactTextContains(snapshotDir, token) {
10307
+ function readArtifactTexts(snapshotDir) {
10308
+ const texts = [];
10308
10309
  for (const relative13 of walk(snapshotDir)) {
10309
10310
  if (!TEXT_ARTIFACT.test(relative13)) continue;
10310
10311
  const text2 = readText2(path25.join(snapshotDir, relative13));
10311
- if (text2 !== null && text2.includes(token)) return true;
10312
+ if (text2 !== null) texts.push(text2);
10312
10313
  }
10313
- return false;
10314
+ return texts;
10314
10315
  }
10315
10316
  function findHostPaths(snapshotDir, repoDir) {
10316
10317
  const patterns = [
@@ -11377,13 +11378,15 @@ function auditSnapshot(options) {
11377
11378
  );
11378
11379
  const leakedFrom = [];
11379
11380
  let compared = 0;
11381
+ const artifactTexts = readArtifactTexts(snapshotDir);
11382
+ const artifactContains = (token) => artifactTexts.some((text2) => text2.includes(token));
11380
11383
  for (const record of skippedSensitive.slice(0, 40)) {
11381
11384
  if (record.path.includes("[REDACTED") || compared > 400) continue;
11382
11385
  const text2 = readText2(path25.join(repoDir, record.path));
11383
11386
  if (text2 === null) continue;
11384
11387
  for (const token of secretTokens(text2)) {
11385
11388
  compared += 1;
11386
- if (artifactTextContains(snapshotDir, token)) leakedFrom.push(record.path);
11389
+ if (artifactContains(token)) leakedFrom.push(record.path);
11387
11390
  }
11388
11391
  }
11389
11392
  checks.push(
@@ -1,4 +1,4 @@
1
- import { createServer, buildTools, GENERATOR_VERSION } from './chunk-DUDF3CR5.js';
1
+ import { createServer, buildTools, GENERATOR_VERSION } from './chunk-7JQRJBMP.js';
2
2
  import * as http from 'http';
3
3
  import * as crypto from 'crypto';
4
4
 
package/dist/cli.cjs CHANGED
@@ -2229,7 +2229,7 @@ function applySpansKeepingQuotes(line, spans) {
2229
2229
 
2230
2230
  // src/version.ts
2231
2231
  var GENERATOR_NAME = "codebase-snapshot";
2232
- var GENERATOR_VERSION = "0.20.2";
2232
+ var GENERATOR_VERSION = "0.20.3";
2233
2233
  var SCHEMA_VERSION = "3.0.0";
2234
2234
  var LEGACY_GENERATOR_NAMES = ["@ankurhalder/codebase-snapshot"];
2235
2235
  function isOurGeneratorName(name) {
@@ -12040,13 +12040,14 @@ function secretTokens(text2) {
12040
12040
  }
12041
12041
  return [...tokens];
12042
12042
  }
12043
- function artifactTextContains(snapshotDir, token) {
12043
+ function readArtifactTexts(snapshotDir) {
12044
+ const texts = [];
12044
12045
  for (const relative15 of walk(snapshotDir)) {
12045
12046
  if (!TEXT_ARTIFACT.test(relative15)) continue;
12046
12047
  const text2 = readText2(path27__namespace.join(snapshotDir, relative15));
12047
- if (text2 !== null && text2.includes(token)) return true;
12048
+ if (text2 !== null) texts.push(text2);
12048
12049
  }
12049
- return false;
12050
+ return texts;
12050
12051
  }
12051
12052
  function findHostPaths(snapshotDir, repoDir) {
12052
12053
  const patterns = [
@@ -13113,13 +13114,15 @@ function auditSnapshot(options) {
13113
13114
  );
13114
13115
  const leakedFrom = [];
13115
13116
  let compared = 0;
13117
+ const artifactTexts = readArtifactTexts(snapshotDir);
13118
+ const artifactContains = (token) => artifactTexts.some((text2) => text2.includes(token));
13116
13119
  for (const record of skippedSensitive.slice(0, 40)) {
13117
13120
  if (record.path.includes("[REDACTED") || compared > 400) continue;
13118
13121
  const text2 = readText2(path27__namespace.join(repoDir, record.path));
13119
13122
  if (text2 === null) continue;
13120
13123
  for (const token of secretTokens(text2)) {
13121
13124
  compared += 1;
13122
- if (artifactTextContains(snapshotDir, token)) leakedFrom.push(record.path);
13125
+ if (artifactContains(token)) leakedFrom.push(record.path);
13123
13126
  }
13124
13127
  }
13125
13128
  checks.push(
package/dist/cli.js CHANGED
@@ -1,6 +1,6 @@
1
- import { startHttpTransport } from './chunk-YL4VRORI.js';
2
- import { shouldCheck, checkForUpdate, GENERATOR_VERSION, cacheFilePath, formatUpdateNotice, installKind, buildAgentContract, startWebServer, runStdioServer, parseRemoteSource, assertPublicHost, cloneRepository, makeCloneDirectory, loadConfigFileDetailed, resolveConfig, validateSnapshot, auditSnapshot, describeManifestShapeProblem, explainPath, compareManifests, loadManifest, renderDiffText, generateSnapshot, getGitInfo, signManifest, loadSigningKey, writeSignature, formatNumber, isDiscoveryMode, ARTIFACT_NAMES, COMMAND_OPTION_SCOPE, commandsForOption, getPreset, unknownPresetMessage, GENERATOR_NAME, runInit, installPreCommitHook, PromptCancelled, SKILL_NAME, renderSkill, resolveLatest, isNewer, updateCommand, findConfigFile, planFirstRun, isEffectivelyEmpty, isInteractive, defaultIO, hasPriorSnapshot, DEFAULT_ANSWERS, firstRunMessage, stripJsonComments, parseByteSize, gitignorePath, appendGitignoreEntries, escapeControls, runWithStdoutCapture, MIN_MAX_PART_TOKENS, MIN_MAX_PART_BYTES, renderContractText, renderExplainText } from './chunk-DUDF3CR5.js';
3
- export { buildAgentContract } from './chunk-DUDF3CR5.js';
1
+ import { startHttpTransport } from './chunk-TUL3I7O6.js';
2
+ import { shouldCheck, checkForUpdate, GENERATOR_VERSION, cacheFilePath, formatUpdateNotice, installKind, buildAgentContract, startWebServer, runStdioServer, parseRemoteSource, assertPublicHost, cloneRepository, makeCloneDirectory, loadConfigFileDetailed, resolveConfig, validateSnapshot, auditSnapshot, describeManifestShapeProblem, explainPath, compareManifests, loadManifest, renderDiffText, generateSnapshot, getGitInfo, signManifest, loadSigningKey, writeSignature, formatNumber, isDiscoveryMode, ARTIFACT_NAMES, COMMAND_OPTION_SCOPE, commandsForOption, getPreset, unknownPresetMessage, GENERATOR_NAME, runInit, installPreCommitHook, PromptCancelled, SKILL_NAME, renderSkill, resolveLatest, isNewer, updateCommand, findConfigFile, planFirstRun, isEffectivelyEmpty, isInteractive, defaultIO, hasPriorSnapshot, DEFAULT_ANSWERS, firstRunMessage, stripJsonComments, parseByteSize, gitignorePath, appendGitignoreEntries, escapeControls, runWithStdoutCapture, MIN_MAX_PART_TOKENS, MIN_MAX_PART_BYTES, renderContractText, renderExplainText } from './chunk-7JQRJBMP.js';
3
+ export { buildAgentContract } from './chunk-7JQRJBMP.js';
4
4
  import { spawnSync } from 'child_process';
5
5
  import * as fs2 from 'fs';
6
6
  import * as path2 from 'path';
package/dist/index.cjs CHANGED
@@ -4020,7 +4020,7 @@ function applySpansKeepingQuotes(line, spans) {
4020
4020
 
4021
4021
  // src/version.ts
4022
4022
  var GENERATOR_NAME = "codebase-snapshot";
4023
- var GENERATOR_VERSION = "0.20.2";
4023
+ var GENERATOR_VERSION = "0.20.3";
4024
4024
  var SCHEMA_VERSION = "3.0.0";
4025
4025
  var LEGACY_GENERATOR_NAMES = ["@ankurhalder/codebase-snapshot"];
4026
4026
  function isOurGeneratorName(name) {
@@ -10260,13 +10260,14 @@ function secretTokens(text2) {
10260
10260
  }
10261
10261
  return [...tokens];
10262
10262
  }
10263
- function artifactTextContains(snapshotDir, token) {
10263
+ function readArtifactTexts(snapshotDir) {
10264
+ const texts = [];
10264
10265
  for (const relative13 of walk(snapshotDir)) {
10265
10266
  if (!TEXT_ARTIFACT.test(relative13)) continue;
10266
10267
  const text2 = readText2(path25__namespace.join(snapshotDir, relative13));
10267
- if (text2 !== null && text2.includes(token)) return true;
10268
+ if (text2 !== null) texts.push(text2);
10268
10269
  }
10269
- return false;
10270
+ return texts;
10270
10271
  }
10271
10272
  function findHostPaths(snapshotDir, repoDir) {
10272
10273
  const patterns = [
@@ -11333,13 +11334,15 @@ function auditSnapshot(options) {
11333
11334
  );
11334
11335
  const leakedFrom = [];
11335
11336
  let compared = 0;
11337
+ const artifactTexts = readArtifactTexts(snapshotDir);
11338
+ const artifactContains = (token) => artifactTexts.some((text2) => text2.includes(token));
11336
11339
  for (const record of skippedSensitive.slice(0, 40)) {
11337
11340
  if (record.path.includes("[REDACTED") || compared > 400) continue;
11338
11341
  const text2 = readText2(path25__namespace.join(repoDir, record.path));
11339
11342
  if (text2 === null) continue;
11340
11343
  for (const token of secretTokens(text2)) {
11341
11344
  compared += 1;
11342
- if (artifactTextContains(snapshotDir, token)) leakedFrom.push(record.path);
11345
+ if (artifactContains(token)) leakedFrom.push(record.path);
11343
11346
  }
11344
11347
  }
11345
11348
  checks.push(
package/dist/index.d.cts CHANGED
@@ -554,7 +554,7 @@ declare function validateSnapshot(configInput: ResolvedSnapshotConfig | Snapshot
554
554
  * `package.json` carries the same version; `npm run verify` compares the two.
555
555
  */
556
556
  declare const GENERATOR_NAME = "codebase-snapshot";
557
- declare const GENERATOR_VERSION = "0.20.2";
557
+ declare const GENERATOR_VERSION = "0.20.3";
558
558
  /**
559
559
  * The manifest and ownership-marker schema this build writes and understands.
560
560
  *
package/dist/index.d.ts CHANGED
@@ -554,7 +554,7 @@ declare function validateSnapshot(configInput: ResolvedSnapshotConfig | Snapshot
554
554
  * `package.json` carries the same version; `npm run verify` compares the two.
555
555
  */
556
556
  declare const GENERATOR_NAME = "codebase-snapshot";
557
- declare const GENERATOR_VERSION = "0.20.2";
557
+ declare const GENERATOR_VERSION = "0.20.3";
558
558
  /**
559
559
  * The manifest and ownership-marker schema this build writes and understands.
560
560
  *
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export { ARTIFACT_NAMES, CHECK_INTERVAL_MS, CONFIG_KEYS, DEFAULT_ANSWERS, DEFAULT_SECRET_PATTERNS, FAILURE_INTERVAL_MS, GENERATOR_NAME, GENERATOR_VERSION, HOOK_MARKER, LANGUAGE_PROFILES, MIN_MAX_PART_BYTES, MIN_MAX_PART_TOKENS, PACKAGE_LATEST_URL, PRESETS, PromptBack, PromptCancelled, REQUEST_TIMEOUT_MS, SCHEMA_VERSION, UP_TO_DATE_INTERVAL_MS, anchorForPath, appendGitignoreEntries, assertPublicHost, assertReplaceable, assertUsableConfigInput, buildImportResolver, bytesForTokens, cacheDirectory, cacheFilePath, checkForUpdate, classifyKind, classifyLayer, cloneRepository, collectFiles, compareManifests, configDigest, countInvalidUtf8Bytes, countLines, crc32, decodeText, defineConfig, detectLanguage, detectPreset, displayPath, displayWidth, enforceBudget, estimateTokens, explainPath, fenceForContent, fenceForText, fetchLatestVersion, findSecretInPath, firstRunMessage, formatTokens, formatUpdateNotice, generateProjectTree, generateSarifReport, generateSnapshot, generateSnapshotAsync, getGitInfo, getPreset, gitignorePath, globToRegExp, hasPriorSnapshot, importsChangedFile, importsOfFile, importsOfText, installKind, installPreCommitHook, isBinaryBuffer, isBinaryExtension, isBinaryFile, isEffectivelyEmpty, isInteractive, isNewer, isPrivateHost, isResolvedConfig, isSensitivePath, isSkeletonizable, isTsxFileName, listPresetNames, loadConfigFile, loadConfigFileDetailed, loadManifest, lockPathFor, makeCloneDirectory, markResolvedConfig, matchRule, matchesExclude, normalizeResolvedConfig, parseByteSize, parseRemoteSource, partitionFiles, planFirstRun, profileForPath, renderConfig, renderDiffText, renderExplainText, renumberParts, resolveChangedScope, resolveConfig, resolveLatest, resolveSafeOutputDirs, resolveSpecifier, runInit, scanAndRedactSecrets, shouldCheck, skeletonizeTypeScript, startWebServer, stripJsonComments, summarizeJson, summarizeMarkdown, summarizeTypeScriptSource, summarizeWithProfile, supportsTypeScriptImports, treeTruncationWarnings, truncatePreview, truncateToBytes, tsconfigPathsFor, updateCommand, validateSnapshot, walkFiles, workerEntry, wrapLines, writeZip } from './chunk-DUDF3CR5.js';
1
+ export { ARTIFACT_NAMES, CHECK_INTERVAL_MS, CONFIG_KEYS, DEFAULT_ANSWERS, DEFAULT_SECRET_PATTERNS, FAILURE_INTERVAL_MS, GENERATOR_NAME, GENERATOR_VERSION, HOOK_MARKER, LANGUAGE_PROFILES, MIN_MAX_PART_BYTES, MIN_MAX_PART_TOKENS, PACKAGE_LATEST_URL, PRESETS, PromptBack, PromptCancelled, REQUEST_TIMEOUT_MS, SCHEMA_VERSION, UP_TO_DATE_INTERVAL_MS, anchorForPath, appendGitignoreEntries, assertPublicHost, assertReplaceable, assertUsableConfigInput, buildImportResolver, bytesForTokens, cacheDirectory, cacheFilePath, checkForUpdate, classifyKind, classifyLayer, cloneRepository, collectFiles, compareManifests, configDigest, countInvalidUtf8Bytes, countLines, crc32, decodeText, defineConfig, detectLanguage, detectPreset, displayPath, displayWidth, enforceBudget, estimateTokens, explainPath, fenceForContent, fenceForText, fetchLatestVersion, findSecretInPath, firstRunMessage, formatTokens, formatUpdateNotice, generateProjectTree, generateSarifReport, generateSnapshot, generateSnapshotAsync, getGitInfo, getPreset, gitignorePath, globToRegExp, hasPriorSnapshot, importsChangedFile, importsOfFile, importsOfText, installKind, installPreCommitHook, isBinaryBuffer, isBinaryExtension, isBinaryFile, isEffectivelyEmpty, isInteractive, isNewer, isPrivateHost, isResolvedConfig, isSensitivePath, isSkeletonizable, isTsxFileName, listPresetNames, loadConfigFile, loadConfigFileDetailed, loadManifest, lockPathFor, makeCloneDirectory, markResolvedConfig, matchRule, matchesExclude, normalizeResolvedConfig, parseByteSize, parseRemoteSource, partitionFiles, planFirstRun, profileForPath, renderConfig, renderDiffText, renderExplainText, renumberParts, resolveChangedScope, resolveConfig, resolveLatest, resolveSafeOutputDirs, resolveSpecifier, runInit, scanAndRedactSecrets, shouldCheck, skeletonizeTypeScript, startWebServer, stripJsonComments, summarizeJson, summarizeMarkdown, summarizeTypeScriptSource, summarizeWithProfile, supportsTypeScriptImports, treeTruncationWarnings, truncatePreview, truncateToBytes, tsconfigPathsFor, updateCommand, validateSnapshot, walkFiles, workerEntry, wrapLines, writeZip } from './chunk-7JQRJBMP.js';
package/dist/mcp.cjs CHANGED
@@ -2556,7 +2556,7 @@ function applySpansKeepingQuotes(line, spans) {
2556
2556
 
2557
2557
  // src/version.ts
2558
2558
  var GENERATOR_NAME = "codebase-snapshot";
2559
- var GENERATOR_VERSION = "0.20.2";
2559
+ var GENERATOR_VERSION = "0.20.3";
2560
2560
  var SCHEMA_VERSION = "3.0.0";
2561
2561
  var LEGACY_GENERATOR_NAMES = ["@ankurhalder/codebase-snapshot"];
2562
2562
  function isOurGeneratorName(name) {
@@ -8292,13 +8292,14 @@ function secretTokens(text) {
8292
8292
  }
8293
8293
  return [...tokens];
8294
8294
  }
8295
- function artifactTextContains(snapshotDir, token) {
8295
+ function readArtifactTexts(snapshotDir) {
8296
+ const texts = [];
8296
8297
  for (const relative9 of walk(snapshotDir)) {
8297
8298
  if (!TEXT_ARTIFACT.test(relative9)) continue;
8298
8299
  const text = readText(path5__namespace.join(snapshotDir, relative9));
8299
- if (text !== null && text.includes(token)) return true;
8300
+ if (text !== null) texts.push(text);
8300
8301
  }
8301
- return false;
8302
+ return texts;
8302
8303
  }
8303
8304
  function findHostPaths(snapshotDir, repoDir) {
8304
8305
  const patterns = [
@@ -9365,13 +9366,15 @@ function auditSnapshot(options) {
9365
9366
  );
9366
9367
  const leakedFrom = [];
9367
9368
  let compared = 0;
9369
+ const artifactTexts = readArtifactTexts(snapshotDir);
9370
+ const artifactContains = (token) => artifactTexts.some((text) => text.includes(token));
9368
9371
  for (const record of skippedSensitive.slice(0, 40)) {
9369
9372
  if (record.path.includes("[REDACTED") || compared > 400) continue;
9370
9373
  const text = readText(path5__namespace.join(repoDir, record.path));
9371
9374
  if (text === null) continue;
9372
9375
  for (const token of secretTokens(text)) {
9373
9376
  compared += 1;
9374
- if (artifactTextContains(snapshotDir, token)) leakedFrom.push(record.path);
9377
+ if (artifactContains(token)) leakedFrom.push(record.path);
9375
9378
  }
9376
9379
  }
9377
9380
  checks.push(
package/dist/mcp.js CHANGED
@@ -1,2 +1,2 @@
1
- export { generateToken, startHttpTransport } from './chunk-YL4VRORI.js';
2
- export { ERROR_CODES, LEGACY_PROTOCOL_VERSIONS, MAX_LINE_BYTES, METHOD, MODERN_PROTOCOL_VERSIONS, REPORT_RESOURCE_URIS, RESOURCE_TEMPLATE_URIS, SERVER_INSTRUCTIONS, STATIC_RESOURCE_URIS, SUPPORTED_PROTOCOL_VERSIONS, buildPrompts, buildResourceProvider, buildTools, classifyRequest, coerceNumericStrings, createLineReader, createMcpServer, createServer, createSession, createWriter, findSection, generateInWorker, inspectModernMeta, isCommentStrippable, negotiateLegacyVersion, parsePartSections, runStdioServer, stripComments, validateArguments, windowText } from './chunk-DUDF3CR5.js';
1
+ export { generateToken, startHttpTransport } from './chunk-TUL3I7O6.js';
2
+ export { ERROR_CODES, LEGACY_PROTOCOL_VERSIONS, MAX_LINE_BYTES, METHOD, MODERN_PROTOCOL_VERSIONS, REPORT_RESOURCE_URIS, RESOURCE_TEMPLATE_URIS, SERVER_INSTRUCTIONS, STATIC_RESOURCE_URIS, SUPPORTED_PROTOCOL_VERSIONS, buildPrompts, buildResourceProvider, buildTools, classifyRequest, coerceNumericStrings, createLineReader, createMcpServer, createServer, createSession, createWriter, findSection, generateInWorker, inspectModernMeta, isCommentStrippable, negotiateLegacyVersion, parsePartSections, runStdioServer, stripComments, validateArguments, windowText } from './chunk-7JQRJBMP.js';
package/docs/cli.md CHANGED
@@ -98,7 +98,7 @@ Exit `0` when the snapshot passes its own integrity check, `1` when it does not.
98
98
 
99
99
  ```
100
100
  📸 Generating snapshot for: /path/to/repo
101
- Branch: main (fallback) | Part budget: 300 KB | Generator: 0.20.2 (project dependency ^0.20.2)
101
+ Branch: main (fallback) | Part budget: 300 KB | Generator: 0.20.3 (project dependency ^0.20.3)
102
102
 
103
103
  ✅ Snapshot generated in 0.14s:
104
104
  - Tracked files: 121 included of 128 paths found — 7 skipped (default-ignore 5, binary 1, sensitive-file 1); every one is listed in snapshot/reports/audit.md
@@ -223,7 +223,7 @@ The whole first run in one command, with defaults and no prompts. This is the sa
223
223
  🚀 Setup for: /path/to/repo
224
224
  ✅ Created snapshot.config.ts (preset: nextjs)
225
225
  Added npm scripts: snapshot, snapshot:validate
226
- Added devDependency: codebase-snapshot ^0.20.2
226
+ Added devDependency: codebase-snapshot ^0.20.3
227
227
  Added to .gitignore: /snapshot/, /snapshot.tmp/
228
228
  ⏳ Installing dependencies…
229
229
  ✅ Installed dependencies (npm install, 2.1s)
@@ -275,7 +275,7 @@ It also has three side effects on files you own, and it says so when it does the
275
275
  ```
276
276
  ✅ Created snapshot.config.ts (preset: node-lib)
277
277
  Added npm scripts: snapshot, snapshot:validate
278
- Added devDependency: codebase-snapshot ^0.20.2
278
+ Added devDependency: codebase-snapshot ^0.20.3
279
279
  Added to .gitignore: /snapshot/, /snapshot.tmp/
280
280
  ```
281
281
 
@@ -425,8 +425,8 @@ agent](agent.md).
425
425
  Ask the npm registry whether a newer release exists, and print the version it compared against:
426
426
 
427
427
  ```bash
428
- npx codebase-snapshot@0.20.2 update # is 0.17.0 still current? print the answer
429
- npx codebase-snapshot@0.20.2 update --format json
428
+ npx codebase-snapshot@0.20.3 update # is 0.17.0 still current? print the answer
429
+ npx codebase-snapshot@0.20.3 update --format json
430
430
  ```
431
431
 
432
432
  ```text
package/docs/deploy.md CHANGED
@@ -61,8 +61,8 @@ After=network.target
61
61
  Type=oneshot
62
62
  User=deploy
63
63
  WorkingDirectory=/srv/app
64
- ExecStart=/usr/bin/npx -y codebase-snapshot@0.20.2 generate --cwd /srv/app
65
- ExecStartPost=/usr/bin/npx -y codebase-snapshot@0.20.2 validate --cwd /srv/app
64
+ ExecStart=/usr/bin/npx -y codebase-snapshot@0.20.3 generate --cwd /srv/app
65
+ ExecStartPost=/usr/bin/npx -y codebase-snapshot@0.20.3 validate --cwd /srv/app
66
66
  ```
67
67
 
68
68
  ```ini
package/docs/health.md CHANGED
@@ -45,7 +45,7 @@ npx codebase-snapshot health --deep # also replay every full body from t
45
45
 
46
46
  ```text
47
47
  🩺 Snapshot health: 100/100
48
- 20 passed, 0 warning(s), 0 failed, 2 skipped
48
+ 21 passed, 0 warning(s), 0 failed, 1 skipped
49
49
  ```
50
50
 
51
51
  A **failed** check (critical) means the snapshot is not safe to hand to a model as it stands; the
@@ -156,7 +156,7 @@ codebase-snapshot health --all-members --cwd /repo
156
156
  trusting a snapshot it was handed. Pass `deep: true` for the source replay:
157
157
 
158
158
  ```json
159
- { "score": 100, "counts": { "pass": 20, "warn": 0, "fail": 0, "skip": 2 }, "checks": [ … ] }
159
+ { "score": 100, "counts": { "pass": 21, "warn": 0, "fail": 0, "skip": 1 }, "checks": [ … ] }
160
160
  ```
161
161
 
162
162
  The cheap subset — manifest, parts, artifacts, skips — also runs inside `validate`, so a normal
package/docs/mcp.md CHANGED
@@ -10,7 +10,7 @@ walk — that the client sees.
10
10
  ## Start it
11
11
 
12
12
  ```bash
13
- npx -y codebase-snapshot@0.20.2 mcp
13
+ npx -y codebase-snapshot@0.20.3 mcp
14
14
  ```
15
15
 
16
16
  The server serves the directory it was started in. `--cwd <path>` points it elsewhere, and that
@@ -25,7 +25,7 @@ Claude Desktop and Cursor:
25
25
  "mcpServers": {
26
26
  "codebase-snapshot": {
27
27
  "command": "npx",
28
- "args": ["-y", "codebase-snapshot@0.20.2", "mcp", "--cwd", "/absolute/path/to/repo"]
28
+ "args": ["-y", "codebase-snapshot@0.20.3", "mcp", "--cwd", "/absolute/path/to/repo"]
29
29
  }
30
30
  }
31
31
  }
@@ -34,7 +34,7 @@ Claude Desktop and Cursor:
34
34
  Claude Code registers the same thing from a shell:
35
35
 
36
36
  ```bash
37
- claude mcp add codebase-snapshot -- npx -y codebase-snapshot@0.20.2 mcp --cwd /absolute/path/to/repo
37
+ claude mcp add codebase-snapshot -- npx -y codebase-snapshot@0.20.3 mcp --cwd /absolute/path/to/repo
38
38
  ```
39
39
 
40
40
  On Windows, wrap the command as `cmd /c npx` with the same arguments — `npx` is a `.cmd` shim
@@ -43,7 +43,7 @@ there, and clients that spawn without a shell cannot execute it directly.
43
43
  ## Over HTTP, for clients that cannot spawn a process
44
44
 
45
45
  ```bash
46
- npx -y codebase-snapshot@0.20.2 mcp --http --port 4789
46
+ npx -y codebase-snapshot@0.20.3 mcp --http --port 4789
47
47
  ```
48
48
 
49
49
  This is the Streamable HTTP shape: POST one JSON-RPC message (or an array) to `/mcp` and read
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codebase-snapshot",
3
- "version": "0.20.2",
3
+ "version": "0.20.3",
4
4
  "description": "Create a codebase snapshot an LLM can read: budgeted Markdown parts for Claude, ChatGPT and Cursor, a manifest of every included and skipped file, secret redaction, and validate, which fails when the snapshot drifts. Local CLI and MCP server.",
5
5
  "keywords": [
6
6
  "codebase-snapshot",