tea-rags 1.2.1 → 1.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/LICENSE +2 -2
- package/build/core/adapters/qdrant/client.d.ts.map +1 -1
- package/build/core/adapters/qdrant/client.js +3 -1
- package/build/core/adapters/qdrant/client.js.map +1 -1
- package/build/core/api/internal/facades/explore-facade.d.ts.map +1 -1
- package/build/core/api/internal/facades/explore-facade.js +2 -2
- package/build/core/api/internal/facades/explore-facade.js.map +1 -1
- package/build/core/api/internal/infra/schema-builder.d.ts +8 -6
- package/build/core/api/internal/infra/schema-builder.d.ts.map +1 -1
- package/build/core/api/internal/infra/schema-builder.js +12 -6
- package/build/core/api/internal/infra/schema-builder.js.map +1 -1
- package/build/core/api/public/app.d.ts.map +1 -1
- package/build/core/api/public/app.js +3 -0
- package/build/core/api/public/app.js.map +1 -1
- package/build/core/api/public/dto/explore.d.ts +12 -5
- package/build/core/api/public/dto/explore.d.ts.map +1 -1
- package/build/core/api/public/dto/index.d.ts +1 -1
- package/build/core/api/public/dto/index.d.ts.map +1 -1
- package/build/core/domains/explore/reranker.d.ts +12 -0
- package/build/core/domains/explore/reranker.d.ts.map +1 -1
- package/build/core/domains/explore/reranker.js +17 -0
- package/build/core/domains/explore/reranker.js.map +1 -1
- package/build/core/domains/trajectory/static/filters.d.ts.map +1 -1
- package/build/core/domains/trajectory/static/filters.js +17 -45
- package/build/core/domains/trajectory/static/filters.js.map +1 -1
- package/build/mcp/resources/index.d.ts +7 -0
- package/build/mcp/resources/index.d.ts.map +1 -1
- package/build/mcp/resources/index.js +200 -0
- package/build/mcp/resources/index.js.map +1 -1
- package/build/mcp/tools/code.d.ts.map +1 -1
- package/build/mcp/tools/code.js +14 -28
- package/build/mcp/tools/code.js.map +1 -1
- package/build/mcp/tools/collection.d.ts.map +1 -1
- package/build/mcp/tools/collection.js +4 -0
- package/build/mcp/tools/collection.js.map +1 -1
- package/build/mcp/tools/document.d.ts.map +1 -1
- package/build/mcp/tools/document.js +2 -0
- package/build/mcp/tools/document.js.map +1 -1
- package/build/mcp/tools/explore.d.ts.map +1 -1
- package/build/mcp/tools/explore.js +40 -17
- package/build/mcp/tools/explore.js.map +1 -1
- package/build/mcp/tools/output-schemas.d.ts +204 -0
- package/build/mcp/tools/output-schemas.d.ts.map +1 -0
- package/build/mcp/tools/output-schemas.js +52 -0
- package/build/mcp/tools/output-schemas.js.map +1 -0
- package/build/mcp/tools/schemas.d.ts +13 -19
- package/build/mcp/tools/schemas.d.ts.map +1 -1
- package/build/mcp/tools/schemas.js +47 -76
- package/build/mcp/tools/schemas.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,24 +1,40 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Search tools registration — thin wrappers delegating to App.
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
4
|
+
import { formatMcpError, sanitizeRerank } from "../format.js";
|
|
5
|
+
import { SearchResultOutputSchema } from "./output-schemas.js";
|
|
5
6
|
import { createSearchSchemas } from "./schemas.js";
|
|
7
|
+
/** Format ExploreResponse as structuredContent for outputSchema-enabled tools. */
|
|
8
|
+
function formatStructuredResult(response) {
|
|
9
|
+
return {
|
|
10
|
+
structuredContent: {
|
|
11
|
+
results: response.results,
|
|
12
|
+
...(response.level && { level: response.level }),
|
|
13
|
+
driftWarning: response.driftWarning,
|
|
14
|
+
},
|
|
15
|
+
content: [],
|
|
16
|
+
};
|
|
17
|
+
}
|
|
6
18
|
export function registerSearchTools(server, deps) {
|
|
7
19
|
const { app } = deps;
|
|
8
20
|
const searchSchemas = createSearchSchemas(deps.schemaBuilder);
|
|
9
21
|
// semantic_search
|
|
10
22
|
server.registerTool("semantic_search", {
|
|
11
23
|
title: "Semantic Search",
|
|
12
|
-
description: "
|
|
24
|
+
description: "Analytical search returning structured JSON with full metadata. " +
|
|
25
|
+
"For agentic workflows: analytics, reports, downstream processing.\n\n" +
|
|
26
|
+
"For examples see tea-rags://schema/search-guide\n" +
|
|
27
|
+
"For parameter docs see tea-rags://schema/overview",
|
|
13
28
|
inputSchema: searchSchemas.SemanticSearchSchema,
|
|
29
|
+
outputSchema: SearchResultOutputSchema,
|
|
30
|
+
annotations: { readOnlyHint: true },
|
|
14
31
|
}, async ({ rerank, ...rest }) => {
|
|
15
32
|
try {
|
|
16
33
|
const response = await app.semanticSearch({
|
|
17
34
|
...rest,
|
|
18
35
|
rerank: sanitizeRerank(rerank),
|
|
19
36
|
});
|
|
20
|
-
|
|
21
|
-
return appendDriftWarning(formatMcpResponse(body), response.driftWarning);
|
|
37
|
+
return formatStructuredResult(response);
|
|
22
38
|
}
|
|
23
39
|
catch (error) {
|
|
24
40
|
return formatMcpError(error instanceof Error ? error.message : String(error));
|
|
@@ -27,16 +43,20 @@ export function registerSearchTools(server, deps) {
|
|
|
27
43
|
// hybrid_search
|
|
28
44
|
server.registerTool("hybrid_search", {
|
|
29
45
|
title: "Hybrid Search",
|
|
30
|
-
description: "
|
|
46
|
+
description: "Semantic + BM25 keyword search. Use when query contains exact symbols, identifiers, " +
|
|
47
|
+
"or markers (TODO, FIXME, specific names). Collection must be created with enableHybrid=true.\n\n" +
|
|
48
|
+
"For examples see tea-rags://schema/search-guide\n" +
|
|
49
|
+
"For parameter docs see tea-rags://schema/overview",
|
|
31
50
|
inputSchema: searchSchemas.HybridSearchSchema,
|
|
51
|
+
outputSchema: SearchResultOutputSchema,
|
|
52
|
+
annotations: { readOnlyHint: true },
|
|
32
53
|
}, async ({ rerank, ...rest }) => {
|
|
33
54
|
try {
|
|
34
55
|
const response = await app.hybridSearch({
|
|
35
56
|
...rest,
|
|
36
57
|
rerank: sanitizeRerank(rerank),
|
|
37
58
|
});
|
|
38
|
-
|
|
39
|
-
return appendDriftWarning(formatMcpResponse(body), response.driftWarning);
|
|
59
|
+
return formatStructuredResult(response);
|
|
40
60
|
}
|
|
41
61
|
catch (error) {
|
|
42
62
|
return formatMcpError(error instanceof Error ? error.message : String(error));
|
|
@@ -45,18 +65,20 @@ export function registerSearchTools(server, deps) {
|
|
|
45
65
|
// rank_chunks
|
|
46
66
|
server.registerTool("rank_chunks", {
|
|
47
67
|
title: "Rank Chunks",
|
|
48
|
-
description: "Rank all chunks
|
|
49
|
-
"
|
|
50
|
-
"
|
|
68
|
+
description: "Rank all chunks by rerank signals without vector search. " +
|
|
69
|
+
"Top-N by signal, not by query similarity.\n\n" +
|
|
70
|
+
"For examples see tea-rags://schema/search-guide\n" +
|
|
71
|
+
"For parameter docs see tea-rags://schema/overview",
|
|
51
72
|
inputSchema: searchSchemas.RankChunksSchema,
|
|
73
|
+
outputSchema: SearchResultOutputSchema,
|
|
74
|
+
annotations: { readOnlyHint: true },
|
|
52
75
|
}, async ({ rerank, ...rest }) => {
|
|
53
76
|
try {
|
|
54
77
|
const response = await app.rankChunks({
|
|
55
78
|
...rest,
|
|
56
79
|
rerank: sanitizeRerank(rerank),
|
|
57
80
|
});
|
|
58
|
-
|
|
59
|
-
return appendDriftWarning(formatMcpResponse(body), response.driftWarning);
|
|
81
|
+
return formatStructuredResult(response);
|
|
60
82
|
}
|
|
61
83
|
catch (error) {
|
|
62
84
|
return formatMcpError(error instanceof Error ? error.message : String(error));
|
|
@@ -65,18 +87,19 @@ export function registerSearchTools(server, deps) {
|
|
|
65
87
|
// find_similar
|
|
66
88
|
server.registerTool("find_similar", {
|
|
67
89
|
title: "Find Similar",
|
|
68
|
-
description: "Find code similar to given chunks or code blocks.
|
|
69
|
-
"
|
|
70
|
-
"
|
|
90
|
+
description: "Find code similar to given chunks or code blocks. Provide chunk IDs and/or raw code as " +
|
|
91
|
+
"positive (more like this) or negative (less like this) examples.\n\n" +
|
|
92
|
+
"For parameter docs see tea-rags://schema/overview",
|
|
71
93
|
inputSchema: searchSchemas.FindSimilarSchema,
|
|
94
|
+
outputSchema: SearchResultOutputSchema,
|
|
95
|
+
annotations: { readOnlyHint: true },
|
|
72
96
|
}, async ({ rerank, ...rest }) => {
|
|
73
97
|
try {
|
|
74
98
|
const response = await app.findSimilar({
|
|
75
99
|
...rest,
|
|
76
100
|
rerank: sanitizeRerank(rerank),
|
|
77
101
|
});
|
|
78
|
-
|
|
79
|
-
return appendDriftWarning(formatMcpResponse(body), response.driftWarning);
|
|
102
|
+
return formatStructuredResult(response);
|
|
80
103
|
}
|
|
81
104
|
catch (error) {
|
|
82
105
|
return formatMcpError(error instanceof Error ? error.message : String(error));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"explore.js","sourceRoot":"","sources":["../../../src/mcp/tools/explore.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"explore.js","sourceRoot":"","sources":["../../../src/mcp/tools/explore.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,OAAO,EAAE,cAAc,EAAE,cAAc,EAAsB,MAAM,cAAc,CAAC;AAClF,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAInD,kFAAkF;AAClF,SAAS,sBAAsB,CAAC,QAAyB;IACvD,OAAO;QACL,iBAAiB,EAAE;YACjB,OAAO,EAAE,QAAQ,CAAC,OAAO;YACzB,GAAG,CAAC,QAAQ,CAAC,KAAK,IAAI,EAAE,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAC;YAChD,YAAY,EAAE,QAAQ,CAAC,YAAY;SACpC;QACD,OAAO,EAAE,EAAE;KACZ,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,MAAiB,EAAE,IAAgD;IACrG,MAAM,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;IACrB,MAAM,aAAa,GAAG,mBAAmB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAE9D,kBAAkB;IAClB,MAAM,CAAC,YAAY,CACjB,iBAAiB,EACjB;QACE,KAAK,EAAE,iBAAiB;QACxB,WAAW,EACT,kEAAkE;YAClE,uEAAuE;YACvE,mDAAmD;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AAW,CAAC;gBACrC,GAAG,IAAI;gBACP,MAAM,EAAE,cAAc,CAAC,MAAqB,CAAC;aAC9C,CAAC,CAAC;YACH,OAAO,sBAAsB,CAAC,QAAQ,CAAC,CAAC;QAC1C,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,cAAc,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QAChF,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared output schemas for MCP search tools.
|
|
3
|
+
*
|
|
4
|
+
* When outputSchema is provided to registerTool(), the SDK expects handlers
|
|
5
|
+
* to return { structuredContent } matching this shape. We also keep { content }
|
|
6
|
+
* for backwards compatibility with clients that don't support structured output.
|
|
7
|
+
*/
|
|
8
|
+
import { z } from "zod";
|
|
9
|
+
/** Shared output schema for semantic_search, hybrid_search, rank_chunks, find_similar */
|
|
10
|
+
export declare const SearchResultOutputSchema: {
|
|
11
|
+
results: z.ZodArray<z.ZodObject<{
|
|
12
|
+
id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
13
|
+
score: z.ZodNumber;
|
|
14
|
+
relativePath: z.ZodOptional<z.ZodString>;
|
|
15
|
+
startLine: z.ZodOptional<z.ZodNumber>;
|
|
16
|
+
endLine: z.ZodOptional<z.ZodNumber>;
|
|
17
|
+
language: z.ZodOptional<z.ZodString>;
|
|
18
|
+
chunkType: z.ZodOptional<z.ZodString>;
|
|
19
|
+
name: z.ZodOptional<z.ZodString>;
|
|
20
|
+
content: z.ZodOptional<z.ZodString>;
|
|
21
|
+
git: z.ZodOptional<z.ZodObject<{
|
|
22
|
+
dominantAuthor: z.ZodOptional<z.ZodString>;
|
|
23
|
+
authors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
24
|
+
commitCount: z.ZodOptional<z.ZodNumber>;
|
|
25
|
+
ageDays: z.ZodOptional<z.ZodNumber>;
|
|
26
|
+
lastModifiedAt: z.ZodOptional<z.ZodString>;
|
|
27
|
+
firstCreatedAt: z.ZodOptional<z.ZodString>;
|
|
28
|
+
taskIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
29
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
30
|
+
dominantAuthor: z.ZodOptional<z.ZodString>;
|
|
31
|
+
authors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
32
|
+
commitCount: z.ZodOptional<z.ZodNumber>;
|
|
33
|
+
ageDays: z.ZodOptional<z.ZodNumber>;
|
|
34
|
+
lastModifiedAt: z.ZodOptional<z.ZodString>;
|
|
35
|
+
firstCreatedAt: z.ZodOptional<z.ZodString>;
|
|
36
|
+
taskIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
37
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
38
|
+
dominantAuthor: z.ZodOptional<z.ZodString>;
|
|
39
|
+
authors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
40
|
+
commitCount: z.ZodOptional<z.ZodNumber>;
|
|
41
|
+
ageDays: z.ZodOptional<z.ZodNumber>;
|
|
42
|
+
lastModifiedAt: z.ZodOptional<z.ZodString>;
|
|
43
|
+
firstCreatedAt: z.ZodOptional<z.ZodString>;
|
|
44
|
+
taskIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
45
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
46
|
+
rankingOverlay: z.ZodOptional<z.ZodObject<{
|
|
47
|
+
preset: z.ZodOptional<z.ZodString>;
|
|
48
|
+
raw: z.ZodOptional<z.ZodObject<{
|
|
49
|
+
file: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
50
|
+
chunk: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
51
|
+
}, "strip", z.ZodTypeAny, {
|
|
52
|
+
file?: Record<string, unknown> | undefined;
|
|
53
|
+
chunk?: Record<string, unknown> | undefined;
|
|
54
|
+
}, {
|
|
55
|
+
file?: Record<string, unknown> | undefined;
|
|
56
|
+
chunk?: Record<string, unknown> | undefined;
|
|
57
|
+
}>>;
|
|
58
|
+
derived: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
59
|
+
}, "strip", z.ZodTypeAny, {
|
|
60
|
+
preset?: string | undefined;
|
|
61
|
+
derived?: Record<string, number> | undefined;
|
|
62
|
+
raw?: {
|
|
63
|
+
file?: Record<string, unknown> | undefined;
|
|
64
|
+
chunk?: Record<string, unknown> | undefined;
|
|
65
|
+
} | undefined;
|
|
66
|
+
}, {
|
|
67
|
+
preset?: string | undefined;
|
|
68
|
+
derived?: Record<string, number> | undefined;
|
|
69
|
+
raw?: {
|
|
70
|
+
file?: Record<string, unknown> | undefined;
|
|
71
|
+
chunk?: Record<string, unknown> | undefined;
|
|
72
|
+
} | undefined;
|
|
73
|
+
}>>;
|
|
74
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
75
|
+
id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
76
|
+
score: z.ZodNumber;
|
|
77
|
+
relativePath: z.ZodOptional<z.ZodString>;
|
|
78
|
+
startLine: z.ZodOptional<z.ZodNumber>;
|
|
79
|
+
endLine: z.ZodOptional<z.ZodNumber>;
|
|
80
|
+
language: z.ZodOptional<z.ZodString>;
|
|
81
|
+
chunkType: z.ZodOptional<z.ZodString>;
|
|
82
|
+
name: z.ZodOptional<z.ZodString>;
|
|
83
|
+
content: z.ZodOptional<z.ZodString>;
|
|
84
|
+
git: z.ZodOptional<z.ZodObject<{
|
|
85
|
+
dominantAuthor: z.ZodOptional<z.ZodString>;
|
|
86
|
+
authors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
87
|
+
commitCount: z.ZodOptional<z.ZodNumber>;
|
|
88
|
+
ageDays: z.ZodOptional<z.ZodNumber>;
|
|
89
|
+
lastModifiedAt: z.ZodOptional<z.ZodString>;
|
|
90
|
+
firstCreatedAt: z.ZodOptional<z.ZodString>;
|
|
91
|
+
taskIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
92
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
93
|
+
dominantAuthor: z.ZodOptional<z.ZodString>;
|
|
94
|
+
authors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
95
|
+
commitCount: z.ZodOptional<z.ZodNumber>;
|
|
96
|
+
ageDays: z.ZodOptional<z.ZodNumber>;
|
|
97
|
+
lastModifiedAt: z.ZodOptional<z.ZodString>;
|
|
98
|
+
firstCreatedAt: z.ZodOptional<z.ZodString>;
|
|
99
|
+
taskIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
100
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
101
|
+
dominantAuthor: z.ZodOptional<z.ZodString>;
|
|
102
|
+
authors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
103
|
+
commitCount: z.ZodOptional<z.ZodNumber>;
|
|
104
|
+
ageDays: z.ZodOptional<z.ZodNumber>;
|
|
105
|
+
lastModifiedAt: z.ZodOptional<z.ZodString>;
|
|
106
|
+
firstCreatedAt: z.ZodOptional<z.ZodString>;
|
|
107
|
+
taskIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
108
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
109
|
+
rankingOverlay: z.ZodOptional<z.ZodObject<{
|
|
110
|
+
preset: z.ZodOptional<z.ZodString>;
|
|
111
|
+
raw: z.ZodOptional<z.ZodObject<{
|
|
112
|
+
file: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
113
|
+
chunk: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
114
|
+
}, "strip", z.ZodTypeAny, {
|
|
115
|
+
file?: Record<string, unknown> | undefined;
|
|
116
|
+
chunk?: Record<string, unknown> | undefined;
|
|
117
|
+
}, {
|
|
118
|
+
file?: Record<string, unknown> | undefined;
|
|
119
|
+
chunk?: Record<string, unknown> | undefined;
|
|
120
|
+
}>>;
|
|
121
|
+
derived: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
122
|
+
}, "strip", z.ZodTypeAny, {
|
|
123
|
+
preset?: string | undefined;
|
|
124
|
+
derived?: Record<string, number> | undefined;
|
|
125
|
+
raw?: {
|
|
126
|
+
file?: Record<string, unknown> | undefined;
|
|
127
|
+
chunk?: Record<string, unknown> | undefined;
|
|
128
|
+
} | undefined;
|
|
129
|
+
}, {
|
|
130
|
+
preset?: string | undefined;
|
|
131
|
+
derived?: Record<string, number> | undefined;
|
|
132
|
+
raw?: {
|
|
133
|
+
file?: Record<string, unknown> | undefined;
|
|
134
|
+
chunk?: Record<string, unknown> | undefined;
|
|
135
|
+
} | undefined;
|
|
136
|
+
}>>;
|
|
137
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
138
|
+
id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
139
|
+
score: z.ZodNumber;
|
|
140
|
+
relativePath: z.ZodOptional<z.ZodString>;
|
|
141
|
+
startLine: z.ZodOptional<z.ZodNumber>;
|
|
142
|
+
endLine: z.ZodOptional<z.ZodNumber>;
|
|
143
|
+
language: z.ZodOptional<z.ZodString>;
|
|
144
|
+
chunkType: z.ZodOptional<z.ZodString>;
|
|
145
|
+
name: z.ZodOptional<z.ZodString>;
|
|
146
|
+
content: z.ZodOptional<z.ZodString>;
|
|
147
|
+
git: z.ZodOptional<z.ZodObject<{
|
|
148
|
+
dominantAuthor: z.ZodOptional<z.ZodString>;
|
|
149
|
+
authors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
150
|
+
commitCount: z.ZodOptional<z.ZodNumber>;
|
|
151
|
+
ageDays: z.ZodOptional<z.ZodNumber>;
|
|
152
|
+
lastModifiedAt: z.ZodOptional<z.ZodString>;
|
|
153
|
+
firstCreatedAt: z.ZodOptional<z.ZodString>;
|
|
154
|
+
taskIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
155
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
156
|
+
dominantAuthor: z.ZodOptional<z.ZodString>;
|
|
157
|
+
authors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
158
|
+
commitCount: z.ZodOptional<z.ZodNumber>;
|
|
159
|
+
ageDays: z.ZodOptional<z.ZodNumber>;
|
|
160
|
+
lastModifiedAt: z.ZodOptional<z.ZodString>;
|
|
161
|
+
firstCreatedAt: z.ZodOptional<z.ZodString>;
|
|
162
|
+
taskIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
163
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
164
|
+
dominantAuthor: z.ZodOptional<z.ZodString>;
|
|
165
|
+
authors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
166
|
+
commitCount: z.ZodOptional<z.ZodNumber>;
|
|
167
|
+
ageDays: z.ZodOptional<z.ZodNumber>;
|
|
168
|
+
lastModifiedAt: z.ZodOptional<z.ZodString>;
|
|
169
|
+
firstCreatedAt: z.ZodOptional<z.ZodString>;
|
|
170
|
+
taskIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
171
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
172
|
+
rankingOverlay: z.ZodOptional<z.ZodObject<{
|
|
173
|
+
preset: z.ZodOptional<z.ZodString>;
|
|
174
|
+
raw: z.ZodOptional<z.ZodObject<{
|
|
175
|
+
file: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
176
|
+
chunk: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
177
|
+
}, "strip", z.ZodTypeAny, {
|
|
178
|
+
file?: Record<string, unknown> | undefined;
|
|
179
|
+
chunk?: Record<string, unknown> | undefined;
|
|
180
|
+
}, {
|
|
181
|
+
file?: Record<string, unknown> | undefined;
|
|
182
|
+
chunk?: Record<string, unknown> | undefined;
|
|
183
|
+
}>>;
|
|
184
|
+
derived: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
185
|
+
}, "strip", z.ZodTypeAny, {
|
|
186
|
+
preset?: string | undefined;
|
|
187
|
+
derived?: Record<string, number> | undefined;
|
|
188
|
+
raw?: {
|
|
189
|
+
file?: Record<string, unknown> | undefined;
|
|
190
|
+
chunk?: Record<string, unknown> | undefined;
|
|
191
|
+
} | undefined;
|
|
192
|
+
}, {
|
|
193
|
+
preset?: string | undefined;
|
|
194
|
+
derived?: Record<string, number> | undefined;
|
|
195
|
+
raw?: {
|
|
196
|
+
file?: Record<string, unknown> | undefined;
|
|
197
|
+
chunk?: Record<string, unknown> | undefined;
|
|
198
|
+
} | undefined;
|
|
199
|
+
}>>;
|
|
200
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
201
|
+
level: z.ZodOptional<z.ZodEnum<["chunk", "file"]>>;
|
|
202
|
+
driftWarning: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
203
|
+
};
|
|
204
|
+
//# sourceMappingURL=output-schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output-schemas.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/output-schemas.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA0CxB,yFAAyF;AACzF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIpC,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared output schemas for MCP search tools.
|
|
3
|
+
*
|
|
4
|
+
* When outputSchema is provided to registerTool(), the SDK expects handlers
|
|
5
|
+
* to return { structuredContent } matching this shape. We also keep { content }
|
|
6
|
+
* for backwards compatibility with clients that don't support structured output.
|
|
7
|
+
*/
|
|
8
|
+
import { z } from "zod";
|
|
9
|
+
const RankingOverlaySchema = z.object({
|
|
10
|
+
preset: z.string().optional().describe("Rerank preset used"),
|
|
11
|
+
raw: z
|
|
12
|
+
.object({
|
|
13
|
+
file: z.record(z.unknown()).optional().describe("Raw file-level signals"),
|
|
14
|
+
chunk: z.record(z.unknown()).optional().describe("Raw chunk-level signals"),
|
|
15
|
+
})
|
|
16
|
+
.optional()
|
|
17
|
+
.describe("Raw signal values from payload"),
|
|
18
|
+
derived: z.record(z.number()).optional().describe("Normalized derived signals (0-1)"),
|
|
19
|
+
});
|
|
20
|
+
const GitMetadataSchema = z
|
|
21
|
+
.object({
|
|
22
|
+
dominantAuthor: z.string().optional(),
|
|
23
|
+
authors: z.array(z.string()).optional(),
|
|
24
|
+
commitCount: z.number().optional(),
|
|
25
|
+
ageDays: z.number().optional(),
|
|
26
|
+
lastModifiedAt: z.string().optional(),
|
|
27
|
+
firstCreatedAt: z.string().optional(),
|
|
28
|
+
taskIds: z.array(z.string()).optional(),
|
|
29
|
+
})
|
|
30
|
+
.passthrough();
|
|
31
|
+
const SearchResultItemSchema = z
|
|
32
|
+
.object({
|
|
33
|
+
id: z.union([z.string(), z.number()]).optional().describe("Chunk ID"),
|
|
34
|
+
score: z.number().describe("Relevance score"),
|
|
35
|
+
relativePath: z.string().optional().describe("File path relative to codebase root"),
|
|
36
|
+
startLine: z.number().optional().describe("Start line in file"),
|
|
37
|
+
endLine: z.number().optional().describe("End line in file"),
|
|
38
|
+
language: z.string().optional().describe("Programming language"),
|
|
39
|
+
chunkType: z.string().optional().describe("Chunk type: function, class, interface, block"),
|
|
40
|
+
name: z.string().optional().describe("Symbol name (function/class name)"),
|
|
41
|
+
content: z.string().optional().describe("Code content (omitted when metaOnly=true)"),
|
|
42
|
+
git: GitMetadataSchema.optional().describe("Git metadata (when indexed with git enrichment)"),
|
|
43
|
+
rankingOverlay: RankingOverlaySchema.optional().describe("Explains scoring signals"),
|
|
44
|
+
})
|
|
45
|
+
.passthrough();
|
|
46
|
+
/** Shared output schema for semantic_search, hybrid_search, rank_chunks, find_similar */
|
|
47
|
+
export const SearchResultOutputSchema = {
|
|
48
|
+
results: z.array(SearchResultItemSchema).describe("Search results with explained metadata"),
|
|
49
|
+
level: z.enum(["chunk", "file"]).optional().describe("Effective signal level used for scoring"),
|
|
50
|
+
driftWarning: z.string().nullable().optional().describe("Warning if index may be stale"),
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=output-schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output-schemas.js","sourceRoot":"","sources":["../../../src/mcp/tools/output-schemas.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,oBAAoB,CAAC;IAC5D,GAAG,EAAE,CAAC;SACH,MAAM,CAAC;QACN,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAC;QACzE,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QA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
export declare function createSearchSchemas(schemaBuilder: SchemaBuilder): {
|
|
62
62
|
SemanticSearchSchema: {
|
|
63
|
-
rerank: z.ZodOptional<z.ZodUnion<[z.
|
|
63
|
+
rerank: z.ZodOptional<z.ZodUnion<[z.ZodTypeAny, z.ZodObject<{
|
|
64
64
|
custom: z.ZodObject<Record<string, z.ZodOptional<z.ZodNumber>>, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
65
65
|
[x: string]: number | undefined;
|
|
66
66
|
}, {
|
|
@@ -78,10 +78,9 @@ export declare function createSearchSchemas(schemaBuilder: SchemaBuilder): {
|
|
|
78
78
|
metaOnly: z.ZodOptional<z.ZodEffects<z.ZodBoolean, boolean, unknown>>;
|
|
79
79
|
level: z.ZodOptional<z.ZodEnum<["chunk", "file"]>>;
|
|
80
80
|
language: z.ZodOptional<z.ZodString>;
|
|
81
|
-
fileExtension: z.ZodOptional<z.ZodString
|
|
81
|
+
fileExtension: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
82
82
|
chunkType: z.ZodOptional<z.ZodString>;
|
|
83
|
-
|
|
84
|
-
excludeDocumentation: z.ZodOptional<z.ZodEffects<z.ZodBoolean, boolean, unknown>>;
|
|
83
|
+
documentation: z.ZodOptional<z.ZodEnum<["only", "exclude", "include"]>>;
|
|
85
84
|
author: z.ZodOptional<z.ZodString>;
|
|
86
85
|
modifiedAfter: z.ZodOptional<z.ZodString>;
|
|
87
86
|
modifiedBefore: z.ZodOptional<z.ZodString>;
|
|
@@ -97,7 +96,7 @@ export declare function createSearchSchemas(schemaBuilder: SchemaBuilder): {
|
|
|
97
96
|
path: z.ZodOptional<z.ZodString>;
|
|
98
97
|
};
|
|
99
98
|
HybridSearchSchema: {
|
|
100
|
-
rerank: z.ZodOptional<z.ZodUnion<[z.
|
|
99
|
+
rerank: z.ZodOptional<z.ZodUnion<[z.ZodTypeAny, z.ZodObject<{
|
|
101
100
|
custom: z.ZodObject<Record<string, z.ZodOptional<z.ZodNumber>>, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
102
101
|
[x: string]: number | undefined;
|
|
103
102
|
}, {
|
|
@@ -115,10 +114,9 @@ export declare function createSearchSchemas(schemaBuilder: SchemaBuilder): {
|
|
|
115
114
|
metaOnly: z.ZodOptional<z.ZodEffects<z.ZodBoolean, boolean, unknown>>;
|
|
116
115
|
level: z.ZodOptional<z.ZodEnum<["chunk", "file"]>>;
|
|
117
116
|
language: z.ZodOptional<z.ZodString>;
|
|
118
|
-
fileExtension: z.ZodOptional<z.ZodString
|
|
117
|
+
fileExtension: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
119
118
|
chunkType: z.ZodOptional<z.ZodString>;
|
|
120
|
-
|
|
121
|
-
excludeDocumentation: z.ZodOptional<z.ZodEffects<z.ZodBoolean, boolean, unknown>>;
|
|
119
|
+
documentation: z.ZodOptional<z.ZodEnum<["only", "exclude", "include"]>>;
|
|
122
120
|
author: z.ZodOptional<z.ZodString>;
|
|
123
121
|
modifiedAfter: z.ZodOptional<z.ZodString>;
|
|
124
122
|
modifiedBefore: z.ZodOptional<z.ZodString>;
|
|
@@ -134,9 +132,7 @@ export declare function createSearchSchemas(schemaBuilder: SchemaBuilder): {
|
|
|
134
132
|
path: z.ZodOptional<z.ZodString>;
|
|
135
133
|
};
|
|
136
134
|
SearchCodeSchema: {
|
|
137
|
-
|
|
138
|
-
documentationOnly: z.ZodOptional<z.ZodEffects<z.ZodBoolean, boolean, unknown>>;
|
|
139
|
-
rerank: z.ZodOptional<z.ZodUnion<[z.ZodEnum<[string, ...string[]]>, z.ZodObject<{
|
|
135
|
+
rerank: z.ZodOptional<z.ZodUnion<[z.ZodTypeAny, z.ZodObject<{
|
|
140
136
|
custom: z.ZodObject<Record<string, z.ZodOptional<z.ZodNumber>>, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
141
137
|
[x: string]: number | undefined;
|
|
142
138
|
}, {
|
|
@@ -152,10 +148,9 @@ export declare function createSearchSchemas(schemaBuilder: SchemaBuilder): {
|
|
|
152
148
|
};
|
|
153
149
|
}>]>>;
|
|
154
150
|
language: z.ZodOptional<z.ZodString>;
|
|
155
|
-
fileExtension: z.ZodOptional<z.ZodString
|
|
151
|
+
fileExtension: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
156
152
|
chunkType: z.ZodOptional<z.ZodString>;
|
|
157
|
-
|
|
158
|
-
excludeDocumentation: z.ZodOptional<z.ZodEffects<z.ZodBoolean, boolean, unknown>>;
|
|
153
|
+
documentation: z.ZodOptional<z.ZodEnum<["only", "exclude", "include"]>>;
|
|
159
154
|
author: z.ZodOptional<z.ZodString>;
|
|
160
155
|
modifiedAfter: z.ZodOptional<z.ZodString>;
|
|
161
156
|
modifiedBefore: z.ZodOptional<z.ZodString>;
|
|
@@ -175,7 +170,7 @@ export declare function createSearchSchemas(schemaBuilder: SchemaBuilder): {
|
|
|
175
170
|
offset: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
176
171
|
metaOnly: z.ZodDefault<z.ZodOptional<z.ZodEffects<z.ZodBoolean, boolean, unknown>>>;
|
|
177
172
|
level: z.ZodOptional<z.ZodEnum<["chunk", "file"]>>;
|
|
178
|
-
rerank: z.ZodUnion<[z.
|
|
173
|
+
rerank: z.ZodUnion<[z.ZodTypeAny, z.ZodObject<{
|
|
179
174
|
custom: z.ZodObject<Record<string, z.ZodOptional<z.ZodNumber>>, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
180
175
|
[x: string]: number | undefined;
|
|
181
176
|
}, {
|
|
@@ -191,10 +186,9 @@ export declare function createSearchSchemas(schemaBuilder: SchemaBuilder): {
|
|
|
191
186
|
};
|
|
192
187
|
}>]>;
|
|
193
188
|
language: z.ZodOptional<z.ZodString>;
|
|
194
|
-
fileExtension: z.ZodOptional<z.ZodString
|
|
189
|
+
fileExtension: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
195
190
|
chunkType: z.ZodOptional<z.ZodString>;
|
|
196
|
-
|
|
197
|
-
excludeDocumentation: z.ZodOptional<z.ZodEffects<z.ZodBoolean, boolean, unknown>>;
|
|
191
|
+
documentation: z.ZodOptional<z.ZodEnum<["only", "exclude", "include"]>>;
|
|
198
192
|
author: z.ZodOptional<z.ZodString>;
|
|
199
193
|
modifiedAfter: z.ZodOptional<z.ZodString>;
|
|
200
194
|
modifiedBefore: z.ZodOptional<z.ZodString>;
|
|
@@ -214,7 +208,7 @@ export declare function createSearchSchemas(schemaBuilder: SchemaBuilder): {
|
|
|
214
208
|
filter: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
215
209
|
pathPattern: z.ZodOptional<z.ZodString>;
|
|
216
210
|
fileExtensions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
217
|
-
rerank: z.ZodOptional<z.ZodUnion<[z.
|
|
211
|
+
rerank: z.ZodOptional<z.ZodUnion<[z.ZodTypeAny, z.ZodObject<{
|
|
218
212
|
custom: z.ZodObject<Record<string, z.ZodOptional<z.ZodNumber>>, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
219
213
|
[x: string]: number | undefined;
|
|
220
214
|
}, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAY7D,eAAO,MAAM,sBAAsB;;;;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAY7D,eAAO,MAAM,sBAAsB;;;;CAYlC,CAAC;AAEF,eAAO,MAAM,sBAAsB;;CAElC,CAAC;AAEF,eAAO,MAAM,uBAAuB;;CAEnC,CAAC;AAMF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;CAW9B,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;CAGjC,CAAC;AAMF,eAAO,MAAM,mBAAmB;;;;;CAQ/B,CAAC;AAEF,eAAO,MAAM,oBAAoB;;CAEhC,CAAC;AAEF,eAAO,MAAM,oBAAoB;;CAEhC,CAAC;AAEF,eAAO,MAAM,gBAAgB;;CAE5B,CAAC;AA0GF,wBAAgB,mBAAmB,CAAC,aAAa,EAAE,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+H/D;AAED,2EAA2E;AAC3E,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|