codebase-snapshot 0.20.13 → 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.
Files changed (51) hide show
  1. package/CHANGELOG.md +45 -6
  2. package/README.md +46 -19
  3. package/SECURITY.md +2 -2
  4. package/dist/bin.js +14535 -12036
  5. package/dist/{chunk-GNVRD7XS.js → chunk-NPCDJBE4.js} +6097 -4425
  6. package/dist/cli.cjs +11184 -8708
  7. package/dist/cli.d.cts +94 -2
  8. package/dist/cli.d.ts +94 -2
  9. package/dist/cli.js +944 -95
  10. package/dist/{generate-worker-DMzNbsAW.d.cts → generate-worker-BUNhTXkj.d.cts} +2 -2
  11. package/dist/{generate-worker-CRMESc0b.d.ts → generate-worker-TUMvHlgz.d.ts} +2 -2
  12. package/dist/index.cjs +6073 -4423
  13. package/dist/index.d.cts +281 -63
  14. package/dist/index.d.ts +281 -63
  15. package/dist/index.js +1 -1
  16. package/dist/mcp.cjs +10240 -4315
  17. package/dist/mcp.d.cts +13 -7
  18. package/dist/mcp.d.ts +13 -7
  19. package/dist/mcp.js +1 -1
  20. package/dist/{types-C5ytHMYz.d.ts → types-DQXKiaXk.d.cts} +50 -2
  21. package/dist/{types-C5ytHMYz.d.cts → types-DQXKiaXk.d.ts} +50 -2
  22. package/docs/about.md +86 -0
  23. package/docs/agent.md +28 -6
  24. package/docs/answer.md +99 -48
  25. package/docs/benchmarks.md +34 -34
  26. package/docs/brief.md +80 -81
  27. package/docs/cli.md +126 -25
  28. package/docs/codebase-token-budget.md +14 -13
  29. package/docs/contents.md +68 -0
  30. package/docs/deploy.md +2 -2
  31. package/docs/faq.md +112 -0
  32. package/docs/glossary.md +152 -0
  33. package/docs/guard.md +154 -0
  34. package/docs/health.md +1 -1
  35. package/docs/how-to-feed-a-repo-to-claude.md +6 -0
  36. package/docs/impact.md +102 -0
  37. package/docs/install.md +4 -3
  38. package/docs/llm-codebase-context.md +166 -0
  39. package/docs/mcp-server-for-codebase.md +163 -0
  40. package/docs/mcp.md +48 -67
  41. package/docs/migration.md +83 -90
  42. package/docs/output.md +1 -3
  43. package/docs/security-review.md +8 -8
  44. package/docs/slice.md +1 -1
  45. package/docs/tools.md +159 -185
  46. package/docs/troubleshooting.md +11 -11
  47. package/docs/vs-code2prompt.md +7 -0
  48. package/docs/vs-gitingest.md +7 -0
  49. package/docs/vs-repomix.md +10 -1
  50. package/docs/workspace.md +1 -1
  51. package/package.json +8 -2
package/dist/cli.d.cts CHANGED
@@ -1,4 +1,7 @@
1
- import { O as OutputFormat, P as PromptTask, D as DiscoveryMode, C as CliOptions, R as ResolvedSnapshotConfig } from './types-C5ytHMYz.cjs';
1
+ import { O as OutputFormat, P as PromptTask, D as DiscoveryMode, C as CliOptions, R as ResolvedSnapshotConfig } from './types-DQXKiaXk.cjs';
2
+
3
+ /** The hook hosts this command can shape output for. */
4
+ type GuardClient = "claude" | "copilot" | "codex" | "raw";
2
5
 
3
6
  /**
4
7
  * The machine-readable description of this tool.
@@ -125,7 +128,7 @@ interface AgentContract {
125
128
  /** Builds the contract document. Cheap enough to call on every `describe`. */
126
129
  declare function buildAgentContract(): AgentContract;
127
130
 
