@githits/mcp 0.21.0 → 0.23.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 +45 -13
- package/dist/client.js +1 -1
- package/dist/index.d.ts +36 -4
- package/dist/index.js +34 -14
- package/dist/shared/chunk-a5wp03h1.js +1593 -0
- package/dist/smoke-test.js +1 -1
- package/package.json +2 -2
- package/dist/shared/chunk-qs9f19ge.js +0 -1606
package/dist/client.d.ts
CHANGED
|
@@ -204,8 +204,6 @@ interface UnifiedSearchParams {
|
|
|
204
204
|
interface UnifiedSearchReadOptions {
|
|
205
205
|
/** Cancel the discovery request when its caller stops waiting. */
|
|
206
206
|
signal?: AbortSignal;
|
|
207
|
-
/** Omit compatibility navigation source when the caller renders only matched evidence. */
|
|
208
|
-
omitFocusedSource?: boolean;
|
|
209
207
|
}
|
|
210
208
|
interface UnifiedSearchEvidenceRange {
|
|
211
209
|
startLine: number;
|
|
@@ -296,6 +294,7 @@ interface UnifiedSearchDocumentationPreview {
|
|
|
296
294
|
highlights: Array<readonly [number, number]>;
|
|
297
295
|
}
|
|
298
296
|
interface UnifiedSearchRepositoryEvidence {
|
|
297
|
+
/** Legacy input shape; discovery queries no longer select this field. */
|
|
299
298
|
focusedSource?: UnifiedSearchFocusedSource | null;
|
|
300
299
|
semanticContext: UnifiedSearchSemanticContext | null;
|
|
301
300
|
/** Complete positive-term field list; null means unknown, not no matches. */
|
|
@@ -307,7 +306,7 @@ interface UnifiedSearchLocator {
|
|
|
307
306
|
packageName?: string;
|
|
308
307
|
version?: string;
|
|
309
308
|
pageId?: string;
|
|
310
|
-
/**
|
|
309
|
+
/** Emitted documentation locator accepted by unified read; absent on legacy results. */
|
|
311
310
|
docsReadTarget?: string;
|
|
312
311
|
sourceKind?: string;
|
|
313
312
|
sourceUrl?: string;
|
|
@@ -334,6 +333,7 @@ interface UnifiedSearchHit {
|
|
|
334
333
|
resultType: UnifiedSearchResultType;
|
|
335
334
|
targetLabel: string;
|
|
336
335
|
title?: string;
|
|
336
|
+
/** Legacy input shape; discovery queries no longer select this field. */
|
|
337
337
|
summary?: string;
|
|
338
338
|
score?: number;
|
|
339
339
|
highlights?: {
|
|
@@ -828,24 +828,24 @@ declare class CodeNavigationServiceImpl implements CodeNavigationService, CodeDi
|
|
|
828
828
|
*/
|
|
829
829
|
declare const DEFAULT_MCP_URL = "https://mcp.githits.com";
|
|
830
830
|
declare const DEFAULT_API_URL = "https://api.githits.com";
|
|
831
|
-
declare const DEFAULT_CODE_NAV_URL = "https://
|
|
831
|
+
declare const DEFAULT_CODE_NAV_URL = "https://oss.githits.dev";
|
|
832
832
|
/**
|
|
833
833
|
* Get the MCP server base URL (for OAuth discovery).
|
|
834
834
|
* Override with GITHITS_MCP_URL environment variable.
|
|
835
|
+
* @param env Supplies GITHITS_ENV and URL overrides; defaults to process.env.
|
|
835
836
|
*/
|
|
836
|
-
declare function getMcpUrl(): string;
|
|
837
|
+
declare function getMcpUrl(env?: Record<string, string | undefined>): string;
|
|
837
838
|
/**
|
|
838
839
|
* Get the REST API base URL (for search).
|
|
839
840
|
* Override with GITHITS_API_URL environment variable.
|
|
841
|
+
* @param env Supplies GITHITS_ENV and URL overrides; defaults to process.env.
|
|
840
842
|
*/
|
|
841
|
-
declare function getApiUrl(): string;
|
|
843
|
+
declare function getApiUrl(env?: Record<string, string | undefined>): string;
|
|
842
844
|
/**
|
|
843
|
-
* Get the
|
|
844
|
-
*
|
|
845
|
-
* development parity with older environments but is not publicly
|
|
846
|
-
* documented.
|
|
845
|
+
* Get the OSS package/source backend URL from the preset or GITHITS_CODE_NAV_URL.
|
|
846
|
+
* @param env Supplies GITHITS_ENV and URL overrides; defaults to process.env.
|
|
847
847
|
*/
|
|
848
|
-
declare function getCodeNavigationUrl(): string;
|
|
848
|
+
declare function getCodeNavigationUrl(env?: Record<string, string | undefined>): string;
|
|
849
849
|
/**
|
|
850
850
|
* Get API token from environment variable (for CI/automation).
|
|
851
851
|
*/
|
|
@@ -1613,6 +1613,7 @@ declare class PackageIntelligenceServiceImpl implements PackageIntelligenceServi
|
|
|
1613
1613
|
interface ReadParams {
|
|
1614
1614
|
target: string;
|
|
1615
1615
|
path?: string;
|
|
1616
|
+
selector?: string;
|
|
1616
1617
|
startLine?: number;
|
|
1617
1618
|
endLine?: number;
|
|
1618
1619
|
waitTimeoutMs?: number;
|
|
@@ -1625,7 +1626,38 @@ interface ReadDocsResult {
|
|
|
1625
1626
|
source: "docs";
|
|
1626
1627
|
result: PackageDocResult;
|
|
1627
1628
|
}
|
|
1628
|
-
|
|
1629
|
+
interface CodeSymbolCandidate {
|
|
1630
|
+
name: string | null;
|
|
1631
|
+
qualifiedPath: string | null;
|
|
1632
|
+
kind: string | null;
|
|
1633
|
+
arity: number | null;
|
|
1634
|
+
filePath: string | null;
|
|
1635
|
+
startLine: number | null;
|
|
1636
|
+
endLine: number | null;
|
|
1637
|
+
}
|
|
1638
|
+
interface CodeSymbolSuggestion {
|
|
1639
|
+
name: string;
|
|
1640
|
+
qualifiedPath: string | null;
|
|
1641
|
+
localId: string | null;
|
|
1642
|
+
arity: number | null;
|
|
1643
|
+
filePath: string | null;
|
|
1644
|
+
reason: string | null;
|
|
1645
|
+
}
|
|
1646
|
+
interface CodeSymbolResolution {
|
|
1647
|
+
status: "AMBIGUOUS" | "NOT_FOUND" | "SNAPSHOT_UNSUPPORTED";
|
|
1648
|
+
candidates: CodeSymbolCandidate[];
|
|
1649
|
+
suggestions: CodeSymbolSuggestion[];
|
|
1650
|
+
hasMore: boolean;
|
|
1651
|
+
repoUrl: string;
|
|
1652
|
+
gitRef: string;
|
|
1653
|
+
message: string | null;
|
|
1654
|
+
codeIndexState: string;
|
|
1655
|
+
}
|
|
1656
|
+
interface ReadSymbolResolutionResult {
|
|
1657
|
+
source: "symbol_resolution";
|
|
1658
|
+
result: CodeSymbolResolution;
|
|
1659
|
+
}
|
|
1660
|
+
type ReadResult = ReadCodeResult | ReadDocsResult | ReadSymbolResolutionResult;
|
|
1629
1661
|
interface ReadService {
|
|
1630
1662
|
read(params: ReadParams): Promise<ReadResult>;
|
|
1631
1663
|
}
|
|
@@ -1667,4 +1699,4 @@ declare class RefreshingGitHitsService implements GitHitsService {
|
|
|
1667
1699
|
*/
|
|
1668
1700
|
private withTokenRefresh;
|
|
1669
1701
|
}
|
|
1670
|
-
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, ReadCodeResult, ReadDocsResult, ReadParams, ReadResult, ReadService, ReadServiceImpl, RefreshingGitHitsService, ServiceDiagnostics, TokenProvider, createClientHeaderBuilder, createStaticTokenProvider, getApiUrl, getCodeNavigationUrl, getEnvApiToken, getMcpUrl, toPkgseerRegistry, toPkgseerRegistryLowercase };
|
|
1702
|
+
export { AgentInfo, CodeDiffError, CodeDiffErrorDetails, CodeDiffErrorRef, CodeDiffMode, CodeDiffOptions, CodeDiffPackageInfo, CodeDiffPackageTarget, CodeDiffParams, CodeDiffPartialResult, CodeDiffRefKind, CodeDiffRefResolution, CodeDiffRepositoryTarget, CodeDiffResult, CodeDiffService, CodeDiffTarget, CodeDiffVersionSource, CodeNavigationService, CodeNavigationServiceImpl, CodeSymbolCandidate, CodeSymbolResolution, CodeSymbolSuggestion, 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, ReadCodeResult, ReadDocsResult, ReadParams, ReadResult, ReadService, ReadServiceImpl, ReadSymbolResolutionResult, RefreshingGitHitsService, ServiceDiagnostics, TokenProvider, createClientHeaderBuilder, createStaticTokenProvider, getApiUrl, getCodeNavigationUrl, getEnvApiToken, getMcpUrl, toPkgseerRegistry, toPkgseerRegistryLowercase };
|
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,PackageIntelligenceServiceImpl2,CodeDiffError2,CodeNavigationServiceImpl2,ReadServiceImpl2,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,PackageIntelligenceServiceImpl2,CodeDiffError2,CodeNavigationServiceImpl2,ReadServiceImpl2,RefreshingGitHitsService2,createStaticTokenProvider2,createClientHeaderBuilder2}from"./shared/chunk-a5wp03h1.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,ReadServiceImpl2 as ReadServiceImpl,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
|
@@ -189,8 +189,6 @@ interface UnifiedSearchParams {
|
|
|
189
189
|
interface UnifiedSearchReadOptions {
|
|
190
190
|
/** Cancel the discovery request when its caller stops waiting. */
|
|
191
191
|
signal?: AbortSignal;
|
|
192
|
-
/** Omit compatibility navigation source when the caller renders only matched evidence. */
|
|
193
|
-
omitFocusedSource?: boolean;
|
|
194
192
|
}
|
|
195
193
|
interface UnifiedSearchEvidenceRange {
|
|
196
194
|
startLine: number;
|
|
@@ -281,6 +279,7 @@ interface UnifiedSearchDocumentationPreview {
|
|
|
281
279
|
highlights: Array<readonly [number, number]>;
|
|
282
280
|
}
|
|
283
281
|
interface UnifiedSearchRepositoryEvidence {
|
|
282
|
+
/** Legacy input shape; discovery queries no longer select this field. */
|
|
284
283
|
focusedSource?: UnifiedSearchFocusedSource | null;
|
|
285
284
|
semanticContext: UnifiedSearchSemanticContext | null;
|
|
286
285
|
/** Complete positive-term field list; null means unknown, not no matches. */
|
|
@@ -292,7 +291,7 @@ interface UnifiedSearchLocator {
|
|
|
292
291
|
packageName?: string;
|
|
293
292
|
version?: string;
|
|
294
293
|
pageId?: string;
|
|
295
|
-
/**
|
|
294
|
+
/** Emitted documentation locator accepted by unified read; absent on legacy results. */
|
|
296
295
|
docsReadTarget?: string;
|
|
297
296
|
sourceKind?: string;
|
|
298
297
|
sourceUrl?: string;
|
|
@@ -319,6 +318,7 @@ interface UnifiedSearchHit {
|
|
|
319
318
|
resultType: UnifiedSearchResultType;
|
|
320
319
|
targetLabel: string;
|
|
321
320
|
title?: string;
|
|
321
|
+
/** Legacy input shape; discovery queries no longer select this field. */
|
|
322
322
|
summary?: string;
|
|
323
323
|
score?: number;
|
|
324
324
|
highlights?: {
|
|
@@ -1297,6 +1297,7 @@ interface PackageIntelligenceService {
|
|
|
1297
1297
|
interface ReadParams {
|
|
1298
1298
|
target: string;
|
|
1299
1299
|
path?: string;
|
|
1300
|
+
selector?: string;
|
|
1300
1301
|
startLine?: number;
|
|
1301
1302
|
endLine?: number;
|
|
1302
1303
|
waitTimeoutMs?: number;
|
|
@@ -1309,7 +1310,38 @@ interface ReadDocsResult {
|
|
|
1309
1310
|
source: "docs";
|
|
1310
1311
|
result: PackageDocResult;
|
|
1311
1312
|
}
|
|
1312
|
-
|
|
1313
|
+
interface CodeSymbolCandidate {
|
|
1314
|
+
name: string | null;
|
|
1315
|
+
qualifiedPath: string | null;
|
|
1316
|
+
kind: string | null;
|
|
1317
|
+
arity: number | null;
|
|
1318
|
+
filePath: string | null;
|
|
1319
|
+
startLine: number | null;
|
|
1320
|
+
endLine: number | null;
|
|
1321
|
+
}
|
|
1322
|
+
interface CodeSymbolSuggestion {
|
|
1323
|
+
name: string;
|
|
1324
|
+
qualifiedPath: string | null;
|
|
1325
|
+
localId: string | null;
|
|
1326
|
+
arity: number | null;
|
|
1327
|
+
filePath: string | null;
|
|
1328
|
+
reason: string | null;
|
|
1329
|
+
}
|
|
1330
|
+
interface CodeSymbolResolution {
|
|
1331
|
+
status: "AMBIGUOUS" | "NOT_FOUND" | "SNAPSHOT_UNSUPPORTED";
|
|
1332
|
+
candidates: CodeSymbolCandidate[];
|
|
1333
|
+
suggestions: CodeSymbolSuggestion[];
|
|
1334
|
+
hasMore: boolean;
|
|
1335
|
+
repoUrl: string;
|
|
1336
|
+
gitRef: string;
|
|
1337
|
+
message: string | null;
|
|
1338
|
+
codeIndexState: string;
|
|
1339
|
+
}
|
|
1340
|
+
interface ReadSymbolResolutionResult {
|
|
1341
|
+
source: "symbol_resolution";
|
|
1342
|
+
result: CodeSymbolResolution;
|
|
1343
|
+
}
|
|
1344
|
+
type ReadResult = ReadCodeResult | ReadDocsResult | ReadSymbolResolutionResult;
|
|
1313
1345
|
interface ReadService {
|
|
1314
1346
|
read(params: ReadParams): Promise<ReadResult>;
|
|
1315
1347
|
}
|