@usewhisper/mcp-server 2.12.0 → 2.13.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/server.js +29 -7
- package/package.json +1 -1
package/dist/server.js
CHANGED
|
@@ -3894,6 +3894,7 @@ var RECOMMENDED_NEXT_CALL_ALLOWLIST = /* @__PURE__ */ new Set([
|
|
|
3894
3894
|
"search_code",
|
|
3895
3895
|
"grep",
|
|
3896
3896
|
"context.list_sources",
|
|
3897
|
+
"context.add_source",
|
|
3897
3898
|
"index.local_scan_ingest",
|
|
3898
3899
|
"context.get_relevant"
|
|
3899
3900
|
]);
|
|
@@ -3909,6 +3910,25 @@ function sanitizeRecommendedNextCalls(nextCalls) {
|
|
|
3909
3910
|
)
|
|
3910
3911
|
);
|
|
3911
3912
|
}
|
|
3913
|
+
function getRepoReadinessNextCalls(readiness) {
|
|
3914
|
+
if (readiness !== "project_bound_no_repo_source" && readiness !== "project_unverified") {
|
|
3915
|
+
return [];
|
|
3916
|
+
}
|
|
3917
|
+
if (RUNTIME_MODE === "remote") {
|
|
3918
|
+
return sanitizeRecommendedNextCalls([
|
|
3919
|
+
"context.list_sources",
|
|
3920
|
+
"context.add_source",
|
|
3921
|
+
"index.workspace_status",
|
|
3922
|
+
"context.get_relevant"
|
|
3923
|
+
]);
|
|
3924
|
+
}
|
|
3925
|
+
return sanitizeRecommendedNextCalls([
|
|
3926
|
+
"context.list_sources",
|
|
3927
|
+
"index.local_scan_ingest",
|
|
3928
|
+
"index.workspace_status",
|
|
3929
|
+
"context.get_relevant"
|
|
3930
|
+
]);
|
|
3931
|
+
}
|
|
3912
3932
|
function resolveMcpRetrievalProfile(requested) {
|
|
3913
3933
|
if (requested && MCP_RETRIEVAL_PROFILE_VALUES.includes(requested)) {
|
|
3914
3934
|
return requested;
|
|
@@ -4449,7 +4469,7 @@ async function resolveRepoGroundingPreflight(args) {
|
|
|
4449
4469
|
}
|
|
4450
4470
|
const recommendedNextCalls = [...trust.recommended_next_calls];
|
|
4451
4471
|
if (sourceVerification.retrieval_readiness === "project_bound_no_repo_source" || sourceVerification.retrieval_readiness === "project_unverified") {
|
|
4452
|
-
recommendedNextCalls.push(
|
|
4472
|
+
recommendedNextCalls.push(...getRepoReadinessNextCalls(sourceVerification.retrieval_readiness));
|
|
4453
4473
|
}
|
|
4454
4474
|
return {
|
|
4455
4475
|
repo_grounded: repoGrounded,
|
|
@@ -5109,7 +5129,9 @@ function saveIngestManifest(manifest) {
|
|
|
5109
5129
|
}
|
|
5110
5130
|
async function ingestLocalPath(params) {
|
|
5111
5131
|
if (RUNTIME_MODE === "remote") {
|
|
5112
|
-
throw new Error(
|
|
5132
|
+
throw new Error(
|
|
5133
|
+
"Local ingestion is disabled in remote mode. Use context.add_source for remote projects, or run MCP with WHISPER_MCP_MODE=auto/local."
|
|
5134
|
+
);
|
|
5113
5135
|
}
|
|
5114
5136
|
const rootPath = params.path || process.cwd();
|
|
5115
5137
|
const gate = isPathAllowed(rootPath);
|
|
@@ -5389,7 +5411,7 @@ server.tool(
|
|
|
5389
5411
|
warnings: Array.from(/* @__PURE__ */ new Set([...trust.warnings, ...repoVerification.warnings])),
|
|
5390
5412
|
recommended_next_calls: sanitizeRecommendedNextCalls([
|
|
5391
5413
|
...trust.recommended_next_calls,
|
|
5392
|
-
...repoVerification.retrieval_readiness
|
|
5414
|
+
...getRepoReadinessNextCalls(repoVerification.retrieval_readiness)
|
|
5393
5415
|
]),
|
|
5394
5416
|
freshness: trust.freshness,
|
|
5395
5417
|
coverage: trust.coverage,
|
|
@@ -5406,7 +5428,7 @@ server.tool(
|
|
|
5406
5428
|
);
|
|
5407
5429
|
server.tool(
|
|
5408
5430
|
"index.workspace_run",
|
|
5409
|
-
"
|
|
5431
|
+
"Refresh local workspace index metadata (coverage, commit, freshness) for trust checks. This does not upload files or create backend embeddings.",
|
|
5410
5432
|
{
|
|
5411
5433
|
workspace_id: z.string().optional(),
|
|
5412
5434
|
path: z.string().optional(),
|
|
@@ -5448,7 +5470,7 @@ server.tool(
|
|
|
5448
5470
|
);
|
|
5449
5471
|
server.tool(
|
|
5450
5472
|
"index.local_scan_ingest",
|
|
5451
|
-
"
|
|
5473
|
+
"Ingest local files into Whisper backend (chunk/embed/index) and persist incremental manifest. Requires WHISPER_MCP_MODE=auto or local.",
|
|
5452
5474
|
{
|
|
5453
5475
|
project: z.string().optional().describe("Project name or slug"),
|
|
5454
5476
|
path: z.string().optional().describe("Local path to ingest. Defaults to current working directory."),
|
|
@@ -5484,7 +5506,7 @@ server.tool(
|
|
|
5484
5506
|
);
|
|
5485
5507
|
server.tool(
|
|
5486
5508
|
"context.get_relevant",
|
|
5487
|
-
"Default grounded retrieval step for workspace/project questions.
|
|
5509
|
+
"Default grounded retrieval step for workspace/project questions. Returns ranked evidence with file:line citations and may abstain when workspace/repo trust is not ready.",
|
|
5488
5510
|
{
|
|
5489
5511
|
question: z.string().describe("Task/question to retrieve context for"),
|
|
5490
5512
|
path: z.string().optional().describe("Workspace path. Defaults to current working directory."),
|
|
@@ -5831,7 +5853,7 @@ server.tool(
|
|
|
5831
5853
|
);
|
|
5832
5854
|
server.tool(
|
|
5833
5855
|
"context.query",
|
|
5834
|
-
"Use this when answering from project knowledge rather than general model memory. Retrieves packed context
|
|
5856
|
+
"Use this when answering from project knowledge rather than general model memory. Retrieves packed context and auto-falls back between repo, local, and memory routes based on trust/readiness.",
|
|
5835
5857
|
{
|
|
5836
5858
|
project: z.string().optional().describe("Project name or slug (optional if WHISPER_PROJECT is set)"),
|
|
5837
5859
|
query: z.string().describe("What are you looking for?"),
|