@oss-scout/mcp 0.10.0 → 0.10.1
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/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp-server.bundle.cjs +867 -229
- package/dist/tools.js +27 -5
- package/package.json +4 -4
package/dist/tools.js
CHANGED
|
@@ -16,6 +16,12 @@ const PERSIST_WARNING = "Checkpoint failed: changes were applied in memory but c
|
|
|
16
16
|
function withPersistWarning(payload, persisted) {
|
|
17
17
|
return persisted ? payload : { ...payload, persistWarning: PERSIST_WARNING };
|
|
18
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Rejects when `ms` elapses, but does NOT cancel the underlying work — the
|
|
21
|
+
* scout call keeps running (consuming API budget and mutating scout state)
|
|
22
|
+
* after the tool has returned its timeout error. Acceptable for a local
|
|
23
|
+
* stdio server; revisit with AbortSignal threading if it ever matters (#295).
|
|
24
|
+
*/
|
|
19
25
|
function withTimeout(promise, ms = TOOL_TIMEOUT_MS) {
|
|
20
26
|
let timeoutId;
|
|
21
27
|
const timer = new Promise((_, reject) => {
|
|
@@ -27,8 +33,11 @@ export function registerTools(server, scout) {
|
|
|
27
33
|
server.tool("search", "Search for open source issues matching your preferences", {
|
|
28
34
|
maxResults: z
|
|
29
35
|
.number()
|
|
36
|
+
.int()
|
|
37
|
+
.min(1)
|
|
38
|
+
.max(50)
|
|
30
39
|
.optional()
|
|
31
|
-
.describe("Maximum number of results to return (default 10)"),
|
|
40
|
+
.describe("Maximum number of results to return (1-50, default 10)"),
|
|
32
41
|
strategies: z
|
|
33
42
|
.string()
|
|
34
43
|
.optional()
|
|
@@ -57,10 +66,17 @@ export function registerTools(server, scout) {
|
|
|
57
66
|
.describe("Diversity counterweight (#1244): fraction of result slots reserved for candidates that matched NEITHER preference list. Counters echo-chamber bias when boosts accumulate over time. 0 disables, 1 reserves every slot for diversity. Default 0."),
|
|
58
67
|
}, async ({ maxResults, strategies, preferLanguages, preferRepos, avoidRepos, boostIssueTypes, diversityRatio, }) => {
|
|
59
68
|
try {
|
|
69
|
+
// Validate each CSV entry with a readable error instead of letting a
|
|
70
|
+
// raw ZodError string reach the model (#295).
|
|
60
71
|
const parsedStrategies = strategies
|
|
61
|
-
? strategies
|
|
62
|
-
.
|
|
63
|
-
|
|
72
|
+
? strategies.split(",").map((s) => {
|
|
73
|
+
const trimmed = s.trim();
|
|
74
|
+
const parsed = SearchStrategySchema.safeParse(trimmed);
|
|
75
|
+
if (!parsed.success) {
|
|
76
|
+
throw new Error(`Invalid strategy "${trimmed}". Valid strategies: ${SearchStrategySchema.options.join(", ")}`);
|
|
77
|
+
}
|
|
78
|
+
return parsed.data;
|
|
79
|
+
})
|
|
64
80
|
: undefined;
|
|
65
81
|
const result = await withTimeout(scout.search({
|
|
66
82
|
maxResults: maxResults ?? 10,
|
|
@@ -97,8 +113,11 @@ export function registerTools(server, scout) {
|
|
|
97
113
|
server.tool("scout-features", "Surface feature-scoped contribution opportunities in repos where you have 3+ merged PRs", {
|
|
98
114
|
maxResults: z
|
|
99
115
|
.number()
|
|
116
|
+
.int()
|
|
117
|
+
.min(1)
|
|
118
|
+
.max(50)
|
|
100
119
|
.optional()
|
|
101
|
-
.describe("Maximum number of results to return (default 10)"),
|
|
120
|
+
.describe("Maximum number of results to return (1-50, default 10)"),
|
|
102
121
|
anchorThreshold: z
|
|
103
122
|
.number()
|
|
104
123
|
.int()
|
|
@@ -225,6 +244,9 @@ export function registerTools(server, scout) {
|
|
|
225
244
|
};
|
|
226
245
|
}
|
|
227
246
|
if (action === "remove") {
|
|
247
|
+
// Deliberately no URL validation, matching the CLI's runSkipRemove:
|
|
248
|
+
// entries stored before skip-add validation existed may be junk,
|
|
249
|
+
// and exact-match removal is the only way to clean them up.
|
|
228
250
|
const wasPresent = scout
|
|
229
251
|
.getSkippedIssues()
|
|
230
252
|
.some((s) => s.url === issueUrl);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oss-scout/mcp",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"description": "MCP server for oss-scout — exposes issue discovery and vetting as MCP tools",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
},
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
|
-
"
|
|
12
|
-
"
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js"
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"files": [
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
20
20
|
"zod": "^4.3.6",
|
|
21
|
-
"@oss-scout/core": "^1.1
|
|
21
|
+
"@oss-scout/core": "^1.5.1"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@types/node": "^25.5.0",
|