codebase-snapshot 0.12.14 → 0.13.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 (44) hide show
  1. package/CHANGELOG.md +950 -3
  2. package/README.md +15 -3
  3. package/SECURITY.md +2 -2
  4. package/dist/bin.js +9848 -5460
  5. package/dist/{chunk-UQHIG2KN.js → chunk-BOJYZQFB.js} +7651 -747
  6. package/dist/chunk-NESEHOPU.js +266 -0
  7. package/dist/cli.cjs +9954 -5619
  8. package/dist/cli.d.cts +120 -2
  9. package/dist/cli.d.ts +120 -2
  10. package/dist/cli.js +422 -8
  11. package/dist/{generate-worker-BK4uJx7Z.d.cts → generate-worker-B79yGkQO.d.cts} +16 -0
  12. package/dist/{generate-worker-BK4uJx7Z.d.ts → generate-worker-B79yGkQO.d.ts} +16 -0
  13. package/dist/index.cjs +7389 -680
  14. package/dist/index.d.cts +145 -6
  15. package/dist/index.d.ts +145 -6
  16. package/dist/index.js +1 -1
  17. package/dist/mcp.cjs +3830 -1057
  18. package/dist/mcp.d.cts +86 -4
  19. package/dist/mcp.d.ts +86 -4
  20. package/dist/mcp.js +2 -2
  21. package/dist/{types-c0tLF2WC.d.cts → types-CbD8yQRZ.d.cts} +145 -1
  22. package/dist/{types-c0tLF2WC.d.ts → types-CbD8yQRZ.d.ts} +145 -1
  23. package/docs/agent.md +1 -1
  24. package/docs/benchmarks.md +80 -0
  25. package/docs/budget.md +59 -0
  26. package/docs/cli.md +56 -4
  27. package/docs/configuration.md +27 -0
  28. package/docs/delta.md +50 -0
  29. package/docs/deploy.md +75 -0
  30. package/docs/health.md +75 -0
  31. package/docs/mcp.md +112 -10
  32. package/docs/migration.md +68 -0
  33. package/docs/output.md +9 -3
  34. package/docs/remote.md +60 -0
  35. package/docs/security-review.md +117 -0
  36. package/docs/serve.md +66 -0
  37. package/docs/signing.md +61 -0
  38. package/docs/slice.md +57 -0
  39. package/docs/tools.md +161 -0
  40. package/docs/troubleshooting.md +63 -0
  41. package/docs/vs-repomix.md +1 -1
  42. package/docs/workspace.md +93 -0
  43. package/package.json +1 -1
  44. package/dist/chunk-6EGIFYWK.js +0 -3248
package/dist/cli.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { O as OutputFormat, P as PromptTask, D as DiscoveryMode, R as ResolvedSnapshotConfig } from './types-c0tLF2WC.cjs';
1
+ import { O as OutputFormat, P as PromptTask, D as DiscoveryMode, R as ResolvedSnapshotConfig } from './types-CbD8yQRZ.cjs';
2
2
 
3
3
  /**
4
4
  * The machine-readable description of this tool.
@@ -106,6 +106,7 @@ interface AgentContract {
106
106
  title: string;
107
107
  summary: string;
108
108
  readOnly: boolean;
109
+ cost: "cheap" | "medium" | "expensive";
109
110
  parameters: string[];
110
111
  required: string[];
111
112
  }>;
@@ -115,6 +116,8 @@ interface AgentContract {
115
116
  arguments: string[];
116
117
  }>;
117
118
  resources: string[];
119
+ /** Report resources, served only when the run wrote the file. */
120
+ reportResources: string[];
118
121
  resourceTemplates: string[];
119
122
  notes: string[];
120
123
  };
