octocode-mcp 7.0.6 → 7.0.7

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.
@@ -1,42 +0,0 @@
1
- /**
2
- * GitHub User Information and Rate Limiting Enhancement
3
- *
4
- * Adds user identification and enhanced rate limiting to GitHub API calls
5
- */
6
- import type { GitHubUserInfo, GitHubRateLimitInfo } from '../types.js';
7
- /**
8
- * Get authenticated user information from GitHub API
9
- * Caches result for 15 minutes to avoid unnecessary API calls
10
- */
11
- export declare function getAuthenticatedUser(sessionId?: string): Promise<GitHubUserInfo | null>;
12
- /**
13
- * Get current rate limit status from GitHub API
14
- * This provides real-time rate limit information
15
- */
16
- export declare function getRateLimitStatus(): Promise<GitHubRateLimitInfo | null>;
17
- /**
18
- * Check if we should proceed with an API call based on rate limits
19
- * Returns true if we have enough remaining requests, false otherwise
20
- */
21
- export declare function shouldProceedWithAPICall(type?: 'core' | 'search' | 'graphql', minRemaining?: number): Promise<{
22
- canProceed: boolean;
23
- rateLimitInfo?: GitHubRateLimitInfo;
24
- waitTime?: number;
25
- }>;
26
- /**
27
- * Enhanced GitHub API wrapper with rate limiting and user context
28
- */
29
- export declare function withRateLimitedAPI<T>(apiCall: () => Promise<T>, options?: {
30
- type?: 'core' | 'search' | 'graphql';
31
- minRemaining?: number;
32
- waitOnLimit?: boolean;
33
- }): Promise<T>;
34
- /**
35
- * Get user context for enterprise features
36
- * Combines user info with organization membership if applicable
37
- */
38
- export declare function getUserContext(): Promise<{
39
- user: GitHubUserInfo | null;
40
- organizationId?: string;
41
- rateLimits: GitHubRateLimitInfo | null;
42
- }>;
@@ -1 +0,0 @@
1
- //# sourceMappingURL=resources.d.ts.map
@@ -1,151 +0,0 @@
1
- import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
- import { z } from 'zod';
3
- import { ToolName } from './constants.js';
4
- import type { SamplingResponse } from './types.js';
5
- /**
6
- * Sampling request schema for input validation
7
- */
8
- declare const SamplingRequestSchema: z.ZodObject<{
9
- messages: z.ZodArray<z.ZodObject<{
10
- role: z.ZodEnum<["user", "assistant"]>;
11
- content: z.ZodObject<{
12
- type: z.ZodLiteral<"text">;
13
- text: z.ZodString;
14
- }, "strip", z.ZodTypeAny, {
15
- type: "text";
16
- text: string;
17
- }, {
18
- type: "text";
19
- text: string;
20
- }>;
21
- }, "strip", z.ZodTypeAny, {
22
- content: {
23
- type: "text";
24
- text: string;
25
- };
26
- role: "user" | "assistant";
27
- }, {
28
- content: {
29
- type: "text";
30
- text: string;
31
- };
32
- role: "user" | "assistant";
33
- }>, "many">;
34
- maxTokens: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
35
- temperature: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
36
- stopSequences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
37
- }, "strip", z.ZodTypeAny, {
38
- messages: {
39
- content: {
40
- type: "text";
41
- text: string;
42
- };
43
- role: "user" | "assistant";
44
- }[];
45
- maxTokens: number;
46
- temperature: number;
47
- stopSequences?: string[] | undefined;
48
- }, {
49
- messages: {
50
- content: {
51
- type: "text";
52
- text: string;
53
- };
54
- role: "user" | "assistant";
55
- }[];
56
- maxTokens?: number | undefined;
57
- temperature?: number | undefined;
58
- stopSequences?: string[] | undefined;
59
- }>;
60
- export type SamplingRequest = z.infer<typeof SamplingRequestSchema>;
61
- /**
62
- * Register sampling capabilities with the MCP server
63
- * This enables the server to handle sampling requests from clients
64
- */
65
- export declare function registerSampling(_server: McpServer): void;
66
- /**
67
- * Perform sampling using the MCP server
68
- * Sends a sampling request to the LLM client for actual text generation
69
- *
70
- * @param server - The MCP server instance
71
- * @param samplingRequest - The sampling request containing messages and parameters
72
- * @returns Promise<SamplingResponse> - The LLM-generated content and metadata
73
- */
74
- export declare function performSampling(server: McpServer, samplingRequest: SamplingRequest): Promise<SamplingResponse>;
75
- /**
76
- * Create a simple text sampling request
77
- * Utility function to create a basic sampling request with a single user message
78
- *
79
- * @param text - The text prompt to sample from
80
- * @param options - Optional sampling parameters
81
- * @returns SamplingRequest - The formatted sampling request
82
- */
83
- export declare function createTextSamplingRequest(text: string, options?: {
84
- maxTokens?: number;
85
- temperature?: number;
86
- stopSequences?: string[];
87
- }): SamplingRequest;
88
- /**
89
- * Sampling utilities for common use cases
90
- */
91
- export declare const SamplingUtils: {
92
- /**
93
- * Create a code generation sampling request
94
- */
95
- createCodeSamplingRequest: (prompt: string, language?: string, options?: {
96
- maxTokens?: number;
97
- temperature?: number;
98
- }) => SamplingRequest;
99
- /**
100
- * Create a text completion sampling request
101
- */
102
- createCompletionSamplingRequest: (text: string, options?: {
103
- maxTokens?: number;
104
- temperature?: number;
105
- }) => SamplingRequest;
106
- /**
107
- * Create a question-answering sampling request
108
- */
109
- createQASamplingRequest: (question: string, context?: string, options?: {
110
- maxTokens?: number;
111
- temperature?: number;
112
- }) => SamplingRequest;
113
- /**
114
- * Create a research-enhanced sampling request with context injection
115
- */
116
- createResearchSamplingRequest: (sessionId: string, toolName: ToolName, userPrompt: string, _toolParams?: Record<string, unknown>, options?: {
117
- maxTokens?: number;
118
- temperature?: number;
119
- }) => Promise<SamplingRequest>;
120
- /**
121
- * Create a research synthesis sampling request
122
- */
123
- createSynthesisSamplingRequest: (discoveries: string[], options?: {
124
- maxTokens?: number;
125
- temperature?: number;
126
- }) => SamplingRequest;
127
- };
128
- /**
129
- * Research Sampling utilities
130
- */
131
- export declare const ResearchSampling: {
132
- /**
133
- * Context injection for enhanced tool responses
134
- */
135
- injectToolContext(_sessionId: string, _toolName: ToolName, _toolParams: Record<string, unknown>, _hints: string[]): Promise<string | null>;
136
- /**
137
- * Session update tracking
138
- */
139
- updateSession(_sessionId: string, _toolName: ToolName, _params: Record<string, unknown>, _result: {
140
- success: boolean;
141
- resultCount: number;
142
- hints: string[];
143
- error?: string;
144
- executionTime: number;
145
- }): void;
146
- /**
147
- * Get session insights
148
- */
149
- getSessionInsights(_sessionId: string): Record<string, unknown> | null;
150
- };
151
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,4 +0,0 @@
1
- /**
2
- * Basic tests for GitHub user information functionality
3
- */
4
- export {};