@githits/mcp 0.6.2 → 0.6.4

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 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: CodeNavigationTarget[];
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;
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-q54qd0qb.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};
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-179kkbsr.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
@@ -16,7 +16,6 @@ interface BuildMcpInstructionsOptions {
16
16
  }
17
17
  declare function buildMcpInstructions(options?: BuildMcpInstructionsOptions): string;
18
18
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
19
- import { ToolAnnotations as ToolAnnotations2 } from "@modelcontextprotocol/sdk/types.js";
20
19
  /**
21
20
  * Registry taxonomy shared by code-navigation and package-intelligence
22
21
  * services. Single source of truth for:
@@ -62,6 +61,10 @@ interface CodeNavigationTarget {
62
61
  repoUrl?: string;
63
62
  gitRef?: string;
64
63
  }
64
+ interface UnifiedSearchTarget extends CodeNavigationTarget {
65
+ /** Standalone documentation site target, canonicalized as `site:<host[/path]>`. */
66
+ site?: string;
67
+ }
65
68
  interface IndexResolution {
66
69
  requestedVersion?: string;
67
70
  requestedRef?: string;
@@ -76,6 +79,7 @@ interface TargetResolutionIdentity {
76
79
  repoUrl?: string;
77
80
  gitRef?: string;
78
81
  commitSha?: string;
82
+ site?: string;
79
83
  }
80
84
  type AvailableRef = AvailableVersion;
81
85
  type SuggestedRef = AvailableVersion;
@@ -94,8 +98,30 @@ type UnifiedSearchSource = "AUTO" | "DOCS" | "CODE" | "SYMBOL";
94
98
  type UnifiedSearchResultType = "DOCUMENTATION_PAGE" | "REPOSITORY_SYMBOL" | "REPOSITORY_CODE" | "REPOSITORY_DOC";
95
99
  type UnifiedSearchSessionStatus = "PENDING" | "INDEXING" | "SEARCHING" | "COMPLETED" | "TIMEOUT" | "FAILED";
96
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
+ }
97
123
  type DiscoveryRequestedRefKind = "OMITTED_VERSION" | "LATEST_VERSION" | "EXACT_VERSION" | "DEFAULT_BRANCH" | "HEAD" | "BRANCH" | "SHA";
98
- type DiscoveryTargetMode = "PACKAGES" | "REPO" | "MIXED";
124
+ type DiscoveryTargetMode = "PACKAGES" | "REPO" | "MIXED" | "SITES" | "SITE";
99
125
  interface UnifiedSearchFilters {
100
126
  fileIntent?: FileIntent;
101
127
  kind?: SymbolKind;
@@ -104,7 +130,7 @@ interface UnifiedSearchFilters {
104
130
  pathPrefix?: string;
105
131
  }
106
132
  interface UnifiedSearchParams {
107
- targets: CodeNavigationTarget[];
133
+ targets: UnifiedSearchTarget[];
108
134
  query: string;
109
135
  sources?: UnifiedSearchSource[];
110
136
  filters?: UnifiedSearchFilters;
@@ -173,6 +199,7 @@ interface UnifiedSearchSourceStatus {
173
199
  ignoredQueryFeatures: string[];
174
200
  incompatibleQueryFeatures: string[];
175
201
  note?: string;
202
+ coverage?: DocCoverage;
176
203
  }
177
204
  interface UnifiedSearchProgressTarget {
178
205
  requested?: string;
@@ -185,6 +212,7 @@ interface UnifiedSearchProgressTarget {
185
212
  availableVersions?: AvailableVersion[];
186
213
  availableRefs?: AvailableRef[];
187
214
  suggestedRefs?: SuggestedRef[];
215
+ coverage?: DocCoverage;
188
216
  }
189
217
  interface UnifiedSearchRequestedTarget {
190
218
  registry?: CodeNavigationRegistry;
@@ -192,6 +220,7 @@ interface UnifiedSearchRequestedTarget {
192
220
  version?: string;
193
221
  repoUrl?: string;
194
222
  gitRef?: string;
223
+ site?: string;
195
224
  }
196
225
  interface UnifiedSearchResult {
197
226
  query: string;
@@ -1052,7 +1081,14 @@ interface PackageIntelligenceService {
1052
1081
  listPackageDocs(params: ListPackageDocsParams): Promise<PackageDocsList>;
1053
1082
  readPackageDoc(params: ReadPackageDocParams): Promise<PackageDocResult>;
1054
1083
  }
1084
+ import { ToolAnnotations } from "@modelcontextprotocol/sdk/types.js";
1055
1085
  import { z } from "zod";
1086
+ /** Annotation fields required by OpenAI's MCP marketplace validation. */
1087
+ interface CompleteToolAnnotations extends ToolAnnotations {
1088
+ readOnlyHint: boolean;
1089
+ openWorldHint: boolean;
1090
+ destructiveHint: boolean;
1091
+ }
1056
1092
  /**
1057
1093
  * Standard result type for all MCP tools
1058
1094
  */
@@ -1066,7 +1102,7 @@ type ToolResult = {
1066
1102
  /**
1067
1103
  * Zod raw shape type (what MCP SDK expects)
1068
1104
  */
1069
- type ZodRawShape = {
1105
+ type ZodRawShape2 = {
1070
1106
  [k: string]: z.ZodTypeAny;
1071
1107
  };
1072
1108
  interface McpAuthActionContext {
@@ -1103,11 +1139,11 @@ interface CreateMcpServerOptions<TExtra = unknown> {
1103
1139
  instructionOptions?: Parameters<typeof buildMcpInstructions>[0];
1104
1140
  traceTool?: McpToolExecutionHook;
1105
1141
  }
1106
- interface McpToolDescriptor<TSchema extends ZodRawShape = ZodRawShape> {
1142
+ interface McpToolDescriptor<TSchema extends ZodRawShape2 = ZodRawShape2> {
1107
1143
  name: string;
1108
1144
  description: string;
1109
1145
  schema: TSchema;
1110
- annotations?: ToolAnnotations2;
1146
+ annotations: CompleteToolAnnotations;
1111
1147
  }
1112
1148
  declare function getMcpToolDescriptors(): McpToolDescriptor[];
1113
1149
  declare function registerMcpTools<TExtra = unknown>(server: McpServer, options: {