@githits/mcp 0.10.1 → 0.11.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 +3 -2
- package/dist/client.d.ts +3 -3
- package/dist/client.js +1 -1
- package/dist/index.d.ts +18 -7
- package/dist/index.js +24 -22
- package/dist/shared/{chunk-nxdqknc9.js → chunk-7xsjs2xx.js} +1 -1
- package/dist/smoke-test.d.ts +1 -1
- package/dist/smoke-test.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,11 +9,12 @@ This package exposes transport-neutral helpers for servers that want the GitHits
|
|
|
9
9
|
- `createMcpServer(options)` creates an MCP server with GitHits tools registered.
|
|
10
10
|
- `registerMcpTools(server, options)` registers GitHits tools on an existing MCP server.
|
|
11
11
|
- `getMcpToolDescriptors()` returns static tool metadata without requiring concrete services.
|
|
12
|
-
- `
|
|
12
|
+
- `buildMcpQuickStart(options?)` builds the guide returned by the read-only `quick_start` tool.
|
|
13
|
+
- `buildMcpInstructions(options?)` is a deprecated compatibility alias for `buildMcpQuickStart()`.
|
|
13
14
|
- `@githits/mcp/client` exports concrete GitHits service implementations, static token providers, URL/config helpers, request-header helpers, telemetry helpers, and registry helpers for remote MCP servers.
|
|
14
15
|
- `@githits/mcp/smoke-test` exports reusable smoke assertions and `runMcpSmoke()` for remote MCP server validation.
|
|
15
16
|
|
|
16
|
-
The package expects callers to provide service implementations through `McpToolServices` or a request-scoped `McpToolServicesProvider`. Servers can pass `traceTool` to `createMcpServer()` or `registerMcpTools()` to wrap public tool execution for instrumentation without receiving arguments or auth data.
|
|
17
|
+
The package expects callers to provide service implementations through `McpToolServices` or a request-scoped `McpToolServicesProvider`. GitHits does not populate MCP initialize instructions because hosts expose them inconsistently; `quick_start` owns shared guidance instead. Callers may still pass their own `instructions` explicitly. Use `quickStartOptions` to configure the guide. Servers can pass `traceTool` to `createMcpServer()` or `registerMcpTools()` to wrap public tool execution for instrumentation without receiving arguments or auth data.
|
|
17
18
|
|
|
18
19
|
Only imports from `@githits/mcp`, `@githits/mcp/client`, `@githits/mcp/smoke-test`, and `@githits/mcp/package.json` are public. The workspace alias `@githits/mcp/internal` is not exported, is not supported for external consumers, and must not be used by remote MCP server implementations.
|
|
19
20
|
|
package/dist/client.d.ts
CHANGED
|
@@ -1285,8 +1285,8 @@ interface PackageChangelogParams {
|
|
|
1285
1285
|
/** Branch or tag for CHANGELOG.md fetching. Ignored for GH Releases. */
|
|
1286
1286
|
gitRef?: string;
|
|
1287
1287
|
/**
|
|
1288
|
-
*
|
|
1289
|
-
*
|
|
1288
|
+
* Exclusive start of version range. When set, the backend returns every
|
|
1289
|
+
* entry after `fromVersion` through `toVersion` (or latest); `limit` is
|
|
1290
1290
|
* rejected client-side in this mode.
|
|
1291
1291
|
*/
|
|
1292
1292
|
fromVersion?: string;
|
|
@@ -1323,7 +1323,7 @@ interface ChangelogReport {
|
|
|
1323
1323
|
package?: ChangelogPackageInfo;
|
|
1324
1324
|
/** `"releases"` | `"changelog_file"` | `"hexdocs"` when resolved; absent for package versions with no changelog entry. */
|
|
1325
1325
|
source?: string;
|
|
1326
|
-
/** Entries
|
|
1326
|
+
/** Entries in backend/source order. Empty array = resolved source but nothing in range. */
|
|
1327
1327
|
entries: ChangelogEntryDetail[];
|
|
1328
1328
|
}
|
|
1329
1329
|
type PackageDocSourceKind = "CRAWLED" | "REPOSITORY";
|
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-7xsjs2xx.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
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Build the
|
|
2
|
+
* Build the detailed guide returned by `quick_start`.
|
|
3
3
|
*
|
|
4
4
|
* Emits the core block plus the package/code-tools section.
|
|
5
5
|
* Mirrors `getMcpToolDefinitions` so the instructions stay aligned
|
|
6
6
|
* with the registered tool surface.
|
|
7
7
|
*/
|
|
8
|
-
interface
|
|
8
|
+
interface BuildMcpQuickStartOptions {
|
|
9
9
|
/**
|
|
10
10
|
* Include the external-content posture (shared guardrail block).
|
|
11
11
|
* Defaults to `true` — production always wants it. The eval mock
|
|
@@ -14,6 +14,13 @@ interface BuildMcpInstructionsOptions {
|
|
|
14
14
|
*/
|
|
15
15
|
includeExternalContentPosture?: boolean;
|
|
16
16
|
}
|
|
17
|
+
/** @deprecated Use `BuildMcpQuickStartOptions`; retained for API compatibility. */
|
|
18
|
+
type BuildMcpInstructionsOptions = BuildMcpQuickStartOptions;
|
|
19
|
+
declare function buildMcpQuickStart(options?: BuildMcpQuickStartOptions): string;
|
|
20
|
+
/**
|
|
21
|
+
* @deprecated Use `buildMcpQuickStart`. GitHits no longer publishes MCP
|
|
22
|
+
* initialize instructions because clients expose them inconsistently.
|
|
23
|
+
*/
|
|
17
24
|
declare function buildMcpInstructions(options?: BuildMcpInstructionsOptions): string;
|
|
18
25
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
19
26
|
declare const registryMap: {
|
|
@@ -987,8 +994,8 @@ interface PackageChangelogParams {
|
|
|
987
994
|
/** Branch or tag for CHANGELOG.md fetching. Ignored for GH Releases. */
|
|
988
995
|
gitRef?: string;
|
|
989
996
|
/**
|
|
990
|
-
*
|
|
991
|
-
*
|
|
997
|
+
* Exclusive start of version range. When set, the backend returns every
|
|
998
|
+
* entry after `fromVersion` through `toVersion` (or latest); `limit` is
|
|
992
999
|
* rejected client-side in this mode.
|
|
993
1000
|
*/
|
|
994
1001
|
fromVersion?: string;
|
|
@@ -1025,7 +1032,7 @@ interface ChangelogReport {
|
|
|
1025
1032
|
package?: ChangelogPackageInfo;
|
|
1026
1033
|
/** `"releases"` | `"changelog_file"` | `"hexdocs"` when resolved; absent for package versions with no changelog entry. */
|
|
1027
1034
|
source?: string;
|
|
1028
|
-
/** Entries
|
|
1035
|
+
/** Entries in backend/source order. Empty array = resolved source but nothing in range. */
|
|
1029
1036
|
entries: ChangelogEntryDetail[];
|
|
1030
1037
|
}
|
|
1031
1038
|
type PackageDocSourceKind = "CRAWLED" | "REPOSITORY";
|
|
@@ -1161,8 +1168,12 @@ interface CreateMcpServerOptions<TExtra = unknown> {
|
|
|
1161
1168
|
metadata: McpServerMetadata;
|
|
1162
1169
|
services: McpToolServicesProvider<TExtra>;
|
|
1163
1170
|
authAction?: McpAuthAction;
|
|
1171
|
+
/** Optional caller-owned MCP instructions. GitHits does not provide defaults. */
|
|
1164
1172
|
instructions?: string;
|
|
1165
|
-
|
|
1173
|
+
/** Controls the guide returned by `quick_start`. */
|
|
1174
|
+
quickStartOptions?: Parameters<typeof buildMcpQuickStart>[0];
|
|
1175
|
+
/** @deprecated Use `quickStartOptions`. */
|
|
1176
|
+
instructionOptions?: Parameters<typeof buildMcpQuickStart>[0];
|
|
1166
1177
|
traceTool?: McpToolExecutionHook;
|
|
1167
1178
|
}
|
|
1168
1179
|
interface McpToolDescriptor<TSchema extends ZodRawShape2 = ZodRawShape2> {
|
|
@@ -1181,4 +1192,4 @@ declare function registerMcpTools<TExtra = unknown>(server: McpServer, options:
|
|
|
1181
1192
|
* Creates the transport-neutral MCP server with injected services.
|
|
1182
1193
|
*/
|
|
1183
1194
|
declare function createMcpServer<TExtra = unknown>(options: CreateMcpServerOptions<TExtra>): McpServer;
|
|
1184
|
-
export { BuildMcpInstructionsOptions, CreateMcpServerOptions, McpAuthAction, McpAuthActionContext, McpRequestContext, McpServerMetadata, McpToolDescriptor, McpToolExecutionHook, McpToolServices, McpToolServicesProvider, buildMcpInstructions, createMcpServer, getMcpToolDescriptors, registerMcpTools };
|
|
1195
|
+
export { BuildMcpInstructionsOptions, BuildMcpQuickStartOptions, CreateMcpServerOptions, McpAuthAction, McpAuthActionContext, McpRequestContext, McpServerMetadata, McpToolDescriptor, McpToolExecutionHook, McpToolServices, McpToolServicesProvider, buildMcpInstructions, buildMcpQuickStart, createMcpServer, getMcpToolDescriptors, registerMcpTools };
|