@lonca/baron-mcp-server 0.4.0 → 0.6.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 +1 -1
- package/dist/{chunk-Y2C7LNNF.js → chunk-SR44CRXC.js} +57 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -1
- package/package.json +7 -7
package/dist/bin.js
CHANGED
|
@@ -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
|
|
@@ -66,6 +68,8 @@ var MCP_TOOL_NAMES = {
|
|
|
66
68
|
comment: "baron_issue_comment",
|
|
67
69
|
link: "baron_issue_link",
|
|
68
70
|
assign: "baron_issue_assign",
|
|
71
|
+
iterations: "baron_issue_iterations",
|
|
72
|
+
setIteration: "baron_issue_set_iteration",
|
|
69
73
|
query: "baron_issue_query"
|
|
70
74
|
};
|
|
71
75
|
var SCM_TOOL_NAMES = {
|
|
@@ -108,6 +112,7 @@ var TYPE_ROLE_ENUM = [...WORK_ITEM_TYPE_ROLES];
|
|
|
108
112
|
var LINK_TYPE_ENUM = [...ISSUE_LINK_TYPES];
|
|
109
113
|
var FOLLOWUP_STATUS_ENUM = [...FOLLOWUP_STATUSES];
|
|
110
114
|
var RUN_STATUS_ENUM = [...RUN_STATUSES];
|
|
115
|
+
var PR_STATE_FILTER_ENUM = [...PR_STATE_FILTERS];
|
|
111
116
|
var DEFAULT_QUERY_LIMIT = 50;
|
|
112
117
|
var TOOL_DEFINITIONS = [
|
|
113
118
|
{
|
|
@@ -213,6 +218,28 @@ var TOOL_DEFINITIONS = [
|
|
|
213
218
|
}
|
|
214
219
|
}
|
|
215
220
|
},
|
|
221
|
+
{
|
|
222
|
+
name: MCP_TOOL_NAMES.iterations,
|
|
223
|
+
description: "List the provider's iterations/sprints (each with a `current` flag). Empty when the provider has no sprints. Use it to find the active sprint or a target for set_iteration.",
|
|
224
|
+
inputSchema: { type: "object", additionalProperties: false, properties: {} }
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
name: MCP_TOOL_NAMES.setIteration,
|
|
228
|
+
description: "Move a work item to an iteration/sprint by path, or '@current' for the active sprint. Providers without sprints negotiate the gap per policy.",
|
|
229
|
+
inputSchema: {
|
|
230
|
+
type: "object",
|
|
231
|
+
additionalProperties: false,
|
|
232
|
+
required: ["id", "iteration"],
|
|
233
|
+
properties: {
|
|
234
|
+
id: { type: "string", minLength: 1 },
|
|
235
|
+
iteration: {
|
|
236
|
+
type: "string",
|
|
237
|
+
minLength: 1,
|
|
238
|
+
description: "Iteration path (from iterations) or '@current' for the active sprint."
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
},
|
|
216
243
|
{
|
|
217
244
|
name: MCP_TOOL_NAMES.query,
|
|
218
245
|
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.",
|
|
@@ -227,6 +254,11 @@ var TOOL_DEFINITIONS = [
|
|
|
227
254
|
minLength: 1,
|
|
228
255
|
description: "Filter by assignee: a provider-native handle (Azure: email; GitHub: login) or '@me' for the authenticated user."
|
|
229
256
|
},
|
|
257
|
+
iteration: {
|
|
258
|
+
type: "string",
|
|
259
|
+
minLength: 1,
|
|
260
|
+
description: "Filter by iteration path, or '@current' for the active sprint."
|
|
261
|
+
},
|
|
230
262
|
limit: {
|
|
231
263
|
type: "number",
|
|
232
264
|
minimum: 1,
|
|
@@ -303,7 +335,7 @@ var SCM_TOOL_DEFINITIONS = [
|
|
|
303
335
|
},
|
|
304
336
|
{
|
|
305
337
|
name: SCM_TOOL_NAMES.prForBranch,
|
|
306
|
-
description: "Find the
|
|
338
|
+
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
339
|
inputSchema: {
|
|
308
340
|
type: "object",
|
|
309
341
|
additionalProperties: false,
|
|
@@ -313,6 +345,11 @@ var SCM_TOOL_DEFINITIONS = [
|
|
|
313
345
|
type: "string",
|
|
314
346
|
minLength: 1,
|
|
315
347
|
description: "Branch name (no refs/heads/)."
|
|
348
|
+
},
|
|
349
|
+
state: {
|
|
350
|
+
type: "string",
|
|
351
|
+
enum: PR_STATE_FILTER_ENUM,
|
|
352
|
+
description: "Lifecycle to search: 'open' (default), 'merged', 'closed', or 'all'."
|
|
316
353
|
}
|
|
317
354
|
}
|
|
318
355
|
}
|
|
@@ -630,10 +667,12 @@ function toQuery(args) {
|
|
|
630
667
|
throw new BaronError2("Argument 'limit' must be a positive number.", INVALID_ARGS);
|
|
631
668
|
}
|
|
632
669
|
const assignee = optionalString(args, "assignee");
|
|
670
|
+
const iteration = optionalString(args, "iteration");
|
|
633
671
|
return {
|
|
634
672
|
...roleRaw !== void 0 ? { role: roleRaw } : {},
|
|
635
673
|
...typeRoleRaw !== void 0 ? { typeRole: typeRoleRaw } : {},
|
|
636
674
|
...assignee !== void 0 ? { assignee } : {},
|
|
675
|
+
...iteration !== void 0 ? { iteration } : {},
|
|
637
676
|
limit: limit !== void 0 ? limit : DEFAULT_QUERY_LIMIT
|
|
638
677
|
};
|
|
639
678
|
}
|
|
@@ -706,6 +745,12 @@ function callTool(port, name, args) {
|
|
|
706
745
|
);
|
|
707
746
|
case MCP_TOOL_NAMES.assign:
|
|
708
747
|
return run(() => port.assign(requireString(args, "id"), requireString(args, "assignee")));
|
|
748
|
+
case MCP_TOOL_NAMES.iterations:
|
|
749
|
+
return run(() => port.iterations());
|
|
750
|
+
case MCP_TOOL_NAMES.setIteration:
|
|
751
|
+
return run(
|
|
752
|
+
() => port.setIteration(requireString(args, "id"), requireString(args, "iteration"))
|
|
753
|
+
);
|
|
709
754
|
case MCP_TOOL_NAMES.query:
|
|
710
755
|
return run(() => port.query(toQuery(args)));
|
|
711
756
|
default:
|
|
@@ -749,7 +794,17 @@ function callScmTool(port, name, args) {
|
|
|
749
794
|
return run(() => port.prStatus(requireString(args, "pullRequestId")));
|
|
750
795
|
case SCM_TOOL_NAMES.prForBranch:
|
|
751
796
|
return run(async () => {
|
|
752
|
-
const
|
|
797
|
+
const stateRaw = optionalString(args, "state");
|
|
798
|
+
if (stateRaw !== void 0 && !isPrStateFilter(stateRaw)) {
|
|
799
|
+
throw new BaronError2(
|
|
800
|
+
`Invalid state '${stateRaw}'. Expected one of: ${PR_STATE_FILTERS.join(", ")}.`,
|
|
801
|
+
INVALID_ARGS
|
|
802
|
+
);
|
|
803
|
+
}
|
|
804
|
+
const pr = await port.prForBranch(
|
|
805
|
+
requireString(args, "sourceBranch"),
|
|
806
|
+
stateRaw
|
|
807
|
+
);
|
|
753
808
|
return pr ?? null;
|
|
754
809
|
});
|
|
755
810
|
case SCM_TOOL_NAMES.prThread:
|
package/dist/index.d.ts
CHANGED
|
@@ -27,6 +27,8 @@ declare const MCP_TOOL_NAMES: {
|
|
|
27
27
|
readonly comment: "baron_issue_comment";
|
|
28
28
|
readonly link: "baron_issue_link";
|
|
29
29
|
readonly assign: "baron_issue_assign";
|
|
30
|
+
readonly iterations: "baron_issue_iterations";
|
|
31
|
+
readonly setIteration: "baron_issue_set_iteration";
|
|
30
32
|
readonly query: "baron_issue_query";
|
|
31
33
|
};
|
|
32
34
|
declare const SCM_TOOL_NAMES: {
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lonca/baron-mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.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.
|
|
23
|
-
"@lonca/baron-
|
|
24
|
-
"@lonca/baron-recipes": "0.
|
|
25
|
-
"@lonca/baron-
|
|
22
|
+
"@lonca/baron-core": "0.6.0",
|
|
23
|
+
"@lonca/baron-knowledge-loop": "0.6.0",
|
|
24
|
+
"@lonca/baron-recipes": "0.6.0",
|
|
25
|
+
"@lonca/baron-providers": "0.6.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/node": "^22.0.0",
|
|
29
|
-
"@lonca/baron-adapter-github": "0.
|
|
30
|
-
"@lonca/baron-conformance": "0.
|
|
29
|
+
"@lonca/baron-adapter-github": "0.6.0",
|
|
30
|
+
"@lonca/baron-conformance": "0.6.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": [
|