octocode-mcp 9.0.0 → 9.2.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 +14 -135
- package/dist/index.js +29 -7
- package/package.json +34 -15
- package/dist/src/errorCodes.d.ts +0 -353
- package/dist/src/github/client.d.ts +0 -4
- package/dist/src/github/codeSearch.d.ts +0 -4
- package/dist/src/github/errorConstants.d.ts +0 -173
- package/dist/src/github/errors.d.ts +0 -4
- package/dist/src/github/fileOperations.d.ts +0 -6
- package/dist/src/github/githubAPI.d.ts +0 -164
- package/dist/src/github/index.d.ts +0 -10
- package/dist/src/github/pullRequestSearch.d.ts +0 -7
- package/dist/src/github/queryBuilders.d.ts +0 -7
- package/dist/src/github/repoSearch.d.ts +0 -6
- package/dist/src/index.d.ts +0 -2
- package/dist/src/prompts/prompts.d.ts +0 -7
- package/dist/src/responses.d.ts +0 -8
- package/dist/src/scheme/baseSchema.d.ts +0 -21
- package/dist/src/scheme/github_fetch_content.d.ts +0 -203
- package/dist/src/scheme/github_search_code.d.ts +0 -131
- package/dist/src/scheme/github_search_pull_requests.d.ts +0 -390
- package/dist/src/scheme/github_search_repos.d.ts +0 -79
- package/dist/src/scheme/github_view_repo_structure.d.ts +0 -148
- package/dist/src/scheme/package_search.d.ts +0 -196
- package/dist/src/security/contentSanitizer.d.ts +0 -6
- package/dist/src/security/mask.d.ts +0 -1
- package/dist/src/security/regexes.d.ts +0 -2
- package/dist/src/security/withSecurityValidation.d.ts +0 -86
- package/dist/src/serverConfig.d.ts +0 -12
- package/dist/src/session.d.ts +0 -22
- package/dist/src/tools/github_fetch_content.d.ts +0 -3
- package/dist/src/tools/github_search_code.d.ts +0 -3
- package/dist/src/tools/github_search_pull_requests.d.ts +0 -3
- package/dist/src/tools/github_search_repos.d.ts +0 -3
- package/dist/src/tools/github_view_repo_structure.d.ts +0 -3
- package/dist/src/tools/package_search.d.ts +0 -3
- package/dist/src/tools/toolConfig.d.ts +0 -16
- package/dist/src/tools/toolMetadata.d.ts +0 -207
- package/dist/src/tools/toolsManager.d.ts +0 -6
- package/dist/src/tools/utils.d.ts +0 -23
- package/dist/src/types.d.ts +0 -537
- package/dist/src/utils/bulkOperations.d.ts +0 -3
- package/dist/src/utils/cache.d.ts +0 -22
- package/dist/src/utils/diffParser.d.ts +0 -1
- package/dist/src/utils/exec.d.ts +0 -25
- package/dist/src/utils/fetchWithRetries.d.ts +0 -52
- package/dist/src/utils/fileFilters.d.ts +0 -19
- package/dist/src/utils/githubRepoFallback.d.ts +0 -17
- package/dist/src/utils/logger.d.ts +0 -40
- package/dist/src/utils/npmPackage.d.ts +0 -3
- package/dist/src/utils/package.d.ts +0 -50
- package/dist/src/utils/promiseUtils.d.ts +0 -2
- package/dist/src/utils/pythonPackage.d.ts +0 -2
- package/dist/tests/errorCodes.test.d.ts +0 -1
- package/dist/tests/fixtures/mcp-fixtures.d.ts +0 -24
- package/dist/tests/fixtures/mcp-fixtures.test.d.ts +0 -1
- package/dist/tests/github/client.test.d.ts +0 -1
- package/dist/tests/github/codeSearch.filtering.test.d.ts +0 -1
- package/dist/tests/github/codeSearch.security.test.d.ts +0 -1
- package/dist/tests/github/errors.test.d.ts +0 -1
- package/dist/tests/github/fileOperations.processContent.test.d.ts +0 -1
- package/dist/tests/github/fileOperations.recursive.test.d.ts +0 -1
- package/dist/tests/github/githubAPI.test.d.ts +0 -1
- package/dist/tests/github/index.test.d.ts +0 -1
- package/dist/tests/github/pullRequestSearch.coverage.test.d.ts +0 -1
- package/dist/tests/github/pullRequestSearch.test.d.ts +0 -1
- package/dist/tests/github/queryBuilders.test.d.ts +0 -1
- package/dist/tests/github/repoSearch.test.d.ts +0 -1
- package/dist/tests/index.logic.test.d.ts +0 -1
- package/dist/tests/index.shutdown.test.d.ts +0 -1
- package/dist/tests/index.startup.test.d.ts +0 -1
- package/dist/tests/index.test.d.ts +0 -1
- package/dist/tests/investigate_pr_response.test.d.ts +0 -1
- package/dist/tests/prompts/prompts.test.d.ts +0 -1
- package/dist/tests/scheme/github_fetch_content.test.d.ts +0 -1
- package/dist/tests/security/contentSanitizer.test.d.ts +0 -1
- package/dist/tests/security/mask.branches.test.d.ts +0 -1
- package/dist/tests/security/mask.test.d.ts +0 -1
- package/dist/tests/security/withSecurityValidation.basic.test.d.ts +0 -1
- package/dist/tests/security/withSecurityValidation.extractRepoOwner.test.d.ts +0 -1
- package/dist/tests/security/withSecurityValidation.extractResearchFields.test.d.ts +0 -1
- package/dist/tests/security/withSecurityValidation.logging.test.d.ts +0 -1
- package/dist/tests/serverConfig.test.d.ts +0 -1
- package/dist/tests/session.edgecases.test.d.ts +0 -1
- package/dist/tests/session.logging_control.test.d.ts +0 -1
- package/dist/tests/session.test.d.ts +0 -1
- package/dist/tests/setup.d.ts +0 -1
- package/dist/tests/tools/callback.test.d.ts +0 -1
- package/dist/tests/tools/github_fetch_content.test.d.ts +0 -1
- package/dist/tests/tools/github_search_code.filtering.test.d.ts +0 -1
- package/dist/tests/tools/github_search_code.match_modes.test.d.ts +0 -22
- package/dist/tests/tools/github_search_code.test.d.ts +0 -1
- package/dist/tests/tools/github_search_code.tool.test.d.ts +0 -1
- package/dist/tests/tools/github_search_pull_requests.test.d.ts +0 -1
- package/dist/tests/tools/github_search_repos.tool.test.d.ts +0 -1
- package/dist/tests/tools/github_search_repos_integration.test.d.ts +0 -1
- package/dist/tests/tools/github_search_repos_query_splitting.test.d.ts +0 -1
- package/dist/tests/tools/github_view_repo_structure.test.d.ts +0 -1
- package/dist/tests/tools/github_view_repo_structure_filters.test.d.ts +0 -1
- package/dist/tests/tools/hints.test.d.ts +0 -1
- package/dist/tests/tools/package_search.test.d.ts +0 -1
- package/dist/tests/tools/response_structure.test.d.ts +0 -12
- package/dist/tests/tools/toolConfig.branches.test.d.ts +0 -1
- package/dist/tests/tools/toolConfig.test.d.ts +0 -1
- package/dist/tests/tools/toolMetadata.branches.test.d.ts +0 -1
- package/dist/tests/tools/toolMetadata.edge.test.d.ts +0 -1
- package/dist/tests/tools/toolMetadata.final.test.d.ts +0 -1
- package/dist/tests/tools/toolMetadata.test.d.ts +0 -1
- package/dist/tests/tools/toolsManager.metadata.test.d.ts +0 -1
- package/dist/tests/tools/toolsManager.test.d.ts +0 -1
- package/dist/tests/tools/tools_logging_integration.test.d.ts +0 -1
- package/dist/tests/tools/userContext_authInfo_propagation.test.d.ts +0 -10
- package/dist/tests/tools/utils.test.d.ts +0 -5
- package/dist/tests/types/github-openapi.test.d.ts +0 -1
- package/dist/tests/utils/betaFeatures.test.d.ts +0 -1
- package/dist/tests/utils/bulkOperations.instructions.test.d.ts +0 -1
- package/dist/tests/utils/bulkOperations.test.d.ts +0 -1
- package/dist/tests/utils/cache.collision.test.d.ts +0 -1
- package/dist/tests/utils/cache.dataCache.test.d.ts +0 -1
- package/dist/tests/utils/diffParser.test.d.ts +0 -1
- package/dist/tests/utils/exec.test.d.ts +0 -1
- package/dist/tests/utils/fetchWithRetries.additional.test.d.ts +0 -1
- package/dist/tests/utils/fetchWithRetries.test.d.ts +0 -1
- package/dist/tests/utils/fileFilters.test.d.ts +0 -1
- package/dist/tests/utils/github/fileOperations.test.d.ts +0 -1
- package/dist/tests/utils/githubAPI.test.d.ts +0 -1
- package/dist/tests/utils/githubRepoFallback.test.d.ts +0 -1
- package/dist/tests/utils/logger.test.d.ts +0 -1
- package/dist/tests/utils/npmPackage.test.d.ts +0 -1
- package/dist/tests/utils/promiseUtils.concurrency.test.d.ts +0 -1
- package/dist/tests/utils/promiseUtils.edgecases.test.d.ts +0 -1
- package/dist/tests/utils/promiseUtils.test.d.ts +0 -1
- package/dist/tests/utils/pythonPackage.test.d.ts +0 -1
- package/dist/tests/utils/responses.empty_arrays.test.d.ts +0 -4
- package/dist/tests/utils/responses.test.d.ts +0 -1
- package/dist/tests/utils/sessionCacheTests.test.d.ts +0 -1
- package/dist/tests/utils/testHelpers.d.ts +0 -16
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
-
/**
|
|
3
|
-
* Simple, reliable logger for Octocode MCP
|
|
4
|
-
*/
|
|
5
|
-
export declare class OctocodeLogger {
|
|
6
|
-
private readonly prefix;
|
|
7
|
-
private readonly server;
|
|
8
|
-
constructor(server: McpServer, component?: string);
|
|
9
|
-
/**
|
|
10
|
-
* Log info message
|
|
11
|
-
*/
|
|
12
|
-
info(message: string, data?: Record<string, unknown>): Promise<void>;
|
|
13
|
-
/**
|
|
14
|
-
* Log warning message
|
|
15
|
-
*/
|
|
16
|
-
warning(message: string, data?: Record<string, unknown>): Promise<void>;
|
|
17
|
-
/**
|
|
18
|
-
* Log error message
|
|
19
|
-
*/
|
|
20
|
-
error(message: string, data?: Record<string, unknown>): Promise<void>;
|
|
21
|
-
/**
|
|
22
|
-
* Log debug message
|
|
23
|
-
*/
|
|
24
|
-
debug(message: string, data?: Record<string, unknown>): Promise<void>;
|
|
25
|
-
/**
|
|
26
|
-
* Core logging method - simple and reliable
|
|
27
|
-
*/
|
|
28
|
-
private log;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Create a simple logger instance
|
|
32
|
-
*/
|
|
33
|
-
export declare function createLogger(server: McpServer, component?: string): OctocodeLogger;
|
|
34
|
-
/**
|
|
35
|
-
* Simple logger factory
|
|
36
|
-
*/
|
|
37
|
-
export declare class LoggerFactory {
|
|
38
|
-
private static loggers;
|
|
39
|
-
static getLogger(server: McpServer, component: string): OctocodeLogger;
|
|
40
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { PackageSearchAPIResult, PackageSearchError, DeprecationInfo } from './package.js';
|
|
2
|
-
export declare function searchNpmPackage(packageName: string, limit: number, fetchMetadata: boolean): Promise<PackageSearchAPIResult | PackageSearchError>;
|
|
3
|
-
export declare function checkNpmDeprecation(packageName: string): Promise<DeprecationInfo | null>;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { checkNpmDeprecation } from './npmPackage.js';
|
|
2
|
-
export interface PackageSearchInput {
|
|
3
|
-
ecosystem: 'npm' | 'python';
|
|
4
|
-
name: string;
|
|
5
|
-
searchLimit?: number;
|
|
6
|
-
npmFetchMetadata?: boolean;
|
|
7
|
-
pythonFetchMetadata?: boolean;
|
|
8
|
-
mainResearchGoal?: string;
|
|
9
|
-
researchGoal?: string;
|
|
10
|
-
reasoning?: string;
|
|
11
|
-
}
|
|
12
|
-
export interface MinimalPackageResult {
|
|
13
|
-
name: string;
|
|
14
|
-
repository: string | null;
|
|
15
|
-
}
|
|
16
|
-
export interface NpmPackageResult {
|
|
17
|
-
repoUrl: string | null;
|
|
18
|
-
path: string;
|
|
19
|
-
version: string;
|
|
20
|
-
mainEntry: string | null;
|
|
21
|
-
typeDefinitions: string | null;
|
|
22
|
-
lastPublished?: string;
|
|
23
|
-
}
|
|
24
|
-
export interface PythonPackageResult {
|
|
25
|
-
name: string;
|
|
26
|
-
version: string;
|
|
27
|
-
description: string | null;
|
|
28
|
-
keywords: string[];
|
|
29
|
-
repository: string | null;
|
|
30
|
-
homepage?: string;
|
|
31
|
-
author?: string;
|
|
32
|
-
license?: string;
|
|
33
|
-
lastPublished?: string;
|
|
34
|
-
}
|
|
35
|
-
export type PackageResult = MinimalPackageResult | NpmPackageResult | PythonPackageResult;
|
|
36
|
-
export interface PackageSearchAPIResult {
|
|
37
|
-
packages: PackageResult[];
|
|
38
|
-
ecosystem: 'npm' | 'python';
|
|
39
|
-
totalFound: number;
|
|
40
|
-
}
|
|
41
|
-
export interface PackageSearchError {
|
|
42
|
-
error: string;
|
|
43
|
-
hints?: string[];
|
|
44
|
-
}
|
|
45
|
-
export interface DeprecationInfo {
|
|
46
|
-
deprecated: boolean;
|
|
47
|
-
message?: string;
|
|
48
|
-
}
|
|
49
|
-
export declare function searchPackage(query: PackageSearchInput): Promise<PackageSearchAPIResult | PackageSearchError>;
|
|
50
|
-
export { checkNpmDeprecation };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
-
import { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
-
export interface MockMcpServer {
|
|
4
|
-
server: McpServer;
|
|
5
|
-
callTool: (name: string, args?: Record<string, unknown>, options?: {
|
|
6
|
-
authInfo?: {
|
|
7
|
-
token?: string;
|
|
8
|
-
};
|
|
9
|
-
sessionId?: string;
|
|
10
|
-
}) => Promise<CallToolResult>;
|
|
11
|
-
cleanup: () => void;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Create a mock MCP server for testing
|
|
15
|
-
*/
|
|
16
|
-
export declare function createMockMcpServer(): MockMcpServer;
|
|
17
|
-
/**
|
|
18
|
-
* Create a mock CallToolResult for testing
|
|
19
|
-
*/
|
|
20
|
-
export declare function createMockResult(data: unknown, isError?: boolean): CallToolResult;
|
|
21
|
-
/**
|
|
22
|
-
* Parse JSON from a CallToolResult
|
|
23
|
-
*/
|
|
24
|
-
export declare function parseResultJson<T = unknown>(result: CallToolResult): T;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/tests/setup.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GitHub Search Code - match='file' vs match='path' Modes
|
|
3
|
-
*
|
|
4
|
-
* This test file verifies that both search modes work correctly and return
|
|
5
|
-
* the proper structure based on the search type.
|
|
6
|
-
*
|
|
7
|
-
* IMPORTANT: text_matches behavior has been FIXED (as of this commit):
|
|
8
|
-
*
|
|
9
|
-
* For match='file' (content search):
|
|
10
|
-
* - Searches IN file content for your keywords
|
|
11
|
-
* - Returns: files array with path + text_matches (code snippets where keyword appears)
|
|
12
|
-
* - Example: Searching "useState" returns files with text_matches showing actual code with useState
|
|
13
|
-
*
|
|
14
|
-
* For match='path' (filename/directory search):
|
|
15
|
-
* - Searches in file/directory NAMES for your keywords
|
|
16
|
-
* - Returns: files array with path ONLY (NO text_matches)
|
|
17
|
-
* - Example: Searching "test" returns paths like "scripts/jest/TestFlags.js" (no content snippets)
|
|
18
|
-
* - This makes sense: you're finding files by name, not searching their content!
|
|
19
|
-
*
|
|
20
|
-
* Test Results from Actual Octocode MCP Server (Verified):
|
|
21
|
-
*/
|
|
22
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Comprehensive Response Structure Tests
|
|
3
|
-
*
|
|
4
|
-
* Tests all tools to ensure they properly handle all combinations of:
|
|
5
|
-
* - hasResults: queries that returned results
|
|
6
|
-
* - empty: queries that ran but found no matches
|
|
7
|
-
* - failed: queries that encountered errors
|
|
8
|
-
*
|
|
9
|
-
* Combinations tested:
|
|
10
|
-
* 1. hasResults only
|
|
11
|
-
*/
|
|
12
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Comprehensive tests to verify sessionId and authInfo propagation
|
|
3
|
-
* from Tools → GitHub API layer for ALL tools
|
|
4
|
-
*
|
|
5
|
-
* This test suite ensures that:
|
|
6
|
-
* 1. All tools correctly receive sessionId from withSecurityValidation
|
|
7
|
-
* 2. All tools correctly pass sessionId to GitHub APIs
|
|
8
|
-
* 3. All GitHub APIs properly receive and use sessionId for caching
|
|
9
|
-
*/
|
|
10
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Test helpers for type guards and common test utilities
|
|
3
|
-
*/
|
|
4
|
-
import type { ContentBlock } from '@modelcontextprotocol/sdk/types.js';
|
|
5
|
-
/**
|
|
6
|
-
* Type guard to check if a ContentBlock is TextContent
|
|
7
|
-
*/
|
|
8
|
-
export declare function isTextContent(content: ContentBlock | undefined): content is {
|
|
9
|
-
type: 'text';
|
|
10
|
-
text: string;
|
|
11
|
-
};
|
|
12
|
-
/**
|
|
13
|
-
* Extracts text from a ContentBlock array, asserting it's text content
|
|
14
|
-
* @throws Error if content is not text type
|
|
15
|
-
*/
|
|
16
|
-
export declare function getTextContent(content: ContentBlock[]): string;
|