@lonca/baron-mcp-server 0.1.0 → 0.3.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.
package/dist/bin.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  createMcpServer,
4
4
  loadPorts
5
- } from "./chunk-MUGSC3EW.js";
5
+ } from "./chunk-IJ6VTOQW.js";
6
6
 
7
7
  // src/bin.ts
8
8
  import { cwd, env, exit, stderr } from "process";
@@ -65,13 +65,15 @@ var MCP_TOOL_NAMES = {
65
65
  transition: "baron_issue_transition",
66
66
  comment: "baron_issue_comment",
67
67
  link: "baron_issue_link",
68
+ assign: "baron_issue_assign",
68
69
  query: "baron_issue_query"
69
70
  };
70
71
  var SCM_TOOL_NAMES = {
71
72
  branchCreate: "baron_scm_branch_create",
72
73
  prCreate: "baron_scm_pr_create",
73
74
  prThread: "baron_scm_pr_thread",
74
- prStatus: "baron_scm_pr_status"
75
+ prStatus: "baron_scm_pr_status",
76
+ prForBranch: "baron_scm_pr_for_branch"
75
77
  };
76
78
  var CI_TOOL_NAMES = {
77
79
  pipelines: "baron_ci_pipelines",
@@ -194,6 +196,23 @@ var TOOL_DEFINITIONS = [
194
196
  }
195
197
  }
196
198
  },
