mobbdev 1.1.8 → 1.1.10

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.
@@ -51,18 +51,26 @@ declare const PromptItemZ: z.ZodObject<{
51
51
  name: string;
52
52
  parameters: string;
53
53
  result: string;
54
- rawArguments?: string | undefined;
55
54
  accepted?: boolean | undefined;
55
+ rawArguments?: string | undefined;
56
56
  }, {
57
57
  name: string;
58
58
  parameters: string;
59
59
  result: string;
60
- rawArguments?: string | undefined;
61
60
  accepted?: boolean | undefined;
61
+ rawArguments?: string | undefined;
62
62
  }>>;
63
63
  }, "strip", z.ZodTypeAny, {
64
64
  type: "USER_PROMPT" | "AI_RESPONSE" | "TOOL_EXECUTION" | "AI_THINKING";
65
+ tool?: {
66
+ name: string;
67
+ parameters: string;
68
+ result: string;
69
+ accepted?: boolean | undefined;
70
+ rawArguments?: string | undefined;
71
+ } | undefined;
65
72
  date?: Date | undefined;
73
+ text?: string | undefined;
66
74
  attachedFiles?: {
67
75
  relativePath: string;
68
76
  startLine?: number | undefined;
@@ -71,17 +79,17 @@ declare const PromptItemZ: z.ZodObject<{
71
79
  inputCount: number;
72
80
  outputCount: number;
73
81
  } | undefined;
74
- text?: string | undefined;
82
+ }, {
83
+ type: "USER_PROMPT" | "AI_RESPONSE" | "TOOL_EXECUTION" | "AI_THINKING";
75
84
  tool?: {
76
85
  name: string;
77
86
  parameters: string;
78
87
  result: string;
79
- rawArguments?: string | undefined;
80
88
  accepted?: boolean | undefined;
89
+ rawArguments?: string | undefined;
81
90
  } | undefined;
82
- }, {
83
- type: "USER_PROMPT" | "AI_RESPONSE" | "TOOL_EXECUTION" | "AI_THINKING";
84
91
  date?: Date | undefined;
92
+ text?: string | undefined;
85
93
  attachedFiles?: {
86
94
  relativePath: string;
87
95
  startLine?: number | undefined;
@@ -90,14 +98,6 @@ declare const PromptItemZ: z.ZodObject<{
90
98
  inputCount: number;
91
99
  outputCount: number;
92
100
  } | undefined;
93
- text?: string | undefined;
94
- tool?: {
95
- name: string;
96
- parameters: string;
97
- result: string;
98
- rawArguments?: string | undefined;
99
- accepted?: boolean | undefined;
100
- } | undefined;
101
101
  }>;
102
102
  type PromptItem = z.infer<typeof PromptItemZ>;
103
103
  declare const PromptItemArrayZ: z.ZodArray<z.ZodObject<{
@@ -134,18 +134,26 @@ declare const PromptItemArrayZ: z.ZodArray<z.ZodObject<{
134
134
  name: string;
135
135
  parameters: string;
136
136
  result: string;
137
- rawArguments?: string | undefined;
138
137
  accepted?: boolean | undefined;
138
+ rawArguments?: string | undefined;
139
139
  }, {
140
140
  name: string;
141
141
  parameters: string;
142
142
  result: string;
143
- rawArguments?: string | undefined;
144
143
  accepted?: boolean | undefined;
144
+ rawArguments?: string | undefined;
145
145
  }>>;
146
146
  }, "strip", z.ZodTypeAny, {
147
147
  type: "USER_PROMPT" | "AI_RESPONSE" | "TOOL_EXECUTION" | "AI_THINKING";
148
+ tool?: {
149
+ name: string;
150
+ parameters: string;
151
+ result: string;
152
+ accepted?: boolean | undefined;
153
+ rawArguments?: string | undefined;
154
+ } | undefined;
148
155
  date?: Date | undefined;
156
+ text?: string | undefined;
149
157
  attachedFiles?: {
150
158
  relativePath: string;
151
159
  startLine?: number | undefined;
@@ -154,17 +162,17 @@ declare const PromptItemArrayZ: z.ZodArray<z.ZodObject<{
154
162
  inputCount: number;
155
163
  outputCount: number;
156
164
  } | undefined;
157
- text?: string | undefined;
165
+ }, {
166
+ type: "USER_PROMPT" | "AI_RESPONSE" | "TOOL_EXECUTION" | "AI_THINKING";
158
167
  tool?: {
159
168
  name: string;
160
169
  parameters: string;
161
170
  result: string;
162
- rawArguments?: string | undefined;
163
171
  accepted?: boolean | undefined;
172
+ rawArguments?: string | undefined;
164
173
  } | undefined;
165
- }, {
166
- type: "USER_PROMPT" | "AI_RESPONSE" | "TOOL_EXECUTION" | "AI_THINKING";
167
174
  date?: Date | undefined;
175
+ text?: string | undefined;
168
176
  attachedFiles?: {
169
177
  relativePath: string;
170
178
  startLine?: number | undefined;
@@ -173,14 +181,6 @@ declare const PromptItemArrayZ: z.ZodArray<z.ZodObject<{
173
181
  inputCount: number;
174
182
  outputCount: number;
175
183
  } | undefined;
176
- text?: string | undefined;
177
- tool?: {
178
- name: string;
179
- parameters: string;
180
- result: string;
181
- rawArguments?: string | undefined;
182
- accepted?: boolean | undefined;
183
- } | undefined;
184
184
  }>, "many">;
185
185
  type PromptItemArray = z.infer<typeof PromptItemArrayZ>;
186
186
  type UploadAiBlameOptions = {
@@ -90,6 +90,7 @@ var init_GitService = __esm({
90
90
 
91
91
  // src/args/commands/upload_ai_blame.ts
92
92
  import fsPromises2 from "fs/promises";
93
+ import * as os2 from "os";
93
94
  import path6 from "path";
94
95
  import chalk3 from "chalk";
95
96
  import { withFile } from "tmp-promise";
@@ -4116,8 +4117,8 @@ var IssueTypeAndLanguageZ = z12.object({
4116
4117
  import { z as z13 } from "zod";
4117
4118
  var ADO_PREFIX_PATH = "tfs";
4118
4119
  function detectAdoUrl(args) {
4119
- const { pathname, hostname, scmType } = args;
4120
- const hostnameParts = hostname.split(".");
4120
+ const { pathname, hostname: hostname2, scmType } = args;
4121
+ const hostnameParts = hostname2.split(".");
4121
4122
  const adoCloudHostname = new URL(scmCloudUrl.Ado).hostname;
4122
4123
  const prefixPath = pathname.at(0)?.toLowerCase() === ADO_PREFIX_PATH ? ADO_PREFIX_PATH : "";
4123
4124
  const normalizedPath = prefixPath ? pathname.slice(1) : pathname;
@@ -4146,7 +4147,7 @@ function detectAdoUrl(args) {
4146
4147
  };
4147
4148
  }
4148
4149
  }
4149
- if (hostname === adoCloudHostname || scmType === "Ado" /* Ado */) {
4150
+ if (hostname2 === adoCloudHostname || scmType === "Ado" /* Ado */) {
4150
4151
  if (normalizedPath[normalizedPath.length - 2] === "_git") {
4151
4152
  if (normalizedPath.length === 3) {
4152
4153
  const [organization, _git, repoName] = normalizedPath;
@@ -4174,9 +4175,9 @@ function detectAdoUrl(args) {
4174
4175
  return null;
4175
4176
  }
4176
4177
  function detectGithubUrl(args) {
4177
- const { pathname, hostname, scmType } = args;
4178
+ const { pathname, hostname: hostname2, scmType } = args;
4178
4179
  const githubHostname = new URL(scmCloudUrl.GitHub).hostname;
4179
- if (hostname === githubHostname || scmType === "GitHub" /* GitHub */) {
4180
+ if (hostname2 === githubHostname || scmType === "GitHub" /* GitHub */) {
4180
4181
  if (pathname.length === 2) {
4181
4182
  return {
4182
4183
  scmType: "GitHub" /* GitHub */,
@@ -4188,9 +4189,9 @@ function detectGithubUrl(args) {
4188
4189
  return null;
4189
4190
  }
4190
4191
  function detectGitlabUrl(args) {
4191
- const { pathname, hostname, scmType } = args;
4192
+ const { pathname, hostname: hostname2, scmType } = args;
4192
4193
  const gitlabHostname = new URL(scmCloudUrl.GitLab).hostname;
4193
- if (hostname === gitlabHostname || scmType === "GitLab" /* GitLab */) {
4194
+ if (hostname2 === gitlabHostname || scmType === "GitLab" /* GitLab */) {
4194
4195
  if (pathname.length >= 2) {
4195
4196
  return {
4196
4197
  scmType: "GitLab" /* GitLab */,
@@ -4202,9 +4203,9 @@ function detectGitlabUrl(args) {
4202
4203
  return null;
4203
4204
  }
4204
4205
  function detectBitbucketUrl(args) {
4205
- const { pathname, hostname, scmType } = args;
4206
+ const { pathname, hostname: hostname2, scmType } = args;
4206
4207
  const bitbucketHostname = new URL(scmCloudUrl.Bitbucket).hostname;
4207
- if (hostname === bitbucketHostname || scmType === "Bitbucket" /* Bitbucket */) {
4208
+ if (hostname2 === bitbucketHostname || scmType === "Bitbucket" /* Bitbucket */) {
4208
4209
  if (pathname.length === 2) {
4209
4210
  return {
4210
4211
  scmType: "Bitbucket" /* Bitbucket */,
@@ -5289,6 +5290,12 @@ var PromptItemZ = z26.object({
5289
5290
  }).optional()
5290
5291
  });
5291
5292
  var PromptItemArrayZ = z26.array(PromptItemZ);
5293
+ function getSystemInfo() {
5294
+ return {
5295
+ computerName: os2.hostname(),
5296
+ userName: os2.userInfo().username
5297
+ };
5298
+ }
5292
5299
  function uploadAiBlameBuilder(args) {
5293
5300
  return args.option("prompt", {
5294
5301
  type: "string",
@@ -5391,6 +5398,7 @@ async function uploadAiBlameHandler(args, exitOnError = true) {
5391
5398
  throw new Error(errorMsg);
5392
5399
  }
5393
5400
  const nowIso = (/* @__PURE__ */ new Date()).toISOString();
5401
+ const { computerName, userName } = getSystemInfo();
5394
5402
  const sessions = [];
5395
5403
  for (let i = 0; i < prompts.length; i++) {
5396
5404
  const promptPath = String(prompts[i]);
@@ -5414,7 +5422,9 @@ async function uploadAiBlameHandler(args, exitOnError = true) {
5414
5422
  aiResponseAt: responseTimes[i] || nowIso,
5415
5423
  model: models[i],
5416
5424
  toolName: tools[i],
5417
- blameType: blameTypes[i] || "CHAT" /* Chat */
5425
+ blameType: blameTypes[i] || "CHAT" /* Chat */,
5426
+ computerName,
5427
+ userName
5418
5428
  });
5419
5429
  }
5420
5430
  const authenticatedClient = await getAuthenticatedGQLClient({
@@ -5465,7 +5475,9 @@ async function uploadAiBlameHandler(args, exitOnError = true) {
5465
5475
  aiResponseAt: s.aiResponseAt,
5466
5476
  model: s.model,
5467
5477
  toolName: s.toolName,
5468
- blameType: s.blameType
5478
+ blameType: s.blameType,
5479
+ computerName: s.computerName,
5480
+ userName: s.userName
5469
5481
  };
5470
5482
  });
5471
5483
  const sanitizedFinalizeSessions = await sanitizeData(
package/dist/index.mjs CHANGED
@@ -5405,8 +5405,8 @@ import { z as z12 } from "zod";
5405
5405
  var ADO_PREFIX_PATH = "tfs";
5406
5406
  var NAME_REGEX = /[a-z0-9\-_.+]+/i;
5407
5407
  function detectAdoUrl(args) {
5408
- const { pathname, hostname, scmType } = args;
5409
- const hostnameParts = hostname.split(".");
5408
+ const { pathname, hostname: hostname2, scmType } = args;
5409
+ const hostnameParts = hostname2.split(".");
5410
5410
  const adoCloudHostname = new URL(scmCloudUrl.Ado).hostname;
5411
5411
  const prefixPath = pathname.at(0)?.toLowerCase() === ADO_PREFIX_PATH ? ADO_PREFIX_PATH : "";
5412
5412
  const normalizedPath = prefixPath ? pathname.slice(1) : pathname;
@@ -5435,7 +5435,7 @@ function detectAdoUrl(args) {
5435
5435
  };
5436
5436
  }
5437
5437
  }
5438
- if (hostname === adoCloudHostname || scmType === "Ado" /* Ado */) {
5438
+ if (hostname2 === adoCloudHostname || scmType === "Ado" /* Ado */) {
5439
5439
  if (normalizedPath[normalizedPath.length - 2] === "_git") {
5440
5440
  if (normalizedPath.length === 3) {
5441
5441
  const [organization, _git, repoName] = normalizedPath;
@@ -5463,9 +5463,9 @@ function detectAdoUrl(args) {
5463
5463
  return null;
5464
5464
  }
5465
5465
  function detectGithubUrl(args) {
5466
- const { pathname, hostname, scmType } = args;
5466
+ const { pathname, hostname: hostname2, scmType } = args;
5467
5467
  const githubHostname = new URL(scmCloudUrl.GitHub).hostname;
5468
- if (hostname === githubHostname || scmType === "GitHub" /* GitHub */) {
5468
+ if (hostname2 === githubHostname || scmType === "GitHub" /* GitHub */) {
5469
5469
  if (pathname.length === 2) {
5470
5470
  return {
5471
5471
  scmType: "GitHub" /* GitHub */,
@@ -5477,9 +5477,9 @@ function detectGithubUrl(args) {
5477
5477
  return null;
5478
5478
  }
5479
5479
  function detectGitlabUrl(args) {
5480
- const { pathname, hostname, scmType } = args;
5480
+ const { pathname, hostname: hostname2, scmType } = args;
5481
5481
  const gitlabHostname = new URL(scmCloudUrl.GitLab).hostname;
5482
- if (hostname === gitlabHostname || scmType === "GitLab" /* GitLab */) {
5482
+ if (hostname2 === gitlabHostname || scmType === "GitLab" /* GitLab */) {
5483
5483
  if (pathname.length >= 2) {
5484
5484
  return {
5485
5485
  scmType: "GitLab" /* GitLab */,
@@ -5491,9 +5491,9 @@ function detectGitlabUrl(args) {
5491
5491
  return null;
5492
5492
  }
5493
5493
  function detectBitbucketUrl(args) {
5494
- const { pathname, hostname, scmType } = args;
5494
+ const { pathname, hostname: hostname2, scmType } = args;
5495
5495
  const bitbucketHostname = new URL(scmCloudUrl.Bitbucket).hostname;
5496
- if (hostname === bitbucketHostname || scmType === "Bitbucket" /* Bitbucket */) {
5496
+ if (hostname2 === bitbucketHostname || scmType === "Bitbucket" /* Bitbucket */) {
5497
5497
  if (pathname.length === 2) {
5498
5498
  return {
5499
5499
  scmType: "Bitbucket" /* Bitbucket */,
@@ -5522,10 +5522,10 @@ function getRepoInfo(args) {
5522
5522
  function parseSshUrl(scmURL, scmType) {
5523
5523
  const sshMatch = scmURL.match(/^git@([^:]+):(.+?)(?:\.git)?$/);
5524
5524
  if (!sshMatch) return null;
5525
- const hostname = sshMatch[1];
5525
+ const hostname2 = sshMatch[1];
5526
5526
  const pathPart = sshMatch[2];
5527
- if (!hostname || !pathPart) return null;
5528
- const normalizedHostname = hostname.toLowerCase();
5527
+ if (!hostname2 || !pathPart) return null;
5528
+ const normalizedHostname = hostname2.toLowerCase();
5529
5529
  let projectPath = pathPart;
5530
5530
  if (normalizedHostname === "ssh.dev.azure.com" && projectPath.startsWith("v3/")) {
5531
5531
  projectPath = projectPath.substring(3);
@@ -5613,11 +5613,11 @@ var parseScmURL = (scmURL, scmType) => {
5613
5613
  if (sshResult) return sshResult;
5614
5614
  try {
5615
5615
  const url = new URL(scmURL);
5616
- const hostname = url.hostname.toLowerCase();
5616
+ const hostname2 = url.hostname.toLowerCase();
5617
5617
  const projectPath = url.pathname.substring(1).replace(/.git$/i, "");
5618
5618
  const repo = getRepoInfo({
5619
5619
  pathname: projectPath.split("/"),
5620
- hostname,
5620
+ hostname: hostname2,
5621
5621
  scmType
5622
5622
  });
5623
5623
  if (!repo) {
@@ -5627,7 +5627,7 @@ var parseScmURL = (scmURL, scmType) => {
5627
5627
  new URL(scmCloudUrl.Bitbucket).hostname,
5628
5628
  new URL(scmCloudUrl.Ado).hostname
5629
5629
  ];
5630
- if (knownHosts2.includes(hostname)) {
5630
+ if (knownHosts2.includes(hostname2)) {
5631
5631
  return null;
5632
5632
  }
5633
5633
  const pathElements = projectPath.split("/").filter(Boolean);
@@ -5638,7 +5638,7 @@ var parseScmURL = (scmURL, scmType) => {
5638
5638
  const repoName2 = pathElements[pathElements.length - 1] || "";
5639
5639
  return {
5640
5640
  scmType: "Unknown",
5641
- hostname,
5641
+ hostname: hostname2,
5642
5642
  organization: organization2,
5643
5643
  projectPath,
5644
5644
  repoName: repoName2,
@@ -5651,7 +5651,7 @@ var parseScmURL = (scmURL, scmType) => {
5651
5651
  if (!organization.match(NAME_REGEX) || !repoName.match(NAME_REGEX))
5652
5652
  return null;
5653
5653
  const res = {
5654
- hostname,
5654
+ hostname: hostname2,
5655
5655
  organization,
5656
5656
  projectPath,
5657
5657
  repoName,
@@ -5840,8 +5840,8 @@ function normalizeUrl(repoUrl) {
5840
5840
  }
5841
5841
  const sshMatch = trimmedUrl.match(sshPattern);
5842
5842
  if (sshMatch) {
5843
- const [_all, hostname, reporPath] = sshMatch;
5844
- trimmedUrl = `https://${hostname}/${reporPath}`;
5843
+ const [_all, hostname2, reporPath] = sshMatch;
5844
+ trimmedUrl = `https://${hostname2}/${reporPath}`;
5845
5845
  }
5846
5846
  return trimmedUrl;
5847
5847
  }
@@ -5872,17 +5872,17 @@ function getCloudScmLibTypeFromUrl(url) {
5872
5872
  return void 0;
5873
5873
  }
5874
5874
  const urlObject = new URL(url);
5875
- const hostname = urlObject.hostname.toLowerCase();
5876
- if (hostname === scmCloudHostname.GitLab) {
5875
+ const hostname2 = urlObject.hostname.toLowerCase();
5876
+ if (hostname2 === scmCloudHostname.GitLab) {
5877
5877
  return "GITLAB" /* GITLAB */;
5878
5878
  }
5879
- if (hostname === scmCloudHostname.GitHub) {
5879
+ if (hostname2 === scmCloudHostname.GitHub) {
5880
5880
  return "GITHUB" /* GITHUB */;
5881
5881
  }
5882
- if (hostname === scmCloudHostname.Ado || hostname.endsWith(".visualstudio.com")) {
5882
+ if (hostname2 === scmCloudHostname.Ado || hostname2.endsWith(".visualstudio.com")) {
5883
5883
  return "ADO" /* ADO */;
5884
5884
  }
5885
- if (hostname === scmCloudHostname.Bitbucket) {
5885
+ if (hostname2 === scmCloudHostname.Bitbucket) {
5886
5886
  return "BITBUCKET" /* BITBUCKET */;
5887
5887
  }
5888
5888
  return void 0;
@@ -6038,7 +6038,7 @@ function parseAdoOwnerAndRepo(adoUrl) {
6038
6038
  projectName,
6039
6039
  projectPath,
6040
6040
  pathElements,
6041
- hostname,
6041
+ hostname: hostname2,
6042
6042
  protocol
6043
6043
  } = parsingResult;
6044
6044
  return {
@@ -6048,7 +6048,7 @@ function parseAdoOwnerAndRepo(adoUrl) {
6048
6048
  projectPath,
6049
6049
  pathElements,
6050
6050
  prefixPath: parsingResult.prefixPath,
6051
- origin: `${protocol}//${hostname}`
6051
+ origin: `${protocol}//${hostname2}`
6052
6052
  };
6053
6053
  }
6054
6054
  function isValidAdoRepo(url) {
@@ -7242,8 +7242,8 @@ var BitbucketSCMLib = class extends SCMLib {
7242
7242
  if (!parseScmURLRes) {
7243
7243
  throw new InvalidRepoUrlError("invalid repo url");
7244
7244
  }
7245
- const { protocol, hostname, organization, repoName } = parseScmURLRes;
7246
- const url = `${protocol}//${hostname}/${organization}/${repoName}`;
7245
+ const { protocol, hostname: hostname2, organization, repoName } = parseScmURLRes;
7246
+ const url = `${protocol}//${hostname2}/${organization}/${repoName}`;
7247
7247
  switch (authData.authType) {
7248
7248
  case "public": {
7249
7249
  return trimmedUrl;
@@ -8265,13 +8265,6 @@ function getGithubSdk(params = {}) {
8265
8265
  endingLine
8266
8266
  commit {
8267
8267
  oid
8268
- author {
8269
- user {
8270
- name
8271
- login
8272
- email
8273
- }
8274
- }
8275
8268
  }
8276
8269
  }
8277
8270
  }
@@ -8284,9 +8277,10 @@ function getGithubSdk(params = {}) {
8284
8277
  startingLine: range.startingLine,
8285
8278
  endingLine: range.endingLine,
8286
8279
  commitSha: range.commit.oid,
8287
- email: range.commit.author.user?.email || "",
8288
- name: range.commit.author.user?.name || "",
8289
- login: range.commit.author.user?.login || ""
8280
+ // This is an urgent fix. We need to later remove these fields from the return type and propagate the change.
8281
+ email: "",
8282
+ name: "",
8283
+ login: ""
8290
8284
  }));
8291
8285
  }
8292
8286
  return void 0;
@@ -8457,8 +8451,8 @@ var GithubSCMLib = class extends SCMLib {
8457
8451
  if (!res) {
8458
8452
  throw new InvalidRepoUrlError("invalid repo url");
8459
8453
  }
8460
- const { protocol, hostname, organization, repoName } = res;
8461
- const downloadUrl = isGithubOnPrem(this.url) ? `${protocol}//${hostname}/api/v3/repos/${organization}/${repoName}/zipball/${sha}` : `https://api.${hostname}/repos/${organization}/${repoName}/zipball/${sha}`;
8454
+ const { protocol, hostname: hostname2, organization, repoName } = res;
8455
+ const downloadUrl = isGithubOnPrem(this.url) ? `${protocol}//${hostname2}/api/v3/repos/${organization}/${repoName}/zipball/${sha}` : `https://api.${hostname2}/repos/${organization}/${repoName}/zipball/${sha}`;
8462
8456
  return Promise.resolve(downloadUrl);
8463
8457
  }
8464
8458
  async _getUsernameForAuthUrl() {
@@ -12114,8 +12108,8 @@ if (typeof __filename !== "undefined") {
12114
12108
  }
12115
12109
  var costumeRequire = createRequire(moduleUrl);
12116
12110
  var getCheckmarxPath = () => {
12117
- const os10 = type();
12118
- const cxFileName = os10 === "Windows_NT" ? "cx.exe" : "cx";
12111
+ const os11 = type();
12112
+ const cxFileName = os11 === "Windows_NT" ? "cx.exe" : "cx";
12119
12113
  try {
12120
12114
  return costumeRequire.resolve(`.bin/${cxFileName}`);
12121
12115
  } catch (e) {
@@ -12473,17 +12467,17 @@ function getBrokerHosts(userOrgsAnUserOrgRoles) {
12473
12467
  }
12474
12468
  async function getScmTokenInfo(params) {
12475
12469
  const { gqlClient, repo } = params;
12476
- const userInfo = await gqlClient.getUserInfo();
12477
- if (!userInfo) {
12470
+ const userInfo2 = await gqlClient.getUserInfo();
12471
+ if (!userInfo2) {
12478
12472
  throw new Error("userInfo is null");
12479
12473
  }
12480
- const scmConfigs = getFromArraySafe(userInfo.scmConfigs);
12474
+ const scmConfigs = getFromArraySafe(userInfo2.scmConfigs);
12481
12475
  return getScmConfig({
12482
12476
  url: repo,
12483
12477
  scmConfigs,
12484
12478
  includeOrgTokens: false,
12485
12479
  brokerHosts: getBrokerHosts(
12486
- userInfo.userOrganizationsAndUserOrganizationRoles
12480
+ userInfo2.userOrganizationsAndUserOrganizationRoles
12487
12481
  )
12488
12482
  });
12489
12483
  }
@@ -12751,16 +12745,16 @@ async function _scan(params, { skipPrompts = false } = {}) {
12751
12745
  );
12752
12746
  await open3(scmAuthUrl2);
12753
12747
  for (let i = 0; i < LOGIN_MAX_WAIT / LOGIN_CHECK_DELAY; i++) {
12754
- const userInfo = await gqlClient.getUserInfo();
12755
- if (!userInfo) {
12748
+ const userInfo2 = await gqlClient.getUserInfo();
12749
+ if (!userInfo2) {
12756
12750
  throw new CliError2("User info not found");
12757
12751
  }
12758
- const scmConfigs = getFromArraySafe(userInfo.scmConfigs);
12752
+ const scmConfigs = getFromArraySafe(userInfo2.scmConfigs);
12759
12753
  const tokenInfo2 = getScmConfig({
12760
12754
  url: repoUrl,
12761
12755
  scmConfigs,
12762
12756
  brokerHosts: getBrokerHosts(
12763
- userInfo.userOrganizationsAndUserOrganizationRoles
12757
+ userInfo2.userOrganizationsAndUserOrganizationRoles
12764
12758
  ),
12765
12759
  includeOrgTokens: false
12766
12760
  });
@@ -13264,6 +13258,7 @@ import { z as z32 } from "zod";
13264
13258
 
13265
13259
  // src/args/commands/upload_ai_blame.ts
13266
13260
  import fsPromises3 from "fs/promises";
13261
+ import * as os2 from "os";
13267
13262
  import path11 from "path";
13268
13263
  import chalk9 from "chalk";
13269
13264
  import { withFile } from "tmp-promise";
@@ -13430,6 +13425,12 @@ var PromptItemZ = z31.object({
13430
13425
  }).optional()
13431
13426
  });
13432
13427
  var PromptItemArrayZ = z31.array(PromptItemZ);
13428
+ function getSystemInfo() {
13429
+ return {
13430
+ computerName: os2.hostname(),
13431
+ userName: os2.userInfo().username
13432
+ };
13433
+ }
13433
13434
  function uploadAiBlameBuilder(args) {
13434
13435
  return args.option("prompt", {
13435
13436
  type: "string",
@@ -13532,6 +13533,7 @@ async function uploadAiBlameHandler(args, exitOnError = true) {
13532
13533
  throw new Error(errorMsg);
13533
13534
  }
13534
13535
  const nowIso = (/* @__PURE__ */ new Date()).toISOString();
13536
+ const { computerName, userName } = getSystemInfo();
13535
13537
  const sessions = [];
13536
13538
  for (let i = 0; i < prompts.length; i++) {
13537
13539
  const promptPath = String(prompts[i]);
@@ -13555,7 +13557,9 @@ async function uploadAiBlameHandler(args, exitOnError = true) {
13555
13557
  aiResponseAt: responseTimes[i] || nowIso,
13556
13558
  model: models[i],
13557
13559
  toolName: tools[i],
13558
- blameType: blameTypes[i] || "CHAT" /* Chat */
13560
+ blameType: blameTypes[i] || "CHAT" /* Chat */,
13561
+ computerName,
13562
+ userName
13559
13563
  });
13560
13564
  }
13561
13565
  const authenticatedClient = await getAuthenticatedGQLClient({
@@ -13606,7 +13610,9 @@ async function uploadAiBlameHandler(args, exitOnError = true) {
13606
13610
  aiResponseAt: s.aiResponseAt,
13607
13611
  model: s.model,
13608
13612
  toolName: s.toolName,
13609
- blameType: s.blameType
13613
+ blameType: s.blameType,
13614
+ computerName: s.computerName,
13615
+ userName: s.userName
13610
13616
  };
13611
13617
  });
13612
13618
  const sanitizedFinalizeSessions = await sanitizeData(
@@ -13900,10 +13906,10 @@ async function processAndUploadHookData() {
13900
13906
 
13901
13907
  // src/features/claude_code/install_hook.ts
13902
13908
  import fsPromises5 from "fs/promises";
13903
- import os2 from "os";
13909
+ import os3 from "os";
13904
13910
  import path12 from "path";
13905
13911
  import chalk10 from "chalk";
13906
- var CLAUDE_SETTINGS_PATH = path12.join(os2.homedir(), ".claude", "settings.json");
13912
+ var CLAUDE_SETTINGS_PATH = path12.join(os3.homedir(), ".claude", "settings.json");
13907
13913
  async function claudeSettingsExists() {
13908
13914
  try {
13909
13915
  await fsPromises5.access(CLAUDE_SETTINGS_PATH);
@@ -14365,7 +14371,7 @@ var GetLatestReportByRepoUrlResponseSchema = z33.object({
14365
14371
 
14366
14372
  // src/mcp/services/McpAuthService.ts
14367
14373
  import crypto2 from "crypto";
14368
- import os3 from "os";
14374
+ import os4 from "os";
14369
14375
  import open4 from "open";
14370
14376
  init_configs();
14371
14377
  var McpAuthService = class {
@@ -14409,7 +14415,7 @@ var McpAuthService = class {
14409
14415
  }
14410
14416
  logDebug(`cli login created ${loginId}`);
14411
14417
  const webLoginUrl2 = `${WEB_APP_URL}/mvs-login`;
14412
- const browserUrl = `${webLoginUrl2}/${loginId}?hostname=${os3.hostname()}`;
14418
+ const browserUrl = `${webLoginUrl2}/${loginId}?hostname=${os4.hostname()}`;
14413
14419
  await this.openBrowser(browserUrl, isBackgoundCall);
14414
14420
  logDebug(`waiting for login to complete`);
14415
14421
  let newApiToken = null;
@@ -14876,15 +14882,15 @@ var McpGQLClient = class {
14876
14882
  });
14877
14883
  return overrideValue;
14878
14884
  }
14879
- const userInfo = await this.getUserInfo();
14880
- if (!userInfo?.email) {
14885
+ const userInfo2 = await this.getUserInfo();
14886
+ if (!userInfo2?.email) {
14881
14887
  throw new Error("User email not found");
14882
14888
  }
14883
14889
  logDebug("[GraphQL] Calling GetUserMvsAutoFix query", {
14884
- userEmail: userInfo.email
14890
+ userEmail: userInfo2.email
14885
14891
  });
14886
14892
  const result = await this.clientSdk.GetUserMvsAutoFix({
14887
- userEmail: userInfo.email
14893
+ userEmail: userInfo2.email
14888
14894
  });
14889
14895
  logDebug("[GraphQL] GetUserMvsAutoFix successful", { result });
14890
14896
  return result.user_email_notification_settings?.[0]?.mvs_auto_fix ?? true;
@@ -14911,9 +14917,9 @@ var McpGQLClient = class {
14911
14917
  });
14912
14918
  let currentUserEmail = "%@%";
14913
14919
  try {
14914
- const userInfo = await this.getUserInfo();
14915
- if (userInfo?.email) {
14916
- currentUserEmail = `%${userInfo.email}%`;
14920
+ const userInfo2 = await this.getUserInfo();
14921
+ if (userInfo2?.email) {
14922
+ currentUserEmail = `%${userInfo2.email}%`;
14917
14923
  }
14918
14924
  } catch (err) {
14919
14925
  logDebug("[GraphQL] Failed to get user email, using default pattern", {
@@ -14990,9 +14996,9 @@ var McpGQLClient = class {
14990
14996
  });
14991
14997
  let currentUserEmail = "%@%";
14992
14998
  try {
14993
- const userInfo = await this.getUserInfo();
14994
- if (userInfo?.email) {
14995
- currentUserEmail = `%${userInfo.email}%`;
14999
+ const userInfo2 = await this.getUserInfo();
15000
+ if (userInfo2?.email) {
15001
+ currentUserEmail = `%${userInfo2.email}%`;
14996
15002
  }
14997
15003
  } catch (err) {
14998
15004
  logDebug("[GraphQL] Failed to get user email, using default pattern", {
@@ -15070,7 +15076,7 @@ async function createAuthenticatedMcpGQLClient({
15070
15076
  // src/mcp/services/McpUsageService/host.ts
15071
15077
  import { execSync } from "child_process";
15072
15078
  import fs11 from "fs";
15073
- import os4 from "os";
15079
+ import os5 from "os";
15074
15080
  import path13 from "path";
15075
15081
  var IDEs = ["cursor", "windsurf", "webstorm", "vscode", "claude"];
15076
15082
  var runCommand = (cmd) => {
@@ -15085,7 +15091,7 @@ var gitInfo = {
15085
15091
  email: runCommand("git config user.email")
15086
15092
  };
15087
15093
  var getClaudeWorkspacePaths = () => {
15088
- const home = os4.homedir();
15094
+ const home = os5.homedir();
15089
15095
  const claudeIdePath = path13.join(home, ".claude", "ide");
15090
15096
  const workspacePaths = [];
15091
15097
  if (!fs11.existsSync(claudeIdePath)) {
@@ -15114,7 +15120,7 @@ var getClaudeWorkspacePaths = () => {
15114
15120
  return workspacePaths;
15115
15121
  };
15116
15122
  var getMCPConfigPaths = (hostName) => {
15117
- const home = os4.homedir();
15123
+ const home = os5.homedir();
15118
15124
  const currentDir = process.env["WORKSPACE_FOLDER_PATHS"] || process.env["PWD"] || process.cwd();
15119
15125
  switch (hostName.toLowerCase()) {
15120
15126
  case "cursor":
@@ -15204,7 +15210,7 @@ var readMCPConfig = (hostName) => {
15204
15210
  };
15205
15211
  var getRunningProcesses = () => {
15206
15212
  try {
15207
- return os4.platform() === "win32" ? execSync("tasklist", { encoding: "utf8" }) : execSync("ps aux", { encoding: "utf8" });
15213
+ return os5.platform() === "win32" ? execSync("tasklist", { encoding: "utf8" }) : execSync("ps aux", { encoding: "utf8" });
15208
15214
  } catch {
15209
15215
  return "";
15210
15216
  }
@@ -15279,7 +15285,7 @@ var versionCommands = {
15279
15285
  }
15280
15286
  };
15281
15287
  var getProcessInfo = (pid) => {
15282
- const platform2 = os4.platform();
15288
+ const platform2 = os5.platform();
15283
15289
  try {
15284
15290
  if (platform2 === "linux" || platform2 === "darwin") {
15285
15291
  const output = execSync(`ps -o pid=,ppid=,comm= -p ${pid}`, {
@@ -15398,7 +15404,7 @@ var getHostInfo = (additionalMcpList) => {
15398
15404
  const config2 = allConfigs[ide] || null;
15399
15405
  const ideName = ide.charAt(0).toUpperCase() + ide.slice(1) || "Unknown";
15400
15406
  let ideVersion = "Unknown";
15401
- const platform2 = os4.platform();
15407
+ const platform2 = os5.platform();
15402
15408
  const cmds = versionCommands[ideName]?.[platform2] ?? [];
15403
15409
  for (const cmd of cmds) {
15404
15410
  try {
@@ -15431,14 +15437,14 @@ var getHostInfo = (additionalMcpList) => {
15431
15437
 
15432
15438
  // src/mcp/services/McpUsageService/McpUsageService.ts
15433
15439
  import fetch5 from "node-fetch";
15434
- import os6 from "os";
15440
+ import os7 from "os";
15435
15441
  import { v4 as uuidv43, v5 as uuidv5 } from "uuid";
15436
15442
  init_configs();
15437
15443
 
15438
15444
  // src/mcp/services/McpUsageService/system.ts
15439
15445
  init_configs();
15440
15446
  import fs12 from "fs";
15441
- import os5 from "os";
15447
+ import os6 from "os";
15442
15448
  import path14 from "path";
15443
15449
  var MAX_DEPTH = 2;
15444
15450
  var patterns = ["mcp", "claude"];
@@ -15473,8 +15479,8 @@ var searchDir = async (dir, depth = 0) => {
15473
15479
  };
15474
15480
  var findSystemMCPConfigs = async () => {
15475
15481
  try {
15476
- const home = os5.homedir();
15477
- const platform2 = os5.platform();
15482
+ const home = os6.homedir();
15483
+ const platform2 = os6.platform();
15478
15484
  const knownDirs = platform2 === "win32" ? [
15479
15485
  path14.join(home, ".cursor"),
15480
15486
  path14.join(home, "Documents"),
@@ -15546,7 +15552,7 @@ var McpUsageService = class {
15546
15552
  generateHostId() {
15547
15553
  const stored = configStore.get(this.configKey);
15548
15554
  if (stored?.mcpHostId) return stored.mcpHostId;
15549
- const interfaces = os6.networkInterfaces();
15555
+ const interfaces = os7.networkInterfaces();
15550
15556
  const macs = [];
15551
15557
  for (const iface of Object.values(interfaces)) {
15552
15558
  if (!iface) continue;
@@ -15554,7 +15560,7 @@ var McpUsageService = class {
15554
15560
  if (net.mac && net.mac !== "00:00:00:00:00:00") macs.push(net.mac);
15555
15561
  }
15556
15562
  }
15557
- const macString = macs.length ? macs.sort().join(",") : `${os6.hostname()}-${uuidv43()}`;
15563
+ const macString = macs.length ? macs.sort().join(",") : `${os7.hostname()}-${uuidv43()}`;
15558
15564
  const hostId = uuidv5(macString, uuidv5.DNS);
15559
15565
  logDebug("[UsageService] Generated new host ID", { hostId });
15560
15566
  return hostId;
@@ -15577,7 +15583,7 @@ var McpUsageService = class {
15577
15583
  mcpHostId,
15578
15584
  organizationId,
15579
15585
  mcpVersion: packageJson.version,
15580
- mcpOsName: os6.platform(),
15586
+ mcpOsName: os7.platform(),
15581
15587
  mcps: JSON.stringify(mcps),
15582
15588
  status,
15583
15589
  userName: user.name,
@@ -17900,7 +17906,7 @@ For a complete security audit workflow, use the \`full-security-audit\` prompt.
17900
17906
 
17901
17907
  // src/mcp/services/McpDetectionService/CursorMcpDetectionService.ts
17902
17908
  import * as fs15 from "fs";
17903
- import * as os8 from "os";
17909
+ import * as os9 from "os";
17904
17910
  import * as path16 from "path";
17905
17911
 
17906
17912
  // src/mcp/services/McpDetectionService/BaseMcpDetectionService.ts
@@ -17911,11 +17917,11 @@ import * as path15 from "path";
17911
17917
 
17912
17918
  // src/mcp/services/McpDetectionService/McpDetectionServiceUtils.ts
17913
17919
  import * as fs13 from "fs";
17914
- import * as os7 from "os";
17920
+ import * as os8 from "os";
17915
17921
 
17916
17922
  // src/mcp/services/McpDetectionService/VscodeMcpDetectionService.ts
17917
17923
  import * as fs16 from "fs";
17918
- import * as os9 from "os";
17924
+ import * as os10 from "os";
17919
17925
  import * as path17 from "path";
17920
17926
 
17921
17927
  // src/mcp/tools/checkForNewAvailableFixes/CheckForNewAvailableFixesTool.ts
@@ -18009,8 +18015,8 @@ var BaseTool = class {
18009
18015
  if (this.hasAuthentication) {
18010
18016
  logDebug(`Authenticating tool: ${this.name}`, { args });
18011
18017
  const mcpGqlClient = await createAuthenticatedMcpGQLClient();
18012
- const userInfo = await mcpGqlClient.getUserInfo();
18013
- logDebug("User authenticated successfully", { userInfo });
18018
+ const userInfo2 = await mcpGqlClient.getUserInfo();
18019
+ logDebug("User authenticated successfully", { userInfo: userInfo2 });
18014
18020
  }
18015
18021
  const validatedArgs = this.validateInput(args);
18016
18022
  logDebug(`Tool ${this.name} input validation successful`, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mobbdev",
3
- "version": "1.1.8",
3
+ "version": "1.1.10",
4
4
  "description": "Automated secure code remediation tool",
5
5
  "repository": "git+https://github.com/mobb-dev/bugsy.git",
6
6
  "main": "dist/index.mjs",