Skip to content

Commit 302f60a

Browse files
authored
chore(mcp): update interfaces for mcp metabase scan metrics (#414)
- [x] I ran `make setup && make` to update the generated code after editing a `.atd` file (TODO: have a CI check) - [x] I made sure we're still backward compatible with old versions of the CLI. For example, the Semgrep backend need to still be able to _consume_ data generated by Semgrep 1.50.0. See https://atd.readthedocs.io/en/latest/atdgen-tutorial.html#smooth-protocol-upgrades Note that the types related to the semgrep-core JSON output or the semgrep-core RPC do not need to be backward compatible! - [ ] Any accompanying changes in `semgrep-proprietary` are approved and ready to merge once this PR is merged PR in `semgrep-proprietary`​: semgrep/semgrep-proprietary#4823
1 parent f36c260 commit 302f60a

File tree

7 files changed

+572
-45
lines changed

7 files changed

+572
-45
lines changed

semgrep_output_v1.atd

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,6 +1154,11 @@ type prefiltering_stats <ocaml attr="deriving show"> = {
11541154
(* Final 'semgrep scan' output *)
11551155
(*****************************************************************************)
11561156

1157+
type mcp_scan_results = {
1158+
rules: string list;
1159+
total_bytes_scanned: int;
1160+
}
1161+
11571162
(* TODO: rename to scan_output at some point *)
11581163
type cli_output = {
11591164
(* since: 0.92 *)
@@ -1203,6 +1208,9 @@ type cli_output_extra = {
12031208
* logged in.
12041209
* EXPERIMENTAL: since: 1.125.0 *)
12051210
?subprojects: cli_output_subproject_info list option;
1211+
1212+
(* MCP scan results. *)
1213+
?mcp_scan_results: mcp_scan_results option;
12061214
}
12071215

12081216
(*****************************************************************************)

semgrep_output_v1.jsonschema

Lines changed: 13 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

semgrep_output_v1.proto

Lines changed: 9 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

semgrep_output_v1.py

Lines changed: 43 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

semgrep_output_v1.ts

Lines changed: 28 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)