199
+ {
200
+ name: MCP_TOOL_NAMES.assign,
201
+ description: "Assign an issue to a user by their provider-native handle (Azure DevOps: email; GitHub: login). Providers without assignment negotiate the gap per policy.",
202
+ inputSchema: {
203
+ type: "object",
204
+ additionalProperties: false,
205
+ required: ["id", "assignee"],
206
+ properties: {
207
+ id: { type: "string", minLength: 1 },
208
+ assignee: {
209
+ type: "string",
210
+ minLength: 1,
211
+ description: "Provider-native user handle (email on Azure DevOps, login on GitHub)."
212
+ }
213
+ }
214
+ }
215
+ },
197
216
  {
198
217
  name: MCP_TOOL_NAMES.query,
199
218
  description: "List issues filtered by workflow role and/or type role (filters are AND-combined). Returns a lightweight projection (no body); fetch an issue with get for full detail.",
@@ -203,6 +222,11 @@ var TOOL_DEFINITIONS = [
203
222
  properties: {
204
223
  role: { type: "string", enum: ROLE_ENUM, description: "Filter by workflow role." },
205
224
  typeRole: { type: "string", enum: TYPE_ROLE_ENUM, description: "Filter by type role." },
225
+ assignee: {
226
+ type: "string",
227
+ minLength: 1,
228
+ description: "Filter by assignee: a provider-native handle (Azure: email; GitHub: login) or '@me' for the authenticated user."
229
+ },
206
230
  limit: {
207
231
  type: "number",
208
232
  minimum: 1,
@@ -276,6 +300,22 @@ var SCM_TOOL_DEFINITIONS = [
276
300
  required: ["pullRequestId"],
277
301
  properties: { pullRequestId: { type: "string", minLength: 1 } }
278
302
  }
303
+ },
304
+ {
305
+ name: SCM_TOOL_NAMES.prForBranch,
306
+ description: "Find the OPEN pull request whose source is the given branch (null when none). Check this BEFORE opening a PR for a branch so a re-run updates/reports instead of duplicating.",
307
+ inputSchema: {
308
+ type: "object",
309
+ additionalProperties: false,
310
+ required: ["sourceBranch"],
311
+ properties: {
312
+ sourceBranch: {
313
+ type: "string",
314
+ minLength: 1,
315
+ description: "Branch name (no refs/heads/)."
316
+ }
317
+ }
318
+ }
279
319
  }
280
320
  ];
281
321
  var CI_TOOL_DEFINITIONS = [
@@ -589,9 +629,11 @@ function toQuery(args) {
589
629
  if (limit !== void 0 && (typeof limit !== "number" || !Number.isFinite(limit) || limit < 1)) {
590
630
  throw new BaronError2("Argument 'limit' must be a positive number.", INVALID_ARGS);
591
631
  }
632
+ const assignee = optionalString(args, "assignee");
592
633
  return {
593
634
  ...roleRaw !== void 0 ? { role: roleRaw } : {},
594
635
  ...typeRoleRaw !== void 0 ? { typeRole: typeRoleRaw } : {},
636
+ ...assignee !== void 0 ? { assignee } : {},
595
637
  limit: limit !== void 0 ? limit : DEFAULT_QUERY_LIMIT
596
638
  };
597
639
  }
@@ -662,6 +704,8 @@ function callTool(port, name, args) {
662
704
  requireLinkType(args)
663
705
  )
664
706
  );
707
+ case MCP_TOOL_NAMES.assign:
708
+ return run(() => port.assign(requireString(args, "id"), requireString(args, "assignee")));
665
709
  case MCP_TOOL_NAMES.query:
666
710
  return run(() => port.query(toQuery(args)));
667
711
  default:
@@ -703,6 +747,11 @@ function callScmTool(port, name, args) {
703
747
  });
704
748
  case SCM_TOOL_NAMES.prStatus:
705
749
  return run(() => port.prStatus(requireString(args, "pullRequestId")));
750
+ case SCM_TOOL_NAMES.prForBranch:
751
+ return run(async () => {
752
+ const pr = await port.prForBranch(requireString(args, "sourceBranch"));
753
+ return pr ?? null;
754
+ });
706
755
  case SCM_TOOL_NAMES.prThread:
707
756
  return run(
708
757
  () => port.addPullRequestThread(
package/dist/index.d.ts CHANGED
@@ -26,6 +26,7 @@ declare const MCP_TOOL_NAMES: {
26
26
  readonly transition: "baron_issue_transition";
27
27
  readonly comment: "baron_issue_comment";
28
28
  readonly link: "baron_issue_link";
29
+ readonly assign: "baron_issue_assign";
29
30
  readonly query: "baron_issue_query";
30
31
  };
31
32
  declare const SCM_TOOL_NAMES: {
@@ -33,6 +34,7 @@ declare const SCM_TOOL_NAMES: {
33
34
  readonly prCreate: "baron_scm_pr_create";
34
35
  readonly prThread: "baron_scm_pr_thread";
35
36
  readonly prStatus: "baron_scm_pr_status";
37
+ readonly prForBranch: "baron_scm_pr_for_branch";
36
38
  };
37
39
  declare const CI_TOOL_NAMES: {
38
40
  readonly pipelines: "baron_ci_pipelines";
package/dist/index.js CHANGED
@@ -28,7 +28,7 @@ import {
28
28
  createMcpServer,
29
29
  dispatchTool,
30
30
  loadPorts
31
- } from "./chunk-MUGSC3EW.js";
31
+ } from "./chunk-IJ6VTOQW.js";
32
32
  export {
33
33
  CI_TOOL_DEFINITIONS,
34
34
  CI_TOOL_NAMES,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lonca/baron-mcp-server",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./dist/index.js",
@@ -19,15 +19,15 @@
19
19
  ],
20
20
  "dependencies": {
21
21
  "@modelcontextprotocol/sdk": "^1.29.0",
22
- "@lonca/baron-core": "0.1.0",
23
- "@lonca/baron-providers": "0.1.0",
24
- "@lonca/baron-knowledge-loop": "0.1.0",
25
- "@lonca/baron-recipes": "0.1.0"
22
+ "@lonca/baron-core": "0.3.0",
23
+ "@lonca/baron-providers": "0.3.0",
24
+ "@lonca/baron-recipes": "0.3.0",
25
+ "@lonca/baron-knowledge-loop": "0.3.0"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/node": "^22.0.0",
29
- "@lonca/baron-conformance": "0.1.0",
30
- "@lonca/baron-adapter-github": "0.1.0"
29
+ "@lonca/baron-conformance": "0.3.0",
30
+ "@lonca/baron-adapter-github": "0.3.0"
31
31
  },
32
32
  "description": "Baron MCP server: drive issues, scm, ci, deploy, and notify across providers from any MCP client.",
33
33
  "keywords": [