mobbdev 1.2.29 → 1.2.32

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.
@@ -851,12 +851,15 @@ var init_client_generates = __esm({
851
851
  }
852
852
  `;
853
853
  AnalyzeCommitForExtensionAiBlameDocument = `
854
- mutation AnalyzeCommitForExtensionAIBlame($repositoryURL: String!, $commitSha: String!, $organizationId: String!, $commitTimestamp: Timestamp) {
854
+ mutation AnalyzeCommitForExtensionAIBlame($repositoryURL: String!, $commitSha: String!, $organizationId: String!, $commitTimestamp: Timestamp, $commitAuthor: GitIdentityInput, $commitCommitter: GitIdentityInput, $commitCoAuthors: [GitIdentityInput!]) {
855
855
  analyzeCommitForAIBlame(
856
856
  repositoryURL: $repositoryURL
857
857
  commitSha: $commitSha
858
858
  organizationId: $organizationId
859
859
  commitTimestamp: $commitTimestamp
860
+ commitAuthor: $commitAuthor
861
+ commitCommitter: $commitCommitter
862
+ commitCoAuthors: $commitCoAuthors
860
863
  ) {
861
864
  __typename
862
865
  ... on ProcessAIBlameFinalResult {
@@ -2636,6 +2639,217 @@ var init_configs = __esm({
2636
2639
  }
2637
2640
  });
2638
2641
 
2642
+ // src/utils/blame/gitBlameTypes.ts
2643
+ import { z as z19 } from "zod";
2644
+ function parseCoAuthorValue(raw) {
2645
+ const trimmed = raw.trim();
2646
+ if (!trimmed) {
2647
+ return null;
2648
+ }
2649
+ const openBracket = trimmed.lastIndexOf("<");
2650
+ const closeBracket = trimmed.lastIndexOf(">");
2651
+ if (openBracket === -1 || closeBracket === -1 || closeBracket < openBracket) {
2652
+ return null;
2653
+ }
2654
+ const name = trimmed.slice(0, openBracket).trim();
2655
+ const email = trimmed.slice(openBracket + 1, closeBracket).trim();
2656
+ if (!name || !email) {
2657
+ return null;
2658
+ }
2659
+ return { name, email };
2660
+ }
2661
+ function parseCommitLine(line) {
2662
+ const parts = line.split("\0");
2663
+ if (parts.length < 7) {
2664
+ return null;
2665
+ }
2666
+ return {
2667
+ sha: parts[0],
2668
+ author: { name: parts[2], email: parts[1] },
2669
+ committer: { name: parts[4], email: parts[3] },
2670
+ coAuthors: parts.slice(7).map(parseCoAuthorValue).filter((v) => v !== null),
2671
+ timestamp: parseInt(parts[5], 10),
2672
+ message: parts[6]
2673
+ };
2674
+ }
2675
+ var PrepareGitBlameMessageZ, PrepareGitBlameResponseMessageZ, CommitMetadataZ, LineToCommitMapZ, CommitMetadataMapZ, BlameInfoZ, LineRangeZ, PrContextZ, PrepareCommitBlameMessageZ, BlameLineInfoZ, FileBlameDataZ, ChunkFetchResultZ, FileBlameResponseEntryZ, CommitBlameDataZ, CommitInfoZ, GitIdentityZ, COMMIT_LOG_FORMAT, CommitDataZ, PrDiffDataZ, PrStatsZ, CommitsManifestZ, BlameLineEntryZ, BlameLinesDataZ, PrepareCommitBlameResponseMessageZ;
2676
+ var init_gitBlameTypes = __esm({
2677
+ "src/utils/blame/gitBlameTypes.ts"() {
2678
+ "use strict";
2679
+ PrepareGitBlameMessageZ = z19.object({
2680
+ reportId: z19.string(),
2681
+ repoArchivePath: z19.string()
2682
+ });
2683
+ PrepareGitBlameResponseMessageZ = z19.object({
2684
+ reportId: z19.string()
2685
+ });
2686
+ CommitMetadataZ = z19.object({
2687
+ author: z19.string().optional(),
2688
+ "author-mail": z19.string().optional(),
2689
+ "author-time": z19.string().optional(),
2690
+ "author-tz": z19.string().optional(),
2691
+ committer: z19.string().optional(),
2692
+ "committer-mail": z19.string().optional(),
2693
+ "committer-time": z19.string().optional(),
2694
+ "committer-tz": z19.string().optional(),
2695
+ summary: z19.string().optional(),
2696
+ filename: z19.string().optional()
2697
+ });
2698
+ LineToCommitMapZ = z19.record(z19.string(), z19.string());
2699
+ CommitMetadataMapZ = z19.record(z19.string(), CommitMetadataZ);
2700
+ BlameInfoZ = z19.object({
2701
+ lineToCommit: LineToCommitMapZ,
2702
+ commitMetadata: CommitMetadataMapZ
2703
+ });
2704
+ LineRangeZ = z19.object({
2705
+ /** First line in chunk (1-indexed) */
2706
+ start: z19.number(),
2707
+ /** Last line in chunk (inclusive) */
2708
+ end: z19.number()
2709
+ });
2710
+ PrContextZ = z19.object({
2711
+ prNumber: z19.number(),
2712
+ repositoryUrl: z19.string(),
2713
+ organizationId: z19.string(),
2714
+ userEmail: z19.string(),
2715
+ source: z19.enum(["pr", "github"]),
2716
+ githubContext: z19.object({
2717
+ prNumber: z19.number(),
2718
+ installationId: z19.number(),
2719
+ repositoryURL: z19.string()
2720
+ }).optional()
2721
+ });
2722
+ PrepareCommitBlameMessageZ = z19.object({
2723
+ /** Commit blame request ID from database (for tracking and updating status) */
2724
+ commitBlameRequestId: z19.string(),
2725
+ /** Organization ID (for org-scoped caching) */
2726
+ organizationId: z19.string(),
2727
+ /** Full repository URL (e.g., https://github.com/org/repo) */
2728
+ repositoryUrl: z19.string(),
2729
+ /** Commit SHA to analyze (typically PR head commit) */
2730
+ commitSha: z19.string(),
2731
+ /** Authentication headers for repository access (e.g., GitHub token) */
2732
+ extraHeaders: z19.record(z19.string(), z19.string()).default({}),
2733
+ // --- PR analysis fields ---
2734
+ /** Target branch name (from getPr() base.ref). When set, enables PR analysis mode. */
2735
+ targetBranch: z19.string().optional(),
2736
+ /** Context for triggering blame attribution analysis after SCM agent completes. */
2737
+ prContext: PrContextZ.optional(),
2738
+ /** User email for blame attribution analysis trigger context (used for both PR and single commit flows). */
2739
+ userEmail: z19.string().optional()
2740
+ });
2741
+ BlameLineInfoZ = z19.object({
2742
+ /** Line number as it appeared in the introducing commit */
2743
+ originalLineNumber: z19.number(),
2744
+ /** Commit SHA that introduced this line */
2745
+ commitSha: z19.string(),
2746
+ /** Author name for this line */
2747
+ authorName: z19.string().optional(),
2748
+ /** Author email for this line */
2749
+ authorEmail: z19.string().optional()
2750
+ }).nullable();
2751
+ FileBlameDataZ = z19.array(BlameLineInfoZ);
2752
+ ChunkFetchResultZ = z19.object({
2753
+ filePath: z19.string(),
2754
+ lines: z19.array(z19.number()),
2755
+ data: FileBlameDataZ.nullable()
2756
+ });
2757
+ FileBlameResponseEntryZ = z19.object({
2758
+ /** Chunk index (0 for small files, 0-N for large file chunks) */
2759
+ chunkIndex: z19.number(),
2760
+ /** Blame data array (1-indexed, index 0 is null) */
2761
+ blameData: FileBlameDataZ
2762
+ });
2763
+ CommitBlameDataZ = z19.record(
2764
+ z19.string(),
2765
+ // fileName
2766
+ z19.array(FileBlameResponseEntryZ)
2767
+ );
2768
+ CommitInfoZ = z19.object({
2769
+ /** Number of parent commits (1 = normal commit, 2+ = merge commit, null = failed to determine) */
2770
+ parentCount: z19.number().nullable()
2771
+ });
2772
+ GitIdentityZ = z19.object({
2773
+ name: z19.string(),
2774
+ email: z19.string()
2775
+ });
2776
+ COMMIT_LOG_FORMAT = "%H%x00%ae%x00%an%x00%ce%x00%cn%x00%at%x00%s%x00%(trailers:key=Co-authored-by,valueonly,separator=%x00)";
2777
+ CommitDataZ = z19.object({
2778
+ diff: z19.string(),
2779
+ author: GitIdentityZ,
2780
+ committer: GitIdentityZ,
2781
+ coAuthors: z19.array(GitIdentityZ),
2782
+ timestamp: z19.number(),
2783
+ // Unix timestamp in seconds
2784
+ message: z19.string().optional(),
2785
+ parentCount: z19.number().nullable()
2786
+ });
2787
+ PrDiffDataZ = z19.object({
2788
+ diff: z19.string()
2789
+ });
2790
+ PrStatsZ = z19.object({
2791
+ additions: z19.number(),
2792
+ deletions: z19.number()
2793
+ });
2794
+ CommitsManifestZ = z19.object({
2795
+ commits: z19.array(z19.string())
2796
+ // Array of commit SHAs in order
2797
+ });
2798
+ BlameLineEntryZ = z19.object({
2799
+ file: z19.string(),
2800
+ line: z19.number(),
2801
+ originalCommitSha: z19.string(),
2802
+ originalLineNumber: z19.number()
2803
+ });
2804
+ BlameLinesDataZ = z19.object({
2805
+ lines: z19.array(BlameLineEntryZ)
2806
+ });
2807
+ PrepareCommitBlameResponseMessageZ = z19.object({
2808
+ /** Commit blame request ID (matches request, used to update specific DB record) */
2809
+ commitBlameRequestId: z19.string(),
2810
+ /** Organization ID (matches request) */
2811
+ organizationId: z19.string(),
2812
+ /** Repository URL (matches request) */
2813
+ repositoryUrl: z19.string(),
2814
+ /** Commit SHA analyzed (matches request) */
2815
+ commitSha: z19.string(),
2816
+ /** Processing status */
2817
+ status: z19.enum(["success", "failure"]),
2818
+ /** Error message (only present if status is 'failure') */
2819
+ error: z19.string().optional(),
2820
+ /**
2821
+ * Blame data for all processed files/chunks.
2822
+ * Empty dictionary if status is 'failure'.
2823
+ * Contains line mappings as arrays if status is 'success'.
2824
+ */
2825
+ blameData: CommitBlameDataZ,
2826
+ /**
2827
+ * Info about each commit referenced in the blame data plus the head commit.
2828
+ * Keyed by commit SHA, deduplicated.
2829
+ * Empty dictionary if status is 'failure'.
2830
+ */
2831
+ commits: z19.record(z19.string(), CommitInfoZ).default({}),
2832
+ // --- New PR diff computation response fields ---
2833
+ /** S3 paths for commit-level data (commitSha → S3 key). Present in PR analysis mode and single commit mode. */
2834
+ commitDataS3Paths: z19.record(z19.string(), z19.string()).optional(),
2835
+ /** S3 key for PR diff JSON. Present in PR analysis mode. */
2836
+ prDiffS3Path: z19.string().optional(),
2837
+ /** S3 key for commits manifest. Present in PR analysis mode. */
2838
+ commitsManifestS3Path: z19.string().optional(),
2839
+ /** S3 key for per-line targeted blame data. Present in PR analysis mode. */
2840
+ blameLinesS3Path: z19.string().optional(),
2841
+ /** S3 key for PR stats (additions/deletions). Present in PR analysis mode. */
2842
+ prStatsS3Path: z19.string().optional(),
2843
+ /** PR context passed through from request for response handler. */
2844
+ prContext: PrContextZ.optional(),
2845
+ /** PR title from the request metadata (passed through). */
2846
+ prTitle: z19.string().optional(),
2847
+ /** User email passed through from request for single commit blame attribution analysis trigger. */
2848
+ userEmail: z19.string().optional()
2849
+ });
2850
+ }
2851
+ });
2852
+
2639
2853
  // src/features/analysis/scm/services/ExcludedDirs.ts
2640
2854
  var EXCLUDED_DIRS;
2641
2855
  var init_ExcludedDirs = __esm({
@@ -3308,6 +3522,7 @@ var init_GitService = __esm({
3308
3522
  "src/features/analysis/scm/services/GitService.ts"() {
3309
3523
  "use strict";
3310
3524
  init_configs();
3525
+ init_gitBlameTypes();
3311
3526
  init_urlParser2();
3312
3527
  init_FileUtils();
3313
3528
  MAX_COMMIT_DIFF_SIZE_BYTES = 3 * 1024 * 1024;
@@ -3804,7 +4019,7 @@ ${rootContent}`;
3804
4019
  const DIFF_DELIMITER = "---MOBB_DIFF_START---";
3805
4020
  const output = await this.git.show([
3806
4021
  commitSha,
3807
- `--format=%cI%n${DIFF_DELIMITER}`,
4022
+ `--format=${COMMIT_LOG_FORMAT}%n${DIFF_DELIMITER}`,
3808
4023
  "--patch"
3809
4024
  ]);
3810
4025
  const delimiterIndex = output.indexOf(DIFF_DELIMITER);
@@ -3825,16 +4040,16 @@ ${rootContent}`;
3825
4040
  });
3826
4041
  return null;
3827
4042
  }
3828
- const metadataLines = metadataOutput.trim().split("\n");
3829
- if (metadataLines.length < 1 || !metadataLines[0]) {
4043
+ const metadataLine = metadataOutput.trim();
4044
+ const parsed = parseCommitLine(metadataLine);
4045
+ if (!parsed) {
3830
4046
  this.log("[GitService] Unexpected metadata format", "warning", {
3831
4047
  commitSha,
3832
- metadataLines
4048
+ metadataLine
3833
4049
  });
3834
4050
  return null;
3835
4051
  }
3836
- const timestampStr = metadataLines[0];
3837
- const timestamp = new Date(timestampStr);
4052
+ const timestamp = new Date(parsed.timestamp * 1e3);
3838
4053
  this.log("[GitService] Local commit data retrieved", "debug", {
3839
4054
  commitSha,
3840
4055
  diffSizeBytes,
@@ -3842,7 +4057,10 @@ ${rootContent}`;
3842
4057
  });
3843
4058
  return {
3844
4059
  diff,
3845
- timestamp
4060
+ timestamp,
4061
+ author: parsed.author,
4062
+ committer: parsed.committer,
4063
+ coAuthors: parsed.coAuthors
3846
4064
  };
3847
4065
  } catch (error) {
3848
4066
  const errorMessage = `Failed to get local commit data: ${error.message}`;
@@ -3860,7 +4078,7 @@ import * as os3 from "os";
3860
4078
  import path6 from "path";
3861
4079
  import chalk3 from "chalk";
3862
4080
  import { withFile } from "tmp-promise";
3863
- import z26 from "zod";
4081
+ import z27 from "zod";
3864
4082
 
3865
4083
  // src/commands/handleMobbLogin.ts
3866
4084
  import chalk2 from "chalk";
@@ -6284,38 +6502,38 @@ import querystring2 from "querystring";
6284
6502
  import * as bitbucketPkgNode from "bitbucket";
6285
6503
  import bitbucketPkg from "bitbucket";
6286
6504
  import Debug4 from "debug";
6287
- import { z as z20 } from "zod";
6505
+ import { z as z21 } from "zod";
6288
6506
 
6289
6507
  // src/features/analysis/scm/bitbucket/validation.ts
6290
- import { z as z19 } from "zod";
6291
- var BitbucketAuthResultZ = z19.object({
6292
- access_token: z19.string(),
6293
- token_type: z19.string(),
6294
- refresh_token: z19.string()
6508
+ import { z as z20 } from "zod";
6509
+ var BitbucketAuthResultZ = z20.object({
6510
+ access_token: z20.string(),
6511
+ token_type: z20.string(),
6512
+ refresh_token: z20.string()
6295
6513
  });
6296
6514
 
6297
6515
  // src/features/analysis/scm/bitbucket/bitbucket.ts
6298
6516
  var debug4 = Debug4("scm:bitbucket");
6299
6517
  var BITBUCKET_HOSTNAME = "bitbucket.org";
6300
- var TokenExpiredErrorZ = z20.object({
6301
- status: z20.number(),
6302
- error: z20.object({
6303
- type: z20.string(),
6304
- error: z20.object({
6305
- message: z20.string()
6518
+ var TokenExpiredErrorZ = z21.object({
6519
+ status: z21.number(),
6520
+ error: z21.object({
6521
+ type: z21.string(),
6522
+ error: z21.object({
6523
+ message: z21.string()
6306
6524
  })
6307
6525
  })
6308
6526
  });
6309
6527
  var BITBUCKET_ACCESS_TOKEN_URL = `https://${BITBUCKET_HOSTNAME}/site/oauth2/access_token`;
6310
- var BitbucketParseResultZ = z20.object({
6311
- organization: z20.string(),
6312
- repoName: z20.string(),
6313
- hostname: z20.literal(BITBUCKET_HOSTNAME)
6528
+ var BitbucketParseResultZ = z21.object({
6529
+ organization: z21.string(),
6530
+ repoName: z21.string(),
6531
+ hostname: z21.literal(BITBUCKET_HOSTNAME)
6314
6532
  });
6315
6533
 
6316
6534
  // src/features/analysis/scm/bitbucket/BitbucketSCMLib.ts
6317
6535
  import { setTimeout as setTimeout3 } from "timers/promises";
6318
- import { z as z21 } from "zod";
6536
+ import { z as z22 } from "zod";
6319
6537
 
6320
6538
  // src/features/analysis/scm/constants.ts
6321
6539
  var REPORT_DEFAULT_FILE_NAME = "report.json";
@@ -6324,7 +6542,7 @@ var REPORT_DEFAULT_FILE_NAME = "report.json";
6324
6542
  init_env();
6325
6543
 
6326
6544
  // src/features/analysis/scm/github/GithubSCMLib.ts
6327
- import { z as z22 } from "zod";
6545
+ import { z as z23 } from "zod";
6328
6546
  init_client_generates();
6329
6547
 
6330
6548
  // src/features/analysis/scm/github/github.ts
@@ -6362,11 +6580,11 @@ var debug5 = debugModule("mobb:shared");
6362
6580
  init_env();
6363
6581
 
6364
6582
  // src/features/analysis/scm/gitlab/types.ts
6365
- import { z as z23 } from "zod";
6366
- var GitlabAuthResultZ = z23.object({
6367
- access_token: z23.string(),
6368
- token_type: z23.string(),
6369
- refresh_token: z23.string()
6583
+ import { z as z24 } from "zod";
6584
+ var GitlabAuthResultZ = z24.object({
6585
+ access_token: z24.string(),
6586
+ token_type: z24.string(),
6587
+ refresh_token: z24.string()
6370
6588
  });
6371
6589
 
6372
6590
  // src/features/analysis/scm/gitlab/gitlab.ts
@@ -6376,69 +6594,69 @@ var debug6 = Debug5("scm:gitlab");
6376
6594
  init_client_generates();
6377
6595
 
6378
6596
  // src/features/analysis/scm/scmFactory.ts
6379
- import { z as z24 } from "zod";
6597
+ import { z as z25 } from "zod";
6380
6598
 
6381
6599
  // src/features/analysis/graphql/gql.ts
6382
6600
  init_client_generates();
6383
6601
 
6384
6602
  // src/features/analysis/graphql/types.ts
6385
6603
  init_client_generates();
6386
- import { z as z25 } from "zod";
6387
- var VulnerabilityReportIssueCodeNodeZ = z25.object({
6388
- vulnerabilityReportIssueId: z25.string(),
6389
- path: z25.string(),
6390
- startLine: z25.number(),
6391
- vulnerabilityReportIssue: z25.object({
6392
- fixId: z25.string(),
6393
- category: z25.nativeEnum(Vulnerability_Report_Issue_Category_Enum),
6394
- safeIssueType: z25.string(),
6395
- vulnerabilityReportIssueTags: z25.array(
6396
- z25.object({
6397
- tag: z25.nativeEnum(Vulnerability_Report_Issue_Tag_Enum)
6604
+ import { z as z26 } from "zod";
6605
+ var VulnerabilityReportIssueCodeNodeZ = z26.object({
6606
+ vulnerabilityReportIssueId: z26.string(),
6607
+ path: z26.string(),
6608
+ startLine: z26.number(),
6609
+ vulnerabilityReportIssue: z26.object({
6610
+ fixId: z26.string(),
6611
+ category: z26.nativeEnum(Vulnerability_Report_Issue_Category_Enum),
6612
+ safeIssueType: z26.string(),
6613
+ vulnerabilityReportIssueTags: z26.array(
6614
+ z26.object({
6615
+ tag: z26.nativeEnum(Vulnerability_Report_Issue_Tag_Enum)
6398
6616
  })
6399
6617
  )
6400
6618
  })
6401
6619
  });
6402
- var VulnerabilityReportIssueNoFixCodeNodeZ = z25.object({
6403
- vulnerabilityReportIssues: z25.array(
6404
- z25.object({
6405
- id: z25.string(),
6406
- fixId: z25.string().nullable(),
6407
- category: z25.nativeEnum(Vulnerability_Report_Issue_Category_Enum),
6408
- safeIssueType: z25.string(),
6409
- fpId: z25.string().uuid().nullable(),
6410
- codeNodes: z25.array(
6411
- z25.object({
6412
- path: z25.string(),
6413
- startLine: z25.number()
6620
+ var VulnerabilityReportIssueNoFixCodeNodeZ = z26.object({
6621
+ vulnerabilityReportIssues: z26.array(
6622
+ z26.object({
6623
+ id: z26.string(),
6624
+ fixId: z26.string().nullable(),
6625
+ category: z26.nativeEnum(Vulnerability_Report_Issue_Category_Enum),
6626
+ safeIssueType: z26.string(),
6627
+ fpId: z26.string().uuid().nullable(),
6628
+ codeNodes: z26.array(
6629
+ z26.object({
6630
+ path: z26.string(),
6631
+ startLine: z26.number()
6414
6632
  })
6415
6633
  ),
6416
- vulnerabilityReportIssueTags: z25.array(
6417
- z25.object({
6418
- tag: z25.nativeEnum(Vulnerability_Report_Issue_Tag_Enum)
6634
+ vulnerabilityReportIssueTags: z26.array(
6635
+ z26.object({
6636
+ tag: z26.nativeEnum(Vulnerability_Report_Issue_Tag_Enum)
6419
6637
  })
6420
6638
  )
6421
6639
  })
6422
6640
  )
6423
6641
  });
6424
- var GetVulByNodesMetadataZ = z25.object({
6425
- vulnerabilityReportIssueCodeNodes: z25.array(VulnerabilityReportIssueCodeNodeZ),
6426
- nonFixablePrVuls: z25.object({
6427
- aggregate: z25.object({
6428
- count: z25.number()
6642
+ var GetVulByNodesMetadataZ = z26.object({
6643
+ vulnerabilityReportIssueCodeNodes: z26.array(VulnerabilityReportIssueCodeNodeZ),
6644
+ nonFixablePrVuls: z26.object({
6645
+ aggregate: z26.object({
6646
+ count: z26.number()
6429
6647
  })
6430
6648
  }),
6431
- fixablePrVuls: z25.object({
6432
- aggregate: z25.object({
6433
- count: z25.number()
6649
+ fixablePrVuls: z26.object({
6650
+ aggregate: z26.object({
6651
+ count: z26.number()
6434
6652
  })
6435
6653
  }),
6436
- totalScanVulnerabilities: z25.object({
6437
- aggregate: z25.object({
6438
- count: z25.number()
6654
+ totalScanVulnerabilities: z26.object({
6655
+ aggregate: z26.object({
6656
+ count: z26.number()
6439
6657
  })
6440
6658
  }),
6441
- irrelevantVulnerabilityReportIssue: z25.array(
6659
+ irrelevantVulnerabilityReportIssue: z26.array(
6442
6660
  VulnerabilityReportIssueNoFixCodeNodeZ
6443
6661
  )
6444
6662
  });
@@ -7338,7 +7556,8 @@ import { OpenRedaction } from "@openredaction/openredaction";
7338
7556
  var openRedaction = new OpenRedaction({
7339
7557
  patterns: [
7340
7558
  // Core Personal Data
7341
- "EMAIL",
7559
+ // Removed EMAIL - causes false positives in code/test snippets (e.g. --author="Eve Author <eve@example.com>")
7560
+ // Prefer false negatives over false positives for this use case.
7342
7561
  "SSN",
7343
7562
  "NATIONAL_INSURANCE_UK",
7344
7563
  "DATE_OF_BIRTH",
@@ -7353,7 +7572,8 @@ var openRedaction = new OpenRedaction({
7353
7572
  "VISA_MRZ",
7354
7573
  "TAX_ID",
7355
7574
  // Financial Data (removed SWIFT_BIC, CARD_AUTH_CODE - too broad, causing false positives with authentication words)
7356
- "CREDIT_CARD",
7575
+ // Removed CREDIT_CARD - causes false positives on zero-filled UUIDs (e.g. '00000000-0000-0000-0000-000000000000')
7576
+ // Prefer false negatives over false positives for this use case.
7357
7577
  "IBAN",
7358
7578
  "BANK_ACCOUNT_UK",
7359
7579
  "ROUTING_NUMBER_US",
@@ -7439,15 +7659,6 @@ async function sanitizeDataWithCounts(obj) {
7439
7659
  ...piiDetections.low
7440
7660
  ];
7441
7661
  for (const detection of allDetections) {
7442
- if (detection.type === "CREDIT_CARD") {
7443
- const start = detection.position[0];
7444
- const end = detection.position[1];
7445
- const charBefore = (start > 0 ? str[start - 1] : "") ?? "";
7446
- const charAfter = str[end] ?? "";
7447
- if (charBefore === "." || charBefore >= "0" && charBefore <= "9" || charAfter >= "0" && charAfter <= "9") {
7448
- continue;
7449
- }
7450
- }
7451
7662
  counts.detections.total++;
7452
7663
  if (detection.severity === "high") counts.detections.high++;
7453
7664
  else if (detection.severity === "medium") counts.detections.medium++;
@@ -7500,8 +7711,8 @@ var defaultLogger = {
7500
7711
  }
7501
7712
  }
7502
7713
  };
7503
- var PromptItemZ = z26.object({
7504
- type: z26.enum([
7714
+ var PromptItemZ = z27.object({
7715
+ type: z27.enum([
7505
7716
  "USER_PROMPT",
7506
7717
  "AI_RESPONSE",
7507
7718
  "TOOL_EXECUTION",
@@ -7509,32 +7720,32 @@ var PromptItemZ = z26.object({
7509
7720
  "MCP_TOOL_CALL"
7510
7721
  // MCP (Model Context Protocol) tool invocation
7511
7722
  ]),
7512
- attachedFiles: z26.array(
7513
- z26.object({
7514
- relativePath: z26.string(),
7515
- startLine: z26.number().optional()
7723
+ attachedFiles: z27.array(
7724
+ z27.object({
7725
+ relativePath: z27.string(),
7726
+ startLine: z27.number().optional()
7516
7727
  })
7517
7728
  ).optional(),
7518
- tokens: z26.object({
7519
- inputCount: z26.number(),
7520
- outputCount: z26.number()
7729
+ tokens: z27.object({
7730
+ inputCount: z27.number(),
7731
+ outputCount: z27.number()
7521
7732
  }).optional(),
7522
- text: z26.string().optional(),
7523
- date: z26.date().optional(),
7524
- tool: z26.object({
7525
- name: z26.string(),
7526
- parameters: z26.string(),
7527
- result: z26.string(),
7528
- rawArguments: z26.string().optional(),
7529
- accepted: z26.boolean().optional(),
7733
+ text: z27.string().optional(),
7734
+ date: z27.date().optional(),
7735
+ tool: z27.object({
7736
+ name: z27.string(),
7737
+ parameters: z27.string(),
7738
+ result: z27.string(),
7739
+ rawArguments: z27.string().optional(),
7740
+ accepted: z27.boolean().optional(),
7530
7741
  // MCP-specific fields (only populated for MCP_TOOL_CALL type)
7531
- mcpServer: z26.string().optional(),
7742
+ mcpServer: z27.string().optional(),
7532
7743
  // MCP server name (e.g., "datadog", "mobb-mcp")
7533
- mcpToolName: z26.string().optional()
7744
+ mcpToolName: z27.string().optional()
7534
7745
  // MCP tool name without prefix (e.g., "scan_and_fix_vulnerabilities")
7535
7746
  }).optional()
7536
7747
  });
7537
- var PromptItemArrayZ = z26.array(PromptItemZ);
7748
+ var PromptItemArrayZ = z27.array(PromptItemZ);
7538
7749
  async function getRepositoryUrl() {
7539
7750
  try {
7540
7751
  const gitService = new GitService(process.cwd());