@lonca/baron-mcp-server 0.4.0 → 0.5.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-Y2C7LNNF.js";
5
+ } from "./chunk-7KF4L47I.js";
6
6
 
7
7
  // src/bin.ts
8
8
  import { cwd, env, exit, stderr } from "process";
@@ -47,10 +47,12 @@ function loadPorts(root, env) {
47
47
  import {
48
48
  BaronError as BaronError2,
49
49
  ISSUE_LINK_TYPES,
50
+ PR_STATE_FILTERS,
50
51
  RUN_STATUSES,
51
52
  WORKFLOW_ROLES,
52
53
  WORK_ITEM_TYPE_ROLES,
53
54
  isIssueLinkType,
55
+ isPrStateFilter,
54
56
  isRunStatus,
55
57
  isWorkItemTypeRole,
56
58
  isWorkflowRole
@@ -108,6 +110,7 @@ var TYPE_ROLE_ENUM = [...WORK_ITEM_TYPE_ROLES];
108
110
  var LINK_TYPE_ENUM = [...ISSUE_LINK_TYPES];
109
111
  var FOLLOWUP_STATUS_ENUM = [...FOLLOWUP_STATUSES];
110
112
  var RUN_STATUS_ENUM = [...RUN_STATUSES];
113
+ var PR_STATE_FILTER_ENUM = [...PR_STATE_FILTERS];
111
114
  var DEFAULT_QUERY_LIMIT = 50;
112
115
  var TOOL_DEFINITIONS = [
113
116
  {
@@ -303,7 +306,7 @@ var SCM_TOOL_DEFINITIONS = [
303
306
  },
304
307
  {
305
308
  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.",
309
+ description: "Find the most recent pull request for a branch matching `state` (null when none), with its normalized `state`. `open` (default) = the finish-flow idempotency probe (don't duplicate an open PR); `merged` = the drift probe (did this branch land while its item stayed in progress?).",
307
310
  inputSchema: {
308
311
  type: "object",
309
312
  additionalProperties: false,
@@ -313,6 +316,11 @@ var SCM_TOOL_DEFINITIONS = [
313
316
  type: "string",
314
317
  minLength: 1,
315
318
  description: "Branch name (no refs/heads/)."
319
+ },
320
+ state: {
321
+ type: "string",
322
+ enum: PR_STATE_FILTER_ENUM,
323
+ description: "Lifecycle to search: 'open' (default), 'merged', 'closed', or 'all'."
316
324
  }
317
325
  }
318
326
  }
@@ -749,7 +757,17 @@ function callScmTool(port, name, args) {
749
757
  return run(() => port.prStatus(requireString(args, "pullRequestId")));
750
758
  case SCM_TOOL_NAMES.prForBranch:
751
759
  return run(async () => {
752
- const pr = await port.prForBranch(requireString(args, "sourceBranch"));
760
+ const stateRaw = optionalString(args, "state");
761
+ if (stateRaw !== void 0 && !isPrStateFilter(stateRaw)) {
762
+ throw new BaronError2(
763
+ `Invalid state '${stateRaw}'. Expected one of: ${PR_STATE_FILTERS.join(", ")}.`,
764
+ INVALID_ARGS
765
+ );
766
+ }
767
+ const pr = await port.prForBranch(
768
+ requireString(args, "sourceBranch"),
769
+ stateRaw
770
+ );
753
771
  return pr ?? null;
754
772
  });
755
773
  case SCM_TOOL_NAMES.prThread:
package/dist/index.js CHANGED
@@ -29,7 +29,7 @@ import {
29
29
  dispatchTool,
30
30
  loadPorts,
31
31
  withUpdateNotice
32
- } from "./chunk-Y2C7LNNF.js";
32
+ } from "./chunk-7KF4L47I.js";
33
33
  export {
34
34
  CI_TOOL_DEFINITIONS,
35
35
  CI_TOOL_NAMES,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lonca/baron-mcp-server",
3
- "version": "0.4.0",
3
+ "version": "0.5.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.4.0",
23
- "@lonca/baron-providers": "0.4.0",
24
- "@lonca/baron-recipes": "0.4.0",
25
- "@lonca/baron-knowledge-loop": "0.4.0"
22
+ "@lonca/baron-core": "0.5.0",
23
+ "@lonca/baron-recipes": "0.5.0",
24
+ "@lonca/baron-providers": "0.5.0",
25
+ "@lonca/baron-knowledge-loop": "0.5.0"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/node": "^22.0.0",
29
- "@lonca/baron-adapter-github": "0.4.0",
30
- "@lonca/baron-conformance": "0.4.0"
29
+ "@lonca/baron-conformance": "0.5.0",
30
+ "@lonca/baron-adapter-github": "0.5.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": [