@@ -122,7 +125,7 @@ interface AgentContract {
122
125
  /** Builds the contract document. Cheap enough to call on every `describe`. */
123
126
  declare function buildAgentContract(): AgentContract;
124
127
 
125
- type Command = "generate" | "validate" | "report" | "init" | "setup" | "explain" | "diff" | "describe" | "skill" | "mcp";
128
+ type Command = "generate" | "validate" | "health" | "report" | "init" | "setup" | "explain" | "diff" | "describe" | "skill" | "mcp" | "serve";
126
129
  declare const CLI_OPTIONS: {
127
130
  readonly cwd: {
128
131
  readonly type: "string";
@@ -232,6 +235,78 @@ declare const CLI_OPTIONS: {
232
235
  readonly sarif: {
233
236
  readonly type: "boolean";
234
237
  };
238
+ readonly strict: {
239
+ readonly type: "boolean";
240
+ };
241
+ readonly http: {
242
+ readonly type: "boolean";
243
+ };
244
+ readonly port: {
245
+ readonly type: "string";
246
+ };
247
+ readonly host: {
248
+ readonly type: "string";
249
+ };
250
+ readonly token: {
251
+ readonly type: "string";
252
+ };
253
+ readonly "no-auth": {
254
+ readonly type: "boolean";
255
+ };
256
+ readonly "allow-origin": {
257
+ readonly type: "string";
258
+ };
259
+ readonly remote: {
260
+ readonly type: "string";
261
+ };
262
+ readonly ref: {
263
+ readonly type: "string";
264
+ };
265
+ readonly "allow-private": {
266
+ readonly type: "boolean";
267
+ };
268
+ readonly "keep-clone": {
269
+ readonly type: "boolean";
270
+ };
271
+ readonly "include-diffs": {
272
+ readonly type: "boolean";
273
+ };
274
+ readonly "include-logs": {
275
+ readonly type: "string";
276
+ };
277
+ readonly "token-tree": {
278
+ readonly type: "boolean";
279
+ };
280
+ readonly delta: {
281
+ readonly type: "string";
282
+ };
283
+ readonly slice: {
284
+ readonly type: "string";
285
+ };
286
+ readonly "slice-tokens": {
287
+ readonly type: "string";
288
+ };
289
+ readonly pack: {
290
+ readonly type: "string";
291
+ };
292
+ readonly sign: {
293
+ readonly type: "boolean";
294
+ };
295
+ readonly "budget-tokens": {
296
+ readonly type: "string";
297
+ };
298
+ readonly workspace: {
299
+ readonly type: "string";
300
+ };
301
+ readonly "strip-comments": {
302
+ readonly type: "boolean";
303
+ };
304
+ readonly "remove-empty-lines": {
305
+ readonly type: "boolean";
306
+ };
307
+ readonly "all-members": {
308
+ readonly type: "boolean";
309
+ };
235
310
  readonly help: {
236
311
  readonly type: "boolean";
237
312
  readonly short: "h";
@@ -320,6 +395,49 @@ interface ParsedInvocation {
320
395
  skeleton?: boolean;
321
396
  /** Also write reports/audit.sarif for a CI security gate. */
322
397
  sarif?: boolean;
398
+ /** `health`: treat warnings as failures and exit 2 on a critical check. */
399
+ strict?: boolean;
400
+ /** `mcp`: serve over HTTP instead of stdio. */
401
+ http?: boolean;
402
+ port?: number;
403
+ host?: string;
404
+ token?: string | null;
405
+ noAuth?: boolean;
406
+ allowOrigins?: string[];
407
+ /** `generate`: fetch this repository instead of scanning the current directory. */
408
+ remote?: string;
409
+ /** `--remote`: branch or tag to clone. */
410
+ ref?: string;
411
+ /** `--remote`: allow private addresses and file: URLs. */
412
+ allowPrivate?: boolean;
413
+ /** `--remote`: keep the clone after the run. */
414
+ keepClone?: boolean;
415
+ /** `--include-diffs`: write reports/diff.md. */
416
+ includeDiffs?: boolean;
417
+ /** `--include-logs <n>`: write reports/log.md with the last n commits. */
418
+ includeLogs?: number;
419
+ /** `--token-tree`: write reports/tokens.md. */
420
+ tokenTree?: boolean;
421
+ /** `--delta`: base snapshot directory or manifest.json. */
422
+ delta?: string;
423
+ /** `--slice`: the question the snapshot is narrowed for. */
424
+ slice?: string;
425
+ /** `--slice-tokens`: the budget the slice is planned within. */
426
+ sliceTokens?: number;
427
+ /** `--pack`: single | xml | json. */
428
+ pack?: "single" | "xml" | "json";
429
+ /** `--sign`: sign the manifest with Ed25519. */
430
+ sign?: boolean;
431
+ /** `--budget-tokens`: fit the snapshot into this token budget. */
432
+ budgetTokens?: number;
433
+ /** `--workspace`: comma-separated members, one snapshot each plus WORKSPACE.json. */
434
+ workspace?: string;
435
+ /** `--strip-comments`: remove comment text from JS/TS bodies. */
436
+ stripComments?: boolean;
437
+ /** `--remove-empty-lines`: drop blank lines from emitted bodies (line numbers move). */
438
+ removeEmptyLines?: boolean;
439
+ /** `--all-members` (health): audit every snapshot a `--workspace` run wrote. */
440
+ allMembers?: boolean;
323
441
  }
324
442
  declare function parsePositiveInteger(raw: string | undefined, optionName: string, minimum: number): number | undefined;
325
443
  /**
package/dist/cli.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { O as OutputFormat, P as PromptTask, D as DiscoveryMode, R as ResolvedSnapshotConfig } from './types-c0tLF2WC.js';
1
+ import { O as OutputFormat, P as PromptTask, D as DiscoveryMode, R as ResolvedSnapshotConfig } from './types-CbD8yQRZ.js';
2
2
 
3
3
  /**
4
4
  * The machine-readable description of this tool.
@@ -106,6 +106,7 @@ interface AgentContract {
106
106
  title: string;
107
107
  summary: string;
108
108
  readOnly: boolean;
109
+ cost: "cheap" | "medium" | "expensive";
109
110
  parameters: string[];
110
111
  required: string[];
111
112
  }>;
@@ -115,6 +116,8 @@ interface AgentContract {
115
116
  arguments: string[];
116
117
  }>;
117
118
  resources: string[];
119
+ /** Report resources, served only when the run wrote the file. */
120
+ reportResources: string[];
118
121
  resourceTemplates: string[];
119
122
  notes: string[];
120
123
  };
@@ -122,7 +125,7 @@ interface AgentContract {
122
125
  /** Builds the contract document. Cheap enough to call on every `describe`. */
123
126
  declare function buildAgentContract(): AgentContract;
124
127
 
125
- type Command = "generate" | "validate" | "report" | "init" | "setup" | "explain" | "diff" | "describe" | "skill" | "mcp";
128
+ type Command = "generate" | "validate" | "health" | "report" | "init" | "setup" | "explain" | "diff" | "describe" | "skill" | "mcp" | "serve";
126
129
  declare const CLI_OPTIONS: {
127
130
  readonly cwd: {
128
131
  readonly type: "string";
@@ -232,6 +235,78 @@ declare const CLI_OPTIONS: {
232
235
  readonly sarif: {
233
236
  readonly type: "boolean";
234
237
  };
238
+ readonly strict: {
239
+ readonly type: "boolean";
240
+ };
241
+ readonly http: {
242
+ readonly type: "boolean";
243
+ };
244
+ readonly port: {
245
+ readonly type: "string";
246
+ };
247
+ readonly host: {
248
+ readonly type: "string";
249
+ };
250
+ readonly token: {
251
+ readonly type: "string";
252
+ };
253
+ readonly "no-auth": {
254
+ readonly type: "boolean";
255
+ };
256
+ readonly "allow-origin": {
257
+ readonly type: "string";
258
+ };
259
+ readonly remote: {
260
+ readonly type: "string";
261
+ };
262
+ readonly ref: {
263
+ readonly type: "string";
264
+ };
265
+ readonly "allow-private": {
266
+ readonly type: "boolean";
267
+ };
268
+ readonly "keep-clone": {
269
+ readonly type: "boolean";
270
+ };
271
+ readonly "include-diffs": {
272
+ readonly type: "boolean";
273
+ };
274
+ readonly "include-logs": {
275
+ readonly type: "string";
276
+ };
277
+ readonly "token-tree": {
278
+ readonly type: "boolean";
279
+ };
280
+ readonly delta: {
281
+ readonly type: "string";
282
+ };
283
+ readonly slice: {
284
+ readonly type: "string";
285
+ };
286
+ readonly "slice-tokens": {
287
+ readonly type: "string";
288
+ };
289
+ readonly pack: {
290
+ readonly type: "string";
291
+ };
292
+ readonly sign: {
293
+ readonly type: "boolean";
294
+ };
295
+ readonly "budget-tokens": {
296
+ readonly type: "string";
297
+ };
298
+ readonly workspace: {
299
+ readonly type: "string";
300
+ };
301
+ readonly "strip-comments": {
302
+ readonly type: "boolean";
303
+ };
304
+ readonly "remove-empty-lines": {
305
+ readonly type: "boolean";
306
+ };
307
+ readonly "all-members": {
308
+ readonly type: "boolean";
309
+ };
235
310
  readonly help: {
236
311
  readonly type: "boolean";
237
312
  readonly short: "h";
@@ -320,6 +395,49 @@ interface ParsedInvocation {
320
395
  skeleton?: boolean;
321
396
  /** Also write reports/audit.sarif for a CI security gate. */
322
397
  sarif?: boolean;
398
+ /** `health`: treat warnings as failures and exit 2 on a critical check. */
399
+ strict?: boolean;
400
+ /** `mcp`: serve over HTTP instead of stdio. */
401
+ http?: boolean;
402
+ port?: number;
403
+ host?: string;
404
+ token?: string | null;
405
+ noAuth?: boolean;
406
+ allowOrigins?: string[];
407
+ /** `generate`: fetch this repository instead of scanning the current directory. */
408
+ remote?: string;
409
+ /** `--remote`: branch or tag to clone. */
410
+ ref?: string;
411
+ /** `--remote`: allow private addresses and file: URLs. */
412
+ allowPrivate?: boolean;
413
+ /** `--remote`: keep the clone after the run. */
414
+ keepClone?: boolean;
415
+ /** `--include-diffs`: write reports/diff.md. */
416
+ includeDiffs?: boolean;
417
+ /** `--include-logs <n>`: write reports/log.md with the last n commits. */
418
+ includeLogs?: number;
419
+ /** `--token-tree`: write reports/tokens.md. */
420
+ tokenTree?: boolean;
421
+ /** `--delta`: base snapshot directory or manifest.json. */
422
+ delta?: string;
423
+ /** `--slice`: the question the snapshot is narrowed for. */
424
+ slice?: string;
425
+ /** `--slice-tokens`: the budget the slice is planned within. */
426
+ sliceTokens?: number;
427
+ /** `--pack`: single | xml | json. */
428
+ pack?: "single" | "xml" | "json";
429
+ /** `--sign`: sign the manifest with Ed25519. */
430
+ sign?: boolean;
431
+ /** `--budget-tokens`: fit the snapshot into this token budget. */
432
+ budgetTokens?: number;
433
+ /** `--workspace`: comma-separated members, one snapshot each plus WORKSPACE.json. */
434
+ workspace?: string;
435
+ /** `--strip-comments`: remove comment text from JS/TS bodies. */
436
+ stripComments?: boolean;
437
+ /** `--remove-empty-lines`: drop blank lines from emitted bodies (line numbers move). */
438
+ removeEmptyLines?: boolean;
439
+ /** `--all-members` (health): audit every snapshot a `--workspace` run wrote. */
440
+ allMembers?: boolean;
323
441
  }
324
442
  declare function parsePositiveInteger(raw: string | undefined, optionName: string, minimum: number): number | undefined;
325
443
  /**