@githits/mcp 0.9.2 → 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/client.d.ts +41 -12
- package/dist/client.js +1 -1
- package/dist/index.d.ts +32 -11
- package/dist/index.js +9 -9
- package/dist/shared/{chunk-0p63psz9.js → chunk-nxdqknc9.js} +17 -2
- package/dist/smoke-test.d.ts +1 -1
- package/dist/smoke-test.js +1 -1
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -136,15 +136,15 @@ interface TargetResolution {
|
|
|
136
136
|
}
|
|
137
137
|
type UnifiedSearchSource = "AUTO" | "DOCS" | "CODE" | "SYMBOL";
|
|
138
138
|
type UnifiedSearchResultType = "DOCUMENTATION_PAGE" | "REPOSITORY_SYMBOL" | "REPOSITORY_CODE" | "REPOSITORY_DOC";
|
|
139
|
-
type
|
|
140
|
-
type CodeIndexState = "CURRENT" | "INDEXED" | "INDEXING" | "STALE" | "FAILED" | "MISSING" | string;
|
|
139
|
+
type KnownUnifiedSearchSessionStatus = "PENDING" | "INDEXING" | "SEARCHING" | "COMPLETED" | "DEFERRED" | "TIMEOUT" | "FAILED";
|
|
141
140
|
/**
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
* return more); `CAPPED` is terminal (a crawl limit stopped indexing, so
|
|
146
|
-
* retrying will not help). Both mean served evidence may be incomplete.
|
|
141
|
+
* Backend-owned search-session status. Known values have explicit client
|
|
142
|
+
* behavior; future values remain readable instead of invalidating the whole
|
|
143
|
+
* response.
|
|
147
144
|
*/
|
|
145
|
+
type UnifiedSearchSessionStatus = KnownUnifiedSearchSessionStatus | (string & {});
|
|
146
|
+
type CodeIndexState = "CURRENT" | "INDEXED" | "INDEXING" | "PROVISIONAL" | "STALE" | "FAILED" | "MISSING" | string;
|
|
147
|
+
/** Coverage state of the selected published documentation corpus. */
|
|
148
148
|
type DocCoverageState = "NONE" | "PARTIAL" | "CAPPED" | "COMPLETE" | string;
|
|
149
149
|
/**
|
|
150
150
|
* Coverage metadata for crawled documentation site data. Present on docs
|
|
@@ -154,10 +154,10 @@ interface DocCoverage {
|
|
|
154
154
|
coverageState: DocCoverageState;
|
|
155
155
|
coverageReason?: string;
|
|
156
156
|
pagesCrawled?: number;
|
|
157
|
-
frontierRemaining?: number;
|
|
157
|
+
frontierRemaining?: number | null;
|
|
158
158
|
artifactOverflowPageCount?: number;
|
|
159
159
|
estimatedTotalPages?: number;
|
|
160
|
-
/** Backend-owned note
|
|
160
|
+
/** Backend-owned coverage note retained for structured callers. */
|
|
161
161
|
note?: string;
|
|
162
162
|
}
|
|
163
163
|
type DiscoveryRequestedRefKind = "OMITTED_VERSION" | "LATEST_VERSION" | "EXACT_VERSION" | "DEFAULT_BRANCH" | "HEAD" | "BRANCH" | "SHA";
|
|
@@ -242,6 +242,22 @@ interface UnifiedSearchSourceStatus {
|
|
|
242
242
|
suggestedSiteTargetsTruncated: boolean;
|
|
243
243
|
note?: string;
|
|
244
244
|
coverage?: DocCoverage;
|
|
245
|
+
contributors?: UnifiedSearchDocumentationContributor[];
|
|
246
|
+
}
|
|
247
|
+
type UnifiedSearchDocumentationContributorKind = "REPOSITORY_DOCS" | "DOCPACK";
|
|
248
|
+
type UnifiedSearchDocumentationContributorState = "SEARCHED" | "READY" | "PENDING" | "UNAVAILABLE";
|
|
249
|
+
type UnifiedSearchDocumentationFreshness = "CURRENT" | "PROVISIONAL" | "STALE";
|
|
250
|
+
/** One physical documentation corpus disclosed for a DOCS source row. */
|
|
251
|
+
interface UnifiedSearchDocumentationContributor {
|
|
252
|
+
kind: UnifiedSearchDocumentationContributorKind;
|
|
253
|
+
state: UnifiedSearchDocumentationContributorState;
|
|
254
|
+
freshness?: UnifiedSearchDocumentationFreshness;
|
|
255
|
+
resultCount: number;
|
|
256
|
+
repositoryUrl?: string;
|
|
257
|
+
commitSha?: string;
|
|
258
|
+
siteKey?: string;
|
|
259
|
+
siteUrl?: string;
|
|
260
|
+
coverage?: DocCoverage;
|
|
245
261
|
}
|
|
246
262
|
interface UnifiedSearchProgressTarget {
|
|
247
263
|
requested?: string;
|
|
@@ -272,6 +288,7 @@ interface UnifiedSearchResult {
|
|
|
272
288
|
page: UnifiedSearchPageInfo;
|
|
273
289
|
partialResults: boolean;
|
|
274
290
|
sourceStatus: UnifiedSearchSourceStatus[];
|
|
291
|
+
evidenceNotice?: string;
|
|
275
292
|
}
|
|
276
293
|
interface UnifiedSearchProgress {
|
|
277
294
|
searchRef: string;
|
|
@@ -367,8 +384,10 @@ interface ReadFileResult {
|
|
|
367
384
|
availableVersions?: AvailableVersion[];
|
|
368
385
|
}
|
|
369
386
|
/**
|
|
370
|
-
* A package target for CodeDiff. Version
|
|
371
|
-
* comparison endpoints, so this target
|
|
387
|
+
* A package-addressing target for a repository-wide CodeDiff. Version
|
|
388
|
+
* resolution belongs to the comparison endpoints, so this target
|
|
389
|
+
* intentionally has no version field. Package addressing resolves repository
|
|
390
|
+
* identity and commits; it does not narrow raw file results to a package path.
|
|
372
391
|
* Target selection uses own-key presence; a `repoUrl` key rejects this shape
|
|
373
392
|
* even when its value is `undefined`.
|
|
374
393
|
*/
|
|
@@ -402,6 +421,11 @@ interface CodeDiffParams {
|
|
|
402
421
|
}
|
|
403
422
|
type CodeDiffRefKind = "SHA" | "TAG" | "BRANCH" | "HEAD" | "UNKNOWN";
|
|
404
423
|
type CodeDiffVersionSource = "REGISTRY" | "GIT_HEAD" | "TAG" | "RELEASE";
|
|
424
|
+
/**
|
|
425
|
+
* Effective raw inventory scope. Current successful backends return
|
|
426
|
+
* `REPOSITORY`; `PACKAGE` and `UNKNOWN` remain accepted for compatibility with
|
|
427
|
+
* legacy responses.
|
|
428
|
+
*/
|
|
405
429
|
type RawCodeDiffScopeStatus = "PACKAGE" | "REPOSITORY" | "UNKNOWN";
|
|
406
430
|
type RawCodeDiffFileStatus = "ADDED" | "DELETED" | "MODIFIED";
|
|
407
431
|
type RawCodeDiffPathEncoding = "UTF8" | "BYTE_ESCAPED";
|
|
@@ -432,10 +456,15 @@ interface RawCodeDiffSummary {
|
|
|
432
456
|
unprojectableFiles: number;
|
|
433
457
|
}
|
|
434
458
|
interface RawCodeDiffScope {
|
|
459
|
+
/** Scope of returned paths and counts, independent of addressing form. */
|
|
435
460
|
status: RawCodeDiffScopeStatus;
|
|
461
|
+
/** Legacy package-scope metadata; absent from current repository results. */
|
|
436
462
|
fromSubpath?: string;
|
|
463
|
+
/** Legacy package-scope metadata; absent from current repository results. */
|
|
437
464
|
toSubpath?: string;
|
|
465
|
+
/** Caller-supplied repository-relative filter, not verified package scope. */
|
|
438
466
|
pathPrefix?: string;
|
|
467
|
+
/** Caller-supplied repository-relative filter, not verified package scope. */
|
|
439
468
|
pathGlob?: string;
|
|
440
469
|
}
|
|
441
470
|
interface RawCodeDiffContentFailure {
|
|
@@ -1448,4 +1477,4 @@ declare function withTelemetrySpan<T>(name: string, operation: () => Promise<T>,
|
|
|
1448
1477
|
declare function startTelemetrySpan(name: string, attributes?: TelemetryAttributes): TelemetrySpanHandle | undefined;
|
|
1449
1478
|
declare function endTelemetrySpan(handle: TelemetrySpanHandle | undefined, attributes?: TelemetryAttributes): void;
|
|
1450
1479
|
declare function flushTelemetry(exitCode?: number): void;
|
|
1451
|
-
export {
|
|
1480
|
+
export { AgentInfo, CodeDiffError, CodeDiffErrorDetails, CodeDiffErrorRef, CodeDiffMode, CodeDiffOptions, CodeDiffPackageInfo, CodeDiffPackageTarget, CodeDiffParams, CodeDiffPartialResult, CodeDiffRefKind, CodeDiffRefResolution, CodeDiffRepositoryTarget, CodeDiffResult, CodeDiffService, CodeDiffTarget, CodeDiffVersionSource, CodeNavigationService, CodeNavigationServiceImpl, ContentModification, ContentSafety, DEFAULT_API_URL, DEFAULT_CODE_NAV_URL, DEFAULT_MCP_URL, GitHitsService, GitHitsServiceImpl, PKGSEER_REGISTRY_LIST, PackageIntelligenceService, PackageIntelligenceServiceImpl, RawCodeDiff, RawCodeDiffContentCoverage, RawCodeDiffContentFailure, RawCodeDiffFile, RawCodeDiffFileContentStatus, RawCodeDiffFileStatus, RawCodeDiffPathEncoding, RawCodeDiffScope, RawCodeDiffScopeStatus, RawCodeDiffSummary, RefreshingGitHitsService, TokenProvider, createClientHeaderBuilder, createStaticTokenProvider, endTelemetrySpan, flushTelemetry, getApiUrl, getCodeNavigationUrl, getEnvApiToken, getMcpUrl, startTelemetrySpan, toPkgseerRegistry, toPkgseerRegistryLowercase, withTelemetrySpan };
|
package/dist/client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CodeDiffError,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{CodeDiffError,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-nxdqknc9.js";export{CodeDiffError,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};
|
package/dist/index.d.ts
CHANGED
|
@@ -99,15 +99,15 @@ interface TargetResolution {
|
|
|
99
99
|
}
|
|
100
100
|
type UnifiedSearchSource = "AUTO" | "DOCS" | "CODE" | "SYMBOL";
|
|
101
101
|
type UnifiedSearchResultType = "DOCUMENTATION_PAGE" | "REPOSITORY_SYMBOL" | "REPOSITORY_CODE" | "REPOSITORY_DOC";
|
|
102
|
-
type
|
|
103
|
-
type CodeIndexState = "CURRENT" | "INDEXED" | "INDEXING" | "STALE" | "FAILED" | "MISSING" | string;
|
|
102
|
+
type KnownUnifiedSearchSessionStatus = "PENDING" | "INDEXING" | "SEARCHING" | "COMPLETED" | "DEFERRED" | "TIMEOUT" | "FAILED";
|
|
104
103
|
/**
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
* return more); `CAPPED` is terminal (a crawl limit stopped indexing, so
|
|
109
|
-
* retrying will not help). Both mean served evidence may be incomplete.
|
|
104
|
+
* Backend-owned search-session status. Known values have explicit client
|
|
105
|
+
* behavior; future values remain readable instead of invalidating the whole
|
|
106
|
+
* response.
|
|
110
107
|
*/
|
|
108
|
+
type UnifiedSearchSessionStatus = KnownUnifiedSearchSessionStatus | (string & {});
|
|
109
|
+
type CodeIndexState = "CURRENT" | "INDEXED" | "INDEXING" | "PROVISIONAL" | "STALE" | "FAILED" | "MISSING" | string;
|
|
110
|
+
/** Coverage state of the selected published documentation corpus. */
|
|
111
111
|
type DocCoverageState = "NONE" | "PARTIAL" | "CAPPED" | "COMPLETE" | string;
|
|
112
112
|
/**
|
|
113
113
|
* Coverage metadata for crawled documentation site data. Present on docs
|
|
@@ -117,10 +117,10 @@ interface DocCoverage {
|
|
|
117
117
|
coverageState: DocCoverageState;
|
|
118
118
|
coverageReason?: string;
|
|
119
119
|
pagesCrawled?: number;
|
|
120
|
-
frontierRemaining?: number;
|
|
120
|
+
frontierRemaining?: number | null;
|
|
121
121
|
artifactOverflowPageCount?: number;
|
|
122
122
|
estimatedTotalPages?: number;
|
|
123
|
-
/** Backend-owned note
|
|
123
|
+
/** Backend-owned coverage note retained for structured callers. */
|
|
124
124
|
note?: string;
|
|
125
125
|
}
|
|
126
126
|
type DiscoveryRequestedRefKind = "OMITTED_VERSION" | "LATEST_VERSION" | "EXACT_VERSION" | "DEFAULT_BRANCH" | "HEAD" | "BRANCH" | "SHA";
|
|
@@ -205,6 +205,22 @@ interface UnifiedSearchSourceStatus {
|
|
|
205
205
|
suggestedSiteTargetsTruncated: boolean;
|
|
206
206
|
note?: string;
|
|
207
207
|
coverage?: DocCoverage;
|
|
208
|
+
contributors?: UnifiedSearchDocumentationContributor[];
|
|
209
|
+
}
|
|
210
|
+
type UnifiedSearchDocumentationContributorKind = "REPOSITORY_DOCS" | "DOCPACK";
|
|
211
|
+
type UnifiedSearchDocumentationContributorState = "SEARCHED" | "READY" | "PENDING" | "UNAVAILABLE";
|
|
212
|
+
type UnifiedSearchDocumentationFreshness = "CURRENT" | "PROVISIONAL" | "STALE";
|
|
213
|
+
/** One physical documentation corpus disclosed for a DOCS source row. */
|
|
214
|
+
interface UnifiedSearchDocumentationContributor {
|
|
215
|
+
kind: UnifiedSearchDocumentationContributorKind;
|
|
216
|
+
state: UnifiedSearchDocumentationContributorState;
|
|
217
|
+
freshness?: UnifiedSearchDocumentationFreshness;
|
|
218
|
+
resultCount: number;
|
|
219
|
+
repositoryUrl?: string;
|
|
220
|
+
commitSha?: string;
|
|
221
|
+
siteKey?: string;
|
|
222
|
+
siteUrl?: string;
|
|
223
|
+
coverage?: DocCoverage;
|
|
208
224
|
}
|
|
209
225
|
interface UnifiedSearchProgressTarget {
|
|
210
226
|
requested?: string;
|
|
@@ -235,6 +251,7 @@ interface UnifiedSearchResult {
|
|
|
235
251
|
page: UnifiedSearchPageInfo;
|
|
236
252
|
partialResults: boolean;
|
|
237
253
|
sourceStatus: UnifiedSearchSourceStatus[];
|
|
254
|
+
evidenceNotice?: string;
|
|
238
255
|
}
|
|
239
256
|
interface UnifiedSearchProgress {
|
|
240
257
|
searchRef: string;
|
|
@@ -1133,7 +1150,11 @@ interface McpServerMetadata {
|
|
|
1133
1150
|
interface McpRequestContext<TExtra = unknown> {
|
|
1134
1151
|
extra: TExtra | undefined;
|
|
1135
1152
|
}
|
|
1136
|
-
type
|
|
1153
|
+
type McpToolServicesProviderFor<
|
|
1154
|
+
TServices extends McpToolServices,
|
|
1155
|
+
TExtra = unknown
|
|
1156
|
+
> = TServices | ((context: McpRequestContext<TExtra>) => TServices | Promise<TServices>);
|
|
1157
|
+
type McpToolServicesProvider<TExtra = unknown> = McpToolServicesProviderFor<McpToolServices, TExtra>;
|
|
1137
1158
|
/** Wraps one public MCP tool call without receiving arguments or auth data. */
|
|
1138
1159
|
type McpToolExecutionHook = (toolName: string, runHandler: () => Promise<ToolResult>) => ToolResult | Promise<ToolResult>;
|
|
1139
1160
|
interface CreateMcpServerOptions<TExtra = unknown> {
|
|
@@ -1160,4 +1181,4 @@ declare function registerMcpTools<TExtra = unknown>(server: McpServer, options:
|
|
|
1160
1181
|
* Creates the transport-neutral MCP server with injected services.
|
|
1161
1182
|
*/
|
|
1162
1183
|
declare function createMcpServer<TExtra = unknown>(options: CreateMcpServerOptions<TExtra>): McpServer;
|
|
1163
|
-
export {
|
|
1184
|
+
export { BuildMcpInstructionsOptions, CreateMcpServerOptions, McpAuthAction, McpAuthActionContext, McpRequestContext, McpServerMetadata, McpToolDescriptor, McpToolExecutionHook, McpToolServices, McpToolServicesProvider, buildMcpInstructions, createMcpServer, getMcpToolDescriptors, registerMcpTools };
|