128
- type Command = "generate" | "validate" | "health" | "report" | "init" | "setup" | "explain" | "diff" | "describe" | "skill" | "mcp" | "update" | "serve";
131
+ type Command = "generate" | "validate" | "health" | "report" | "impact" | "guard" | "brief" | "init" | "setup" | "explain" | "diff" | "describe" | "skill" | "mcp" | "update" | "serve";
129
132
  declare const CLI_OPTIONS: {
130
133
  readonly cwd: {
131
134
  readonly type: "string";
@@ -223,6 +226,66 @@ declare const CLI_OPTIONS: {
223
226
  readonly "changed-since": {
224
227
  readonly type: "string";
225
228
  };
229
+ readonly diff: {
230
+ readonly type: "string";
231
+ };
232
+ readonly paths: {
233
+ readonly type: "string";
234
+ };
235
+ readonly hook: {
236
+ readonly type: "string";
237
+ };
238
+ readonly changed: {
239
+ readonly type: "boolean";
240
+ };
241
+ readonly "max-chars": {
242
+ readonly type: "string";
243
+ };
244
+ readonly depth: {
245
+ readonly type: "string";
246
+ };
247
+ readonly "max-results": {
248
+ readonly type: "string";
249
+ };
250
+ readonly "no-cache": {
251
+ readonly type: "boolean";
252
+ };
253
+ readonly "no-live": {
254
+ readonly type: "boolean";
255
+ };
256
+ readonly "tests-paths": {
257
+ readonly type: "boolean";
258
+ };
259
+ readonly run: {
260
+ readonly type: "boolean";
261
+ };
262
+ readonly precise: {
263
+ readonly type: "boolean";
264
+ };
265
+ readonly "include-imports": {
266
+ readonly type: "boolean";
267
+ };
268
+ readonly "include-cycles": {
269
+ readonly type: "boolean";
270
+ };
271
+ readonly copy: {
272
+ readonly type: "boolean";
273
+ };
274
+ readonly out: {
275
+ readonly type: "string";
276
+ };
277
+ readonly "max-tokens": {
278
+ readonly type: "string";
279
+ };
280
+ readonly "lines-per-file": {
281
+ readonly type: "string";
282
+ };
283
+ readonly "include-tests": {
284
+ readonly type: "boolean";
285
+ };
286
+ readonly "with-mcp": {
287
+ readonly type: "boolean";
288
+ };
226
289
  readonly "with-dependents": {
227
290
  readonly type: "boolean";
228
291
  };
@@ -351,6 +414,21 @@ interface ParsedInvocation {
351
414
  include?: string;
352
415
  exclude?: string;
353
416
  yes: boolean;
417
+ noCache: boolean;
418
+ noLive: boolean;
419
+ testsPaths: boolean;
420
+ runTests: boolean;
421
+ precise: boolean;
422
+ includeImports: boolean;
423
+ includeCycles: boolean;
424
+ copy: boolean;
425
+ out?: string;
426
+ maxTokens?: number;
427
+ linesPerFile?: number;
428
+ includeTestsOnly: boolean;
429
+ withMcp: boolean;
430
+ markdown: boolean;
431
+ prComment: boolean;
354
432
  force: boolean;
355
433
  /** `generate` only: set the project up without prompting, then generate. */
356
434
  autopilot: boolean;
@@ -396,6 +474,20 @@ interface ParsedInvocation {
396
474
  installHook?: boolean;
397
475
  /** Only files changed since this git ref. */
398
476
  changedSince?: string;
477
+ /** `impact`: compare the working tree against this git ref. */
478
+ diff?: string;
479
+ /** `impact`: explicit repository-relative paths to treat as the change. */
480
+ paths?: string[];
481
+ /** `guard`: shape the response for this hook host instead of printing a report. */
482
+ hook?: GuardClient;
483
+ /** `guard`: compare the working tree with HEAD when no --hook is given. */
484
+ changed: boolean;
485
+ /** `guard`: cap on the model-facing hook text. */
486
+ maxChars?: number;
487
+ /** `impact`: reverse-import hops to follow. */
488
+ depth?: number;
489
+ /** `impact`: cap on affected files. */
490
+ maxResults?: number;
399
491
  /** Only files staged for the next commit. */
400
492
  staged?: boolean;
401
493
  /** With the two above: also include the files that import a changed one. */
package/dist/cli.d.ts CHANGED
@@ -1,4 +1,7 @@
1
- import { O as OutputFormat, P as PromptTask, D as DiscoveryMode, C as CliOptions, R as ResolvedSnapshotConfig } from './types-C5ytHMYz.js';
1
+ import { O as OutputFormat, P as PromptTask, D as DiscoveryMode, C as CliOptions, R as ResolvedSnapshotConfig } from './types-DQXKiaXk.js';
2
+
3
+ /** The hook hosts this command can shape output for. */
4
+ type GuardClient = "claude" | "copilot" | "codex" | "raw";
2
5
 
3
6
  /**
4
7
  * The machine-readable description of this tool.
@@ -125,7 +128,7 @@ interface AgentContract {
125
128
  /** Builds the contract document. Cheap enough to call on every `describe`. */
126
129
  declare function buildAgentContract(): AgentContract;
127
130
 
128
- type Command = "generate" | "validate" | "health" | "report" | "init" | "setup" | "explain" | "diff" | "describe" | "skill" | "mcp" | "update" | "serve";
131
+ type Command = "generate" | "validate" | "health" | "report" | "impact" | "guard" | "brief" | "init" | "setup" | "explain" | "diff" | "describe" | "skill" | "mcp" | "update" | "serve";
129
132
  declare const CLI_OPTIONS: {
130
133
  readonly cwd: {
131
134
  readonly type: "string";
@@ -223,6 +226,66 @@ declare const CLI_OPTIONS: {
223
226
  readonly "changed-since": {
224
227
  readonly type: "string";
225
228
  };
229
+ readonly diff: {
230
+ readonly type: "string";
231
+ };
232
+ readonly paths: {
233
+ readonly type: "string";
234
+ };
235
+ readonly hook: {
236
+ readonly type: "string";
237
+ };
238
+ readonly changed: {
239
+ readonly type: "boolean";
240
+ };
241
+ readonly "max-chars": {
242
+ readonly type: "string";
243
+ };
244
+ readonly depth: {
245
+ readonly type: "string";
246
+ };
247
+ readonly "max-results": {
248
+ readonly type: "string";
249
+ };
250
+ readonly "no-cache": {
251
+ readonly type: "boolean";
252
+ };
253
+ readonly "no-live": {
254
+ readonly type: "boolean";
255
+ };
256
+ readonly "tests-paths": {
257
+ readonly type: "boolean";
258
+ };
259
+ readonly run: {
260
+ readonly type: "boolean";
261
+ };
262
+ readonly precise: {
263
+ readonly type: "boolean";
264
+ };
265
+ readonly "include-imports": {
266
+ readonly type: "boolean";
267
+ };
268
+ readonly "include-cycles": {
269
+ readonly type: "boolean";
270
+ };
271
+ readonly copy: {
272
+ readonly type: "boolean";
273
+ };
274
+ readonly out: {
275
+ readonly type: "string";
276
+ };
277
+ readonly "max-tokens": {
278
+ readonly type: "string";
279
+ };
280
+ readonly "lines-per-file": {
281
+ readonly type: "string";
282
+ };
283
+ readonly "include-tests": {
284
+ readonly type: "boolean";
285
+ };
286
+ readonly "with-mcp": {
287
+ readonly type: "boolean";
288
+ };
226
289
  readonly "with-dependents": {
227
290
  readonly type: "boolean";
228
291
  };
@@ -351,6 +414,21 @@ interface ParsedInvocation {
351
414
  include?: string;
352
415
  exclude?: string;
353
416
  yes: boolean;
417
+ noCache: boolean;
418
+ noLive: boolean;
419
+ testsPaths: boolean;
420
+ runTests: boolean;
421
+ precise: boolean;
422
+ includeImports: boolean;
423
+ includeCycles: boolean;
424
+ copy: boolean;
425
+ out?: string;
426
+ maxTokens?: number;
427
+ linesPerFile?: number;
428
+ includeTestsOnly: boolean;
429
+ withMcp: boolean;
430
+ markdown: boolean;
431
+ prComment: boolean;
354
432
  force: boolean;
355
433
  /** `generate` only: set the project up without prompting, then generate. */
356
434
  autopilot: boolean;
@@ -396,6 +474,20 @@ interface ParsedInvocation {
396
474
  installHook?: boolean;
397
475
  /** Only files changed since this git ref. */
398
476
  changedSince?: string;
477
+ /** `impact`: compare the working tree against this git ref. */
478
+ diff?: string;
479
+ /** `impact`: explicit repository-relative paths to treat as the change. */
480
+ paths?: string[];
481
+ /** `guard`: shape the response for this hook host instead of printing a report. */
482
+ hook?: GuardClient;
483
+ /** `guard`: compare the working tree with HEAD when no --hook is given. */
484
+ changed: boolean;
485
+ /** `guard`: cap on the model-facing hook text. */
486
+ maxChars?: number;
487
+ /** `impact`: reverse-import hops to follow. */
488
+ depth?: number;
489
+ /** `impact`: cap on affected files. */
490
+ maxResults?: number;
399
491
  /** Only files staged for the next commit. */
400
492
  staged?: boolean;
401
493
  /** With the two above: also include the files that import a changed one. */