@githits/mcp 0.6.3 → 0.9.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/client.d.ts +34 -5
- package/dist/client.js +1 -1
- package/dist/index.d.ts +35 -5
- package/dist/index.js +15 -13
- package/dist/shared/chunk-k30yatty.js +1209 -0
- package/dist/smoke-test.js +1 -1
- package/package.json +1 -1
- package/dist/shared/chunk-q54qd0qb.js +0 -1194
package/dist/client.d.ts
CHANGED
|
@@ -87,6 +87,10 @@ interface CodeNavigationTarget {
|
|
|
87
87
|
repoUrl?: string;
|
|
88
88
|
gitRef?: string;
|
|
89
89
|
}
|
|
90
|
+
interface UnifiedSearchTarget extends CodeNavigationTarget {
|
|
91
|
+
/** Standalone documentation site target, canonicalized as `site:<host[/path]>`. */
|
|
92
|
+
site?: string;
|
|
93
|
+
}
|
|
90
94
|
interface IndexResolution {
|
|
91
95
|
requestedVersion?: string;
|
|
92
96
|
requestedRef?: string;
|
|
@@ -101,6 +105,7 @@ interface TargetResolutionIdentity {
|
|
|
101
105
|
repoUrl?: string;
|
|
102
106
|
gitRef?: string;
|
|
103
107
|
commitSha?: string;
|
|
108
|
+
site?: string;
|
|
104
109
|
}
|
|
105
110
|
type AvailableRef = AvailableVersion;
|
|
106
111
|
type SuggestedRef = AvailableVersion;
|
|
@@ -119,8 +124,30 @@ type UnifiedSearchSource = "AUTO" | "DOCS" | "CODE" | "SYMBOL";
|
|
|
119
124
|
type UnifiedSearchResultType = "DOCUMENTATION_PAGE" | "REPOSITORY_SYMBOL" | "REPOSITORY_CODE" | "REPOSITORY_DOC";
|
|
120
125
|
type UnifiedSearchSessionStatus = "PENDING" | "INDEXING" | "SEARCHING" | "COMPLETED" | "TIMEOUT" | "FAILED";
|
|
121
126
|
type CodeIndexState = "CURRENT" | "INDEXED" | "INDEXING" | "STALE" | "FAILED" | "MISSING" | string;
|
|
127
|
+
/**
|
|
128
|
+
* Coverage lifecycle for crawled documentation site data.
|
|
129
|
+
*
|
|
130
|
+
* `PARTIAL` is transient (a crawl is still running, so retrying later can
|
|
131
|
+
* return more); `CAPPED` is terminal (a crawl limit stopped indexing, so
|
|
132
|
+
* retrying will not help). Both mean served evidence may be incomplete.
|
|
133
|
+
*/
|
|
134
|
+
type DocCoverageState = "NONE" | "PARTIAL" | "CAPPED" | "COMPLETE" | string;
|
|
135
|
+
/**
|
|
136
|
+
* Coverage metadata for crawled documentation site data. Present on docs
|
|
137
|
+
* source status and progress targets when the backend has crawl metadata.
|
|
138
|
+
*/
|
|
139
|
+
interface DocCoverage {
|
|
140
|
+
coverageState: DocCoverageState;
|
|
141
|
+
coverageReason?: string;
|
|
142
|
+
pagesCrawled?: number;
|
|
143
|
+
frontierRemaining?: number;
|
|
144
|
+
artifactOverflowPageCount?: number;
|
|
145
|
+
estimatedTotalPages?: number;
|
|
146
|
+
/** Backend-owned note suitable for CLI/MCP rendering. Preferred over client wording. */
|
|
147
|
+
note?: string;
|
|
148
|
+
}
|
|
122
149
|
type DiscoveryRequestedRefKind = "OMITTED_VERSION" | "LATEST_VERSION" | "EXACT_VERSION" | "DEFAULT_BRANCH" | "HEAD" | "BRANCH" | "SHA";
|
|
123
|
-
type DiscoveryTargetMode = "PACKAGES" | "REPO" | "MIXED";
|
|
150
|
+
type DiscoveryTargetMode = "PACKAGES" | "REPO" | "MIXED" | "SITES" | "SITE";
|
|
124
151
|
interface UnifiedSearchFilters {
|
|
125
152
|
fileIntent?: FileIntent;
|
|
126
153
|
kind?: SymbolKind;
|
|
@@ -129,7 +156,7 @@ interface UnifiedSearchFilters {
|
|
|
129
156
|
pathPrefix?: string;
|
|
130
157
|
}
|
|
131
158
|
interface UnifiedSearchParams {
|
|
132
|
-
targets:
|
|
159
|
+
targets: UnifiedSearchTarget[];
|
|
133
160
|
query: string;
|
|
134
161
|
sources?: UnifiedSearchSource[];
|
|
135
162
|
filters?: UnifiedSearchFilters;
|
|
@@ -198,6 +225,7 @@ interface UnifiedSearchSourceStatus {
|
|
|
198
225
|
ignoredQueryFeatures: string[];
|
|
199
226
|
incompatibleQueryFeatures: string[];
|
|
200
227
|
note?: string;
|
|
228
|
+
coverage?: DocCoverage;
|
|
201
229
|
}
|
|
202
230
|
interface UnifiedSearchProgressTarget {
|
|
203
231
|
requested?: string;
|
|
@@ -210,6 +238,7 @@ interface UnifiedSearchProgressTarget {
|
|
|
210
238
|
availableVersions?: AvailableVersion[];
|
|
211
239
|
availableRefs?: AvailableRef[];
|
|
212
240
|
suggestedRefs?: SuggestedRef[];
|
|
241
|
+
coverage?: DocCoverage;
|
|
213
242
|
}
|
|
214
243
|
interface UnifiedSearchRequestedTarget {
|
|
215
244
|
registry?: CodeNavigationRegistry;
|
|
@@ -217,6 +246,7 @@ interface UnifiedSearchRequestedTarget {
|
|
|
217
246
|
version?: string;
|
|
218
247
|
repoUrl?: string;
|
|
219
248
|
gitRef?: string;
|
|
249
|
+
site?: string;
|
|
220
250
|
}
|
|
221
251
|
interface UnifiedSearchResult {
|
|
222
252
|
query: string;
|
|
@@ -394,7 +424,7 @@ interface GrepRepoResult {
|
|
|
394
424
|
}
|
|
395
425
|
interface CodeNavigationService {
|
|
396
426
|
search(params: UnifiedSearchParams): Promise<UnifiedSearchOutcome>;
|
|
397
|
-
searchStatus(searchRef: string): Promise<UnifiedSearchOutcome>;
|
|
427
|
+
searchStatus(searchRef: string, waitTimeoutMs?: number): Promise<UnifiedSearchOutcome>;
|
|
398
428
|
listFiles(params: ListFilesParams): Promise<ListFilesResult>;
|
|
399
429
|
readFile(params: ReadFileParams): Promise<ReadFileResult>;
|
|
400
430
|
grepRepo(params: GrepRepoParams): Promise<GrepRepoResult>;
|
|
@@ -411,13 +441,12 @@ declare class CodeNavigationServiceImpl implements CodeNavigationService {
|
|
|
411
441
|
});
|
|
412
442
|
private postGraphqlWithTargetResolutionFallback;
|
|
413
443
|
search(params: UnifiedSearchParams): Promise<UnifiedSearchOutcome>;
|
|
414
|
-
searchStatus(searchRef: string): Promise<UnifiedSearchOutcome>;
|
|
444
|
+
searchStatus(searchRef: string, waitTimeoutMs?: number): Promise<UnifiedSearchOutcome>;
|
|
415
445
|
private executeUnifiedSearch;
|
|
416
446
|
private executeUnifiedSearchStatus;
|
|
417
447
|
private createHttpError;
|
|
418
448
|
private createTransportError;
|
|
419
449
|
private createGraphQLError;
|
|
420
|
-
private createIndexingMessage;
|
|
421
450
|
private normaliseUnifiedSearchOutcome;
|
|
422
451
|
private normaliseUnifiedSearchResult;
|
|
423
452
|
private normaliseUnifiedSearchProgress;
|
package/dist/client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CodeNavigationServiceImpl,DEFAULT_API_URL,DEFAULT_CODE_NAV_URL,DEFAULT_MCP_URL,GitHitsServiceImpl,PKGSEER_REGISTRY_LIST,PackageIntelligenceServiceImpl,RefreshingGitHitsService,createClientHeaderBuilder,createStaticTokenProvider,endTelemetrySpan,flushTelemetry,getApiUrl,getCodeNavigationUrl,getEnvApiToken,getMcpUrl,startTelemetrySpan,toPkgseerRegistry,toPkgseerRegistryLowercase,withTelemetrySpan}from"./shared/chunk-
|
|
1
|
+
import{CodeNavigationServiceImpl,DEFAULT_API_URL,DEFAULT_CODE_NAV_URL,DEFAULT_MCP_URL,GitHitsServiceImpl,PKGSEER_REGISTRY_LIST,PackageIntelligenceServiceImpl,RefreshingGitHitsService,createClientHeaderBuilder,createStaticTokenProvider,endTelemetrySpan,flushTelemetry,getApiUrl,getCodeNavigationUrl,getEnvApiToken,getMcpUrl,startTelemetrySpan,toPkgseerRegistry,toPkgseerRegistryLowercase,withTelemetrySpan}from"./shared/chunk-k30yatty.js";export{withTelemetrySpan,toPkgseerRegistryLowercase,toPkgseerRegistry,startTelemetrySpan,getMcpUrl,getEnvApiToken,getCodeNavigationUrl,getApiUrl,flushTelemetry,endTelemetrySpan,createStaticTokenProvider,createClientHeaderBuilder,RefreshingGitHitsService,PackageIntelligenceServiceImpl,PKGSEER_REGISTRY_LIST,GitHitsServiceImpl,DEFAULT_MCP_URL,DEFAULT_CODE_NAV_URL,DEFAULT_API_URL,CodeNavigationServiceImpl};
|
package/dist/index.d.ts
CHANGED
|
@@ -61,6 +61,10 @@ interface CodeNavigationTarget {
|
|
|
61
61
|
repoUrl?: string;
|
|
62
62
|
gitRef?: string;
|
|
63
63
|
}
|
|
64
|
+
interface UnifiedSearchTarget extends CodeNavigationTarget {
|
|
65
|
+
/** Standalone documentation site target, canonicalized as `site:<host[/path]>`. */
|
|
66
|
+
site?: string;
|
|
67
|
+
}
|
|
64
68
|
interface IndexResolution {
|
|
65
69
|
requestedVersion?: string;
|
|
66
70
|
requestedRef?: string;
|
|
@@ -75,6 +79,7 @@ interface TargetResolutionIdentity {
|
|
|
75
79
|
repoUrl?: string;
|
|
76
80
|
gitRef?: string;
|
|
77
81
|
commitSha?: string;
|
|
82
|
+
site?: string;
|
|
78
83
|
}
|
|
79
84
|
type AvailableRef = AvailableVersion;
|
|
80
85
|
type SuggestedRef = AvailableVersion;
|
|
@@ -93,8 +98,30 @@ type UnifiedSearchSource = "AUTO" | "DOCS" | "CODE" | "SYMBOL";
|
|
|
93
98
|
type UnifiedSearchResultType = "DOCUMENTATION_PAGE" | "REPOSITORY_SYMBOL" | "REPOSITORY_CODE" | "REPOSITORY_DOC";
|
|
94
99
|
type UnifiedSearchSessionStatus = "PENDING" | "INDEXING" | "SEARCHING" | "COMPLETED" | "TIMEOUT" | "FAILED";
|
|
95
100
|
type CodeIndexState = "CURRENT" | "INDEXED" | "INDEXING" | "STALE" | "FAILED" | "MISSING" | string;
|
|
101
|
+
/**
|
|
102
|
+
* Coverage lifecycle for crawled documentation site data.
|
|
103
|
+
*
|
|
104
|
+
* `PARTIAL` is transient (a crawl is still running, so retrying later can
|
|
105
|
+
* return more); `CAPPED` is terminal (a crawl limit stopped indexing, so
|
|
106
|
+
* retrying will not help). Both mean served evidence may be incomplete.
|
|
107
|
+
*/
|
|
108
|
+
type DocCoverageState = "NONE" | "PARTIAL" | "CAPPED" | "COMPLETE" | string;
|
|
109
|
+
/**
|
|
110
|
+
* Coverage metadata for crawled documentation site data. Present on docs
|
|
111
|
+
* source status and progress targets when the backend has crawl metadata.
|
|
112
|
+
*/
|
|
113
|
+
interface DocCoverage {
|
|
114
|
+
coverageState: DocCoverageState;
|
|
115
|
+
coverageReason?: string;
|
|
116
|
+
pagesCrawled?: number;
|
|
117
|
+
frontierRemaining?: number;
|
|
118
|
+
artifactOverflowPageCount?: number;
|
|
119
|
+
estimatedTotalPages?: number;
|
|
120
|
+
/** Backend-owned note suitable for CLI/MCP rendering. Preferred over client wording. */
|
|
121
|
+
note?: string;
|
|
122
|
+
}
|
|
96
123
|
type DiscoveryRequestedRefKind = "OMITTED_VERSION" | "LATEST_VERSION" | "EXACT_VERSION" | "DEFAULT_BRANCH" | "HEAD" | "BRANCH" | "SHA";
|
|
97
|
-
type DiscoveryTargetMode = "PACKAGES" | "REPO" | "MIXED";
|
|
124
|
+
type DiscoveryTargetMode = "PACKAGES" | "REPO" | "MIXED" | "SITES" | "SITE";
|
|
98
125
|
interface UnifiedSearchFilters {
|
|
99
126
|
fileIntent?: FileIntent;
|
|
100
127
|
kind?: SymbolKind;
|
|
@@ -103,7 +130,7 @@ interface UnifiedSearchFilters {
|
|
|
103
130
|
pathPrefix?: string;
|
|
104
131
|
}
|
|
105
132
|
interface UnifiedSearchParams {
|
|
106
|
-
targets:
|
|
133
|
+
targets: UnifiedSearchTarget[];
|
|
107
134
|
query: string;
|
|
108
135
|
sources?: UnifiedSearchSource[];
|
|
109
136
|
filters?: UnifiedSearchFilters;
|
|
@@ -172,6 +199,7 @@ interface UnifiedSearchSourceStatus {
|
|
|
172
199
|
ignoredQueryFeatures: string[];
|
|
173
200
|
incompatibleQueryFeatures: string[];
|
|
174
201
|
note?: string;
|
|
202
|
+
coverage?: DocCoverage;
|
|
175
203
|
}
|
|
176
204
|
interface UnifiedSearchProgressTarget {
|
|
177
205
|
requested?: string;
|
|
@@ -184,6 +212,7 @@ interface UnifiedSearchProgressTarget {
|
|
|
184
212
|
availableVersions?: AvailableVersion[];
|
|
185
213
|
availableRefs?: AvailableRef[];
|
|
186
214
|
suggestedRefs?: SuggestedRef[];
|
|
215
|
+
coverage?: DocCoverage;
|
|
187
216
|
}
|
|
188
217
|
interface UnifiedSearchRequestedTarget {
|
|
189
218
|
registry?: CodeNavigationRegistry;
|
|
@@ -191,6 +220,7 @@ interface UnifiedSearchRequestedTarget {
|
|
|
191
220
|
version?: string;
|
|
192
221
|
repoUrl?: string;
|
|
193
222
|
gitRef?: string;
|
|
223
|
+
site?: string;
|
|
194
224
|
}
|
|
195
225
|
interface UnifiedSearchResult {
|
|
196
226
|
query: string;
|
|
@@ -368,7 +398,7 @@ interface GrepRepoResult {
|
|
|
368
398
|
}
|
|
369
399
|
interface CodeNavigationService {
|
|
370
400
|
search(params: UnifiedSearchParams): Promise<UnifiedSearchOutcome>;
|
|
371
|
-
searchStatus(searchRef: string): Promise<UnifiedSearchOutcome>;
|
|
401
|
+
searchStatus(searchRef: string, waitTimeoutMs?: number): Promise<UnifiedSearchOutcome>;
|
|
372
402
|
listFiles(params: ListFilesParams): Promise<ListFilesResult>;
|
|
373
403
|
readFile(params: ReadFileParams): Promise<ReadFileResult>;
|
|
374
404
|
grepRepo(params: GrepRepoParams): Promise<GrepRepoResult>;
|
|
@@ -1072,7 +1102,7 @@ type ToolResult = {
|
|
|
1072
1102
|
/**
|
|
1073
1103
|
* Zod raw shape type (what MCP SDK expects)
|
|
1074
1104
|
*/
|
|
1075
|
-
type
|
|
1105
|
+
type ZodRawShape2 = {
|
|
1076
1106
|
[k: string]: z.ZodTypeAny;
|
|
1077
1107
|
};
|
|
1078
1108
|
interface McpAuthActionContext {
|
|
@@ -1109,7 +1139,7 @@ interface CreateMcpServerOptions<TExtra = unknown> {
|
|
|
1109
1139
|
instructionOptions?: Parameters<typeof buildMcpInstructions>[0];
|
|
1110
1140
|
traceTool?: McpToolExecutionHook;
|
|
1111
1141
|
}
|
|
1112
|
-
interface McpToolDescriptor<TSchema extends
|
|
1142
|
+
interface McpToolDescriptor<TSchema extends ZodRawShape2 = ZodRawShape2> {
|
|
1113
1143
|
name: string;
|
|
1114
1144
|
description: string;
|
|
1115
1145
|
schema: TSchema;
|