@githits/mcp 0.12.1 → 0.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/README.md +1 -1
- package/dist/client.d.ts +59 -0
- package/dist/client.js +1 -1
- package/dist/index.d.ts +64 -0
- package/dist/index.js +28 -26
- package/dist/shared/{chunk-p5xxvkdz.js → chunk-h6wfms9v.js} +60 -5
- package/dist/shared/{chunk-8s2r83es.js → chunk-j0jr58yz.js} +2 -2
- package/dist/smoke-test.js +1 -1
- package/dist/tools.d.ts +1 -1
- package/dist/tools.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -65,7 +65,7 @@ const tool = toCallableTool(createGetExampleTool(service));
|
|
|
65
65
|
|
|
66
66
|
`toCallableTool()` wraps the tool's Zod object schema, emits input-mode JSON
|
|
67
67
|
Schema, and validates/defaults input before calling the service. The omitted
|
|
68
|
-
`format` field remains optional in the schema and defaults to `"text
|
|
68
|
+
`format` field remains optional in the schema and defaults to `"text"`. The only format values are `"text"` and `"json"`.
|
|
69
69
|
Unknown object properties follow the normal Zod object behavior. Successful
|
|
70
70
|
and structured error results are returned as the serializable `ToolResult`
|
|
71
71
|
shape. If the caller supplies an `AbortSignal`, it is forwarded unchanged to
|
package/dist/client.d.ts
CHANGED
|
@@ -232,11 +232,64 @@ interface UnifiedSearchAssociatedSymbolContext extends UnifiedSearchSymbolContex
|
|
|
232
232
|
definitionRange?: UnifiedSearchDefinitionRange;
|
|
233
233
|
}
|
|
234
234
|
type UnifiedSearchSymbolContext = UnifiedSearchEnclosingSymbolContext | UnifiedSearchAssociatedSymbolContext;
|
|
235
|
+
interface UnifiedSearchSemanticPreferredRead {
|
|
236
|
+
targetLabel: string;
|
|
237
|
+
registry: string | null;
|
|
238
|
+
packageName: string | null;
|
|
239
|
+
version: string | null;
|
|
240
|
+
repoUrl: string;
|
|
241
|
+
gitRef: string;
|
|
242
|
+
commitSha: string;
|
|
243
|
+
requestedRef: string | null;
|
|
244
|
+
filePath: string;
|
|
245
|
+
repositoryFilePath: string;
|
|
246
|
+
startLine: number;
|
|
247
|
+
endLine: number;
|
|
248
|
+
}
|
|
249
|
+
interface UnifiedSearchSemanticScope {
|
|
250
|
+
name: string;
|
|
251
|
+
qualifiedPath: string;
|
|
252
|
+
kind: string;
|
|
253
|
+
parentQualifiedPath: string | null;
|
|
254
|
+
declarationStartLine: number;
|
|
255
|
+
declarationEndLine: number;
|
|
256
|
+
parameterNames: string[];
|
|
257
|
+
returnType: string | null;
|
|
258
|
+
symbolRef: string;
|
|
259
|
+
}
|
|
260
|
+
interface UnifiedSearchSemanticContext {
|
|
261
|
+
scopes: UnifiedSearchSemanticScope[];
|
|
262
|
+
scopeChainTruncated: boolean;
|
|
263
|
+
preferredRead: UnifiedSearchSemanticPreferredRead;
|
|
264
|
+
}
|
|
265
|
+
interface UnifiedSearchFocusedSourceLine {
|
|
266
|
+
lineNumber: number;
|
|
267
|
+
text: string;
|
|
268
|
+
highlights: Array<readonly [number, number]>;
|
|
269
|
+
prefixTruncated: boolean;
|
|
270
|
+
suffixTruncated: boolean;
|
|
271
|
+
}
|
|
272
|
+
interface UnifiedSearchFocusedSource {
|
|
273
|
+
startLine: number;
|
|
274
|
+
endLine: number;
|
|
275
|
+
matchLine: number | null;
|
|
276
|
+
rangeKind: string | null;
|
|
277
|
+
matchSpansTruncated: boolean;
|
|
278
|
+
lines: UnifiedSearchFocusedSourceLine[];
|
|
279
|
+
linesOmittedBefore: boolean;
|
|
280
|
+
linesOmittedAfter: boolean;
|
|
281
|
+
}
|
|
282
|
+
interface UnifiedSearchRepositoryEvidence {
|
|
283
|
+
focusedSource: UnifiedSearchFocusedSource | null;
|
|
284
|
+
semanticContext: UnifiedSearchSemanticContext | null;
|
|
285
|
+
}
|
|
235
286
|
interface UnifiedSearchLocator {
|
|
236
287
|
registry?: string;
|
|
237
288
|
packageName?: string;
|
|
238
289
|
version?: string;
|
|
239
290
|
pageId?: string;
|
|
291
|
+
/** Preferred docs_read target; absent on legacy discovery results. */
|
|
292
|
+
docsReadTarget?: string;
|
|
240
293
|
sourceKind?: string;
|
|
241
294
|
sourceUrl?: string;
|
|
242
295
|
repoUrl?: string;
|
|
@@ -268,6 +321,8 @@ interface UnifiedSearchHit {
|
|
|
268
321
|
title?: Array<readonly [number, number]>;
|
|
269
322
|
summary?: Array<readonly [number, number]>;
|
|
270
323
|
};
|
|
324
|
+
repositoryEvidence?: UnifiedSearchRepositoryEvidence | null;
|
|
325
|
+
contentSafety?: ContentSafety;
|
|
271
326
|
locator: UnifiedSearchLocator;
|
|
272
327
|
requestedTargetLabel?: string;
|
|
273
328
|
freshTargetLabel?: string;
|
|
@@ -1409,6 +1464,8 @@ interface ReadPackageDocParams {
|
|
|
1409
1464
|
}
|
|
1410
1465
|
interface PackageDocPageSummary {
|
|
1411
1466
|
id?: string;
|
|
1467
|
+
/** Preferred read target emitted by the backend. */
|
|
1468
|
+
docsReadTarget: string;
|
|
1412
1469
|
title?: string;
|
|
1413
1470
|
slug?: string;
|
|
1414
1471
|
order?: number;
|
|
@@ -1440,6 +1497,8 @@ interface PackageDocSource {
|
|
|
1440
1497
|
}
|
|
1441
1498
|
interface PackageDocPage {
|
|
1442
1499
|
id?: string;
|
|
1500
|
+
/** Preferred read target emitted by the backend. */
|
|
1501
|
+
docsReadTarget: string;
|
|
1443
1502
|
title?: string;
|
|
1444
1503
|
content?: string;
|
|
1445
1504
|
contentFormat?: string;
|
package/dist/client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DEFAULT_MCP_URL2,DEFAULT_API_URL2,DEFAULT_CODE_NAV_URL2,getMcpUrl2,getApiUrl2,getCodeNavigationUrl2,getEnvApiToken2,GitHitsServiceImpl2,PKGSEER_REGISTRY_LIST2,toPkgseerRegistry2,toPkgseerRegistryLowercase2,CodeDiffError2,CodeNavigationServiceImpl2,PackageIntelligenceServiceImpl2,RefreshingGitHitsService2,createStaticTokenProvider2,createClientHeaderBuilder2}from"./shared/chunk-
|
|
1
|
+
import{DEFAULT_MCP_URL2,DEFAULT_API_URL2,DEFAULT_CODE_NAV_URL2,getMcpUrl2,getApiUrl2,getCodeNavigationUrl2,getEnvApiToken2,GitHitsServiceImpl2,PKGSEER_REGISTRY_LIST2,toPkgseerRegistry2,toPkgseerRegistryLowercase2,CodeDiffError2,CodeNavigationServiceImpl2,PackageIntelligenceServiceImpl2,RefreshingGitHitsService2,createStaticTokenProvider2,createClientHeaderBuilder2}from"./shared/chunk-h6wfms9v.js";export{CodeDiffError2 as CodeDiffError,CodeNavigationServiceImpl2 as CodeNavigationServiceImpl,DEFAULT_API_URL2 as DEFAULT_API_URL,DEFAULT_CODE_NAV_URL2 as DEFAULT_CODE_NAV_URL,DEFAULT_MCP_URL2 as DEFAULT_MCP_URL,GitHitsServiceImpl2 as GitHitsServiceImpl,PKGSEER_REGISTRY_LIST2 as PKGSEER_REGISTRY_LIST,PackageIntelligenceServiceImpl2 as PackageIntelligenceServiceImpl,RefreshingGitHitsService2 as RefreshingGitHitsService,createClientHeaderBuilder2 as createClientHeaderBuilder,createStaticTokenProvider2 as createStaticTokenProvider,getApiUrl2 as getApiUrl,getCodeNavigationUrl2 as getCodeNavigationUrl,getEnvApiToken2 as getEnvApiToken,getMcpUrl2 as getMcpUrl,toPkgseerRegistry2 as toPkgseerRegistry,toPkgseerRegistryLowercase2 as toPkgseerRegistryLowercase};
|
package/dist/index.d.ts
CHANGED
|
@@ -180,11 +180,64 @@ interface UnifiedSearchAssociatedSymbolContext extends UnifiedSearchSymbolContex
|
|
|
180
180
|
definitionRange?: UnifiedSearchDefinitionRange;
|
|
181
181
|
}
|
|
182
182
|
type UnifiedSearchSymbolContext = UnifiedSearchEnclosingSymbolContext | UnifiedSearchAssociatedSymbolContext;
|
|
183
|
+
interface UnifiedSearchSemanticPreferredRead {
|
|
184
|
+
targetLabel: string;
|
|
185
|
+
registry: string | null;
|
|
186
|
+
packageName: string | null;
|
|
187
|
+
version: string | null;
|
|
188
|
+
repoUrl: string;
|
|
189
|
+
gitRef: string;
|
|
190
|
+
commitSha: string;
|
|
191
|
+
requestedRef: string | null;
|
|
192
|
+
filePath: string;
|
|
193
|
+
repositoryFilePath: string;
|
|
194
|
+
startLine: number;
|
|
195
|
+
endLine: number;
|
|
196
|
+
}
|
|
197
|
+
interface UnifiedSearchSemanticScope {
|
|
198
|
+
name: string;
|
|
199
|
+
qualifiedPath: string;
|
|
200
|
+
kind: string;
|
|
201
|
+
parentQualifiedPath: string | null;
|
|
202
|
+
declarationStartLine: number;
|
|
203
|
+
declarationEndLine: number;
|
|
204
|
+
parameterNames: string[];
|
|
205
|
+
returnType: string | null;
|
|
206
|
+
symbolRef: string;
|
|
207
|
+
}
|
|
208
|
+
interface UnifiedSearchSemanticContext {
|
|
209
|
+
scopes: UnifiedSearchSemanticScope[];
|
|
210
|
+
scopeChainTruncated: boolean;
|
|
211
|
+
preferredRead: UnifiedSearchSemanticPreferredRead;
|
|
212
|
+
}
|
|
213
|
+
interface UnifiedSearchFocusedSourceLine {
|
|
214
|
+
lineNumber: number;
|
|
215
|
+
text: string;
|
|
216
|
+
highlights: Array<readonly [number, number]>;
|
|
217
|
+
prefixTruncated: boolean;
|
|
218
|
+
suffixTruncated: boolean;
|
|
219
|
+
}
|
|
220
|
+
interface UnifiedSearchFocusedSource {
|
|
221
|
+
startLine: number;
|
|
222
|
+
endLine: number;
|
|
223
|
+
matchLine: number | null;
|
|
224
|
+
rangeKind: string | null;
|
|
225
|
+
matchSpansTruncated: boolean;
|
|
226
|
+
lines: UnifiedSearchFocusedSourceLine[];
|
|
227
|
+
linesOmittedBefore: boolean;
|
|
228
|
+
linesOmittedAfter: boolean;
|
|
229
|
+
}
|
|
230
|
+
interface UnifiedSearchRepositoryEvidence {
|
|
231
|
+
focusedSource: UnifiedSearchFocusedSource | null;
|
|
232
|
+
semanticContext: UnifiedSearchSemanticContext | null;
|
|
233
|
+
}
|
|
183
234
|
interface UnifiedSearchLocator {
|
|
184
235
|
registry?: string;
|
|
185
236
|
packageName?: string;
|
|
186
237
|
version?: string;
|
|
187
238
|
pageId?: string;
|
|
239
|
+
/** Preferred docs_read target; absent on legacy discovery results. */
|
|
240
|
+
docsReadTarget?: string;
|
|
188
241
|
sourceKind?: string;
|
|
189
242
|
sourceUrl?: string;
|
|
190
243
|
repoUrl?: string;
|
|
@@ -216,6 +269,8 @@ interface UnifiedSearchHit {
|
|
|
216
269
|
title?: Array<readonly [number, number]>;
|
|
217
270
|
summary?: Array<readonly [number, number]>;
|
|
218
271
|
};
|
|
272
|
+
repositoryEvidence?: UnifiedSearchRepositoryEvidence | null;
|
|
273
|
+
contentSafety?: ContentSafety;
|
|
219
274
|
locator: UnifiedSearchLocator;
|
|
220
275
|
requestedTargetLabel?: string;
|
|
221
276
|
freshTargetLabel?: string;
|
|
@@ -389,6 +444,11 @@ interface ReadFileResult {
|
|
|
389
444
|
targetResolution?: TargetResolution;
|
|
390
445
|
availableVersions?: AvailableVersion[];
|
|
391
446
|
}
|
|
447
|
+
type ContentModification = "INVISIBLE_CONTROLS_STRIPPED" | "HTML_COMMENTS_STRIPPED" | "IMAGES_REPLACED" | "UNSAFE_LINKS_NEUTRALIZED";
|
|
448
|
+
interface ContentSafety {
|
|
449
|
+
filtered: boolean;
|
|
450
|
+
modifications: ContentModification[];
|
|
451
|
+
}
|
|
392
452
|
type GrepRepoPatternType = "LITERAL" | "REGEX";
|
|
393
453
|
type GrepPathSelectorKind = "EXACT" | "PREFIX" | "GLOB";
|
|
394
454
|
interface GrepRepoPathSelector {
|
|
@@ -1093,6 +1153,8 @@ interface ReadPackageDocParams {
|
|
|
1093
1153
|
}
|
|
1094
1154
|
interface PackageDocPageSummary {
|
|
1095
1155
|
id?: string;
|
|
1156
|
+
/** Preferred read target emitted by the backend. */
|
|
1157
|
+
docsReadTarget: string;
|
|
1096
1158
|
title?: string;
|
|
1097
1159
|
slug?: string;
|
|
1098
1160
|
order?: number;
|
|
@@ -1124,6 +1186,8 @@ interface PackageDocSource {
|
|
|
1124
1186
|
}
|
|
1125
1187
|
interface PackageDocPage {
|
|
1126
1188
|
id?: string;
|
|
1189
|
+
/** Preferred read target emitted by the backend. */
|
|
1190
|
+
docsReadTarget: string;
|
|
1127
1191
|
title?: string;
|
|
1128
1192
|
content?: string;
|
|
1129
1193
|
contentFormat?: string;
|