@octocodeai/octocode-tools-core 16.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/dist/commands/BaseCommandBuilder.d.ts +14 -0
- package/dist/commands/FindCommandBuilder.d.ts +23 -0
- package/dist/commands/LsCommandBuilder.d.ts +15 -0
- package/dist/commands/RipgrepCommandBuilder.d.ts +27 -0
- package/dist/config.d.ts +16 -0
- package/dist/direct.d.ts +3 -0
- package/dist/direct.js +53 -0
- package/dist/errors/ToolError.d.ts +21 -0
- package/dist/errors/domainErrors.d.ts +310 -0
- package/dist/errors/errorFactories.d.ts +12 -0
- package/dist/errors/localToolErrors.d.ts +29 -0
- package/dist/errors/pathUtils.d.ts +1 -0
- package/dist/github/client.d.ts +12 -0
- package/dist/github/codeSearch.d.ts +8 -0
- package/dist/github/directoryFetch.d.ts +5 -0
- package/dist/github/errorConstants.d.ts +81 -0
- package/dist/github/errors.d.ts +3 -0
- package/dist/github/fileContent.d.ts +4 -0
- package/dist/github/fileContentProcess.d.ts +11 -0
- package/dist/github/fileContentRaw.d.ts +12 -0
- package/dist/github/githubAPI.d.ts +237 -0
- package/dist/github/history.d.ts +16 -0
- package/dist/github/prByNumber.d.ts +5 -0
- package/dist/github/prContentFetcher.d.ts +5 -0
- package/dist/github/prTransformation.d.ts +109 -0
- package/dist/github/pullRequestSearch.d.ts +4 -0
- package/dist/github/queryBuilders.d.ts +12 -0
- package/dist/github/repoSearch.d.ts +25 -0
- package/dist/github/repoStructure.d.ts +7 -0
- package/dist/github/repoStructurePagination.d.ts +6 -0
- package/dist/github/repoStructureRecursive.d.ts +3 -0
- package/dist/github/responseHeaders.d.ts +1 -0
- package/dist/hints/dynamic.d.ts +6 -0
- package/dist/hints/index.d.ts +2 -0
- package/dist/hints/types.d.ts +1 -0
- package/dist/index.d.ts +187 -0
- package/dist/index.js +64 -0
- package/dist/providers/capabilities.d.ts +2 -0
- package/dist/providers/factory.d.ts +9 -0
- package/dist/providers/github/GitHubProvider.d.ts +14 -0
- package/dist/providers/github/githubContent.d.ts +9 -0
- package/dist/providers/github/githubPullRequests.d.ts +12 -0
- package/dist/providers/github/githubSearch.d.ts +12 -0
- package/dist/providers/github/githubStructure.d.ts +9 -0
- package/dist/providers/github/utils.d.ts +10 -0
- package/dist/providers/providerQueries.d.ts +111 -0
- package/dist/providers/providerResults.d.ts +175 -0
- package/dist/providers/types.d.ts +48 -0
- package/dist/responses.d.ts +47 -0
- package/dist/scheme/coreSchemas.d.ts +10 -0
- package/dist/scheme/fields.d.ts +13 -0
- package/dist/scheme/responseEnvelope.d.ts +16 -0
- package/dist/security/bridge.d.ts +10 -0
- package/dist/serverConfig.d.ts +23 -0
- package/dist/session.d.ts +25 -0
- package/dist/tools/directToolCatalog.d.ts +56 -0
- package/dist/tools/executionGuard.d.ts +14 -0
- package/dist/tools/github_clone_repo/cache.d.ts +21 -0
- package/dist/tools/github_clone_repo/cloneRepo.d.ts +6 -0
- package/dist/tools/github_clone_repo/execution.d.ts +8 -0
- package/dist/tools/github_clone_repo/hints.d.ts +2 -0
- package/dist/tools/github_clone_repo/scheme.d.ts +50 -0
- package/dist/tools/github_clone_repo/types.d.ts +19 -0
- package/dist/tools/github_fetch_content/execution.d.ts +7 -0
- package/dist/tools/github_fetch_content/finalizer.d.ts +10 -0
- package/dist/tools/github_fetch_content/hints.d.ts +2 -0
- package/dist/tools/github_fetch_content/scheme.d.ts +120 -0
- package/dist/tools/github_fetch_content/types.d.ts +66 -0
- package/dist/tools/github_search_code/execution.d.ts +8 -0
- package/dist/tools/github_search_code/finalizer.d.ts +6 -0
- package/dist/tools/github_search_code/hints.d.ts +2 -0
- package/dist/tools/github_search_code/scheme.d.ts +88 -0
- package/dist/tools/github_search_pull_requests/contentRequest.d.ts +52 -0
- package/dist/tools/github_search_pull_requests/contentResponse.d.ts +18 -0
- package/dist/tools/github_search_pull_requests/execution.d.ts +17 -0
- package/dist/tools/github_search_pull_requests/hints.d.ts +2 -0
- package/dist/tools/github_search_pull_requests/scheme.d.ts +224 -0
- package/dist/tools/github_search_pull_requests/types.d.ts +120 -0
- package/dist/tools/github_search_repos/execution.d.ts +17 -0
- package/dist/tools/github_search_repos/hints.d.ts +2 -0
- package/dist/tools/github_search_repos/scheme.d.ts +96 -0
- package/dist/tools/github_view_repo_structure/constants.d.ts +4 -0
- package/dist/tools/github_view_repo_structure/execution.d.ts +20 -0
- package/dist/tools/github_view_repo_structure/hints.d.ts +2 -0
- package/dist/tools/github_view_repo_structure/scheme.d.ts +81 -0
- package/dist/tools/github_view_repo_structure/types.d.ts +39 -0
- package/dist/tools/local_binary_inspect/archiveOps.d.ts +22 -0
- package/dist/tools/local_binary_inspect/binaryInspector.d.ts +49 -0
- package/dist/tools/local_binary_inspect/binaryOps.d.ts +18 -0
- package/dist/tools/local_binary_inspect/decompressOps.d.ts +16 -0
- package/dist/tools/local_binary_inspect/execution.d.ts +4 -0
- package/dist/tools/local_binary_inspect/scheme.d.ts +44 -0
- package/dist/tools/local_fetch_content/contentExtractor.d.ts +9 -0
- package/dist/tools/local_fetch_content/execution.d.ts +5 -0
- package/dist/tools/local_fetch_content/fetchContent.d.ts +4 -0
- package/dist/tools/local_fetch_content/hints.d.ts +2 -0
- package/dist/tools/local_fetch_content/scheme.d.ts +31 -0
- package/dist/tools/local_find_files/execution.d.ts +5 -0
- package/dist/tools/local_find_files/findFiles.d.ts +11 -0
- package/dist/tools/local_find_files/hints.d.ts +2 -0
- package/dist/tools/local_find_files/scheme.d.ts +9 -0
- package/dist/tools/local_ripgrep/execution.d.ts +5 -0
- package/dist/tools/local_ripgrep/grepFallbackExecutor.d.ts +3 -0
- package/dist/tools/local_ripgrep/hints.d.ts +2 -0
- package/dist/tools/local_ripgrep/patternValidation.d.ts +12 -0
- package/dist/tools/local_ripgrep/ripgrepExecutor.d.ts +3 -0
- package/dist/tools/local_ripgrep/ripgrepParser.d.ts +9 -0
- package/dist/tools/local_ripgrep/ripgrepResultBuilder.d.ts +9 -0
- package/dist/tools/local_ripgrep/scheme.d.ts +55 -0
- package/dist/tools/local_ripgrep/searchContentRipgrep.d.ts +5 -0
- package/dist/tools/local_ripgrep/structuralSearch.d.ts +9 -0
- package/dist/tools/local_view_structure/execution.d.ts +5 -0
- package/dist/tools/local_view_structure/hints.d.ts +2 -0
- package/dist/tools/local_view_structure/local_view_structure.d.ts +7 -0
- package/dist/tools/local_view_structure/scheme.d.ts +33 -0
- package/dist/tools/local_view_structure/structureFilters.d.ts +33 -0
- package/dist/tools/local_view_structure/structureParser.d.ts +3 -0
- package/dist/tools/local_view_structure/structureResponse.d.ts +32 -0
- package/dist/tools/local_view_structure/structureWalker.d.ts +24 -0
- package/dist/tools/lsp/semantic_content/execution.d.ts +4 -0
- package/dist/tools/lsp/semantic_content/hints.d.ts +4 -0
- package/dist/tools/lsp/semantic_content/index.d.ts +2 -0
- package/dist/tools/lsp/semantic_content/scheme.d.ts +509 -0
- package/dist/tools/lsp/shared/callHierarchyTraversal.d.ts +11 -0
- package/dist/tools/lsp/shared/resolveSymbolAnchor.d.ts +20 -0
- package/dist/tools/lsp/shared/semanticTypes.d.ts +134 -0
- package/dist/tools/package_search/execution.d.ts +7 -0
- package/dist/tools/package_search/hints.d.ts +2 -0
- package/dist/tools/package_search/scheme.d.ts +51 -0
- package/dist/tools/providerExecution.d.ts +51 -0
- package/dist/tools/providerMappers.d.ts +277 -0
- package/dist/tools/toolConfig.d.ts +41 -0
- package/dist/tools/toolMetadata/baseSchema.d.ts +2 -0
- package/dist/tools/toolMetadata/descriptions.d.ts +1 -0
- package/dist/tools/toolMetadata/gateway.d.ts +7 -0
- package/dist/tools/toolMetadata/metadataPresence.d.ts +1 -0
- package/dist/tools/toolMetadata/names.d.ts +2 -0
- package/dist/tools/toolMetadata/proxies.d.ts +10 -0
- package/dist/tools/toolMetadata/state.d.ts +5 -0
- package/dist/tools/toolMetadata/types.d.ts +2 -0
- package/dist/tools/toolNames.d.ts +2 -0
- package/dist/tools/utils.d.ts +27 -0
- package/dist/types/bulk.d.ts +41 -0
- package/dist/types/execution.d.ts +11 -0
- package/dist/types/metadata.d.ts +69 -0
- package/dist/types/promise.d.ts +12 -0
- package/dist/types/responseTypes.d.ts +57 -0
- package/dist/types/server.d.ts +15 -0
- package/dist/types/session.d.ts +29 -0
- package/dist/types/toolResults.d.ts +62 -0
- package/dist/utils/contextUtils.d.ts +31 -0
- package/dist/utils/core/bestEffort.d.ts +2 -0
- package/dist/utils/core/compare.d.ts +1 -0
- package/dist/utils/core/constants.d.ts +47 -0
- package/dist/utils/core/promise.d.ts +2 -0
- package/dist/utils/core/safeRegex.d.ts +5 -0
- package/dist/utils/core/types.d.ts +50 -0
- package/dist/utils/environment/environmentDetection.d.ts +5 -0
- package/dist/utils/exec/commandAvailability.d.ts +19 -0
- package/dist/utils/exec/npm.d.ts +16 -0
- package/dist/utils/exec/ripgrepBinary.d.ts +3 -0
- package/dist/utils/exec/safe.d.ts +2 -0
- package/dist/utils/exec/spawn.d.ts +34 -0
- package/dist/utils/file/byteOffset.d.ts +12 -0
- package/dist/utils/file/filters.d.ts +11 -0
- package/dist/utils/file/size.d.ts +2 -0
- package/dist/utils/file/toolHelpers.d.ts +28 -0
- package/dist/utils/http/cache.d.ts +16 -0
- package/dist/utils/http/circuitBreaker.d.ts +17 -0
- package/dist/utils/http/fetch.d.ts +13 -0
- package/dist/utils/package/common.d.ts +5 -0
- package/dist/utils/package/npm.d.ts +8 -0
- package/dist/utils/package/schemas.d.ts +60 -0
- package/dist/utils/package/types.d.ts +55 -0
- package/dist/utils/pagination/boundary.d.ts +11 -0
- package/dist/utils/pagination/charLimit.d.ts +3 -0
- package/dist/utils/pagination/core.d.ts +15 -0
- package/dist/utils/pagination/hints.d.ts +3 -0
- package/dist/utils/pagination/outputSizeLimit.d.ts +16 -0
- package/dist/utils/pagination/types.d.ts +43 -0
- package/dist/utils/parsers/diff.d.ts +2 -0
- package/dist/utils/parsers/ripgrep.d.ts +11 -0
- package/dist/utils/parsers/schemas.d.ts +72 -0
- package/dist/utils/response/bulk.d.ts +5 -0
- package/dist/utils/response/callToolResult.d.ts +3 -0
- package/dist/utils/response/charSavings.d.ts +3 -0
- package/dist/utils/response/error.d.ts +20 -0
- package/dist/utils/response/groupedFinalizer.d.ts +37 -0
- package/dist/utils/response/pathRelativize.d.ts +9 -0
- package/dist/utils/response/structuredPagination.d.ts +9 -0
- package/dist/zod.d.ts +1 -0
- package/dist/zod.js +8 -0
- package/package.json +66 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const NpmSearchQueryLocalSchema: z.ZodObject<{
|
|
3
|
+
packageName: z.ZodString;
|
|
4
|
+
page: z.ZodDefault<z.ZodNumber>;
|
|
5
|
+
id: z.ZodOptional<z.ZodString>;
|
|
6
|
+
mainResearchGoal: z.ZodOptional<z.ZodString>;
|
|
7
|
+
researchGoal: z.ZodOptional<z.ZodString>;
|
|
8
|
+
reasoning: z.ZodOptional<z.ZodString>;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
export declare const NpmSearchBulkQueryLocalSchema: z.ZodObject<{
|
|
11
|
+
responseCharOffset: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>>;
|
|
12
|
+
responseCharLength: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>>;
|
|
13
|
+
queries: z.ZodArray<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
export declare const NpmSearchOutputLocalSchema: z.ZodObject<{
|
|
16
|
+
results: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
17
|
+
id: z.ZodString;
|
|
18
|
+
data: z.ZodOptional<z.ZodObject<{
|
|
19
|
+
packages: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
20
|
+
name: z.ZodString;
|
|
21
|
+
version: z.ZodOptional<z.ZodString>;
|
|
22
|
+
description: z.ZodOptional<z.ZodString>;
|
|
23
|
+
license: z.ZodOptional<z.ZodString>;
|
|
24
|
+
weeklyDownloads: z.ZodOptional<z.ZodNumber>;
|
|
25
|
+
repository: z.ZodOptional<z.ZodString>;
|
|
26
|
+
repositoryDirectory: z.ZodOptional<z.ZodString>;
|
|
27
|
+
}, z.core.$loose>>>;
|
|
28
|
+
pagination: z.ZodOptional<z.ZodObject<{
|
|
29
|
+
currentPage: z.ZodNumber;
|
|
30
|
+
totalPages: z.ZodNumber;
|
|
31
|
+
perPage: z.ZodNumber;
|
|
32
|
+
totalFound: z.ZodNumber;
|
|
33
|
+
returned: z.ZodNumber;
|
|
34
|
+
hasMore: z.ZodBoolean;
|
|
35
|
+
}, z.core.$strip>>;
|
|
36
|
+
}, z.core.$loose>>;
|
|
37
|
+
status: z.ZodOptional<z.ZodString>;
|
|
38
|
+
}, z.core.$loose>>>;
|
|
39
|
+
readonly hints: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
40
|
+
readonly base: z.ZodOptional<z.ZodString>;
|
|
41
|
+
readonly shared: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
42
|
+
readonly responsePagination: z.ZodOptional<z.ZodObject<{
|
|
43
|
+
currentPage: z.ZodNumber;
|
|
44
|
+
totalPages: z.ZodNumber;
|
|
45
|
+
hasMore: z.ZodBoolean;
|
|
46
|
+
charOffset: z.ZodNumber;
|
|
47
|
+
charLength: z.ZodNumber;
|
|
48
|
+
totalChars: z.ZodNumber;
|
|
49
|
+
nextCharOffset: z.ZodOptional<z.ZodNumber>;
|
|
50
|
+
}, z.core.$strip>>;
|
|
51
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { AuthInfo } from '@modelcontextprotocol/sdk/server/auth/types.js';
|
|
2
|
+
import type { ProcessedBulkResult } from '../types/toolResults.js';
|
|
3
|
+
import { type ICodeHostProvider, type ProviderCapabilities, type ProviderResponse, type ProviderType } from '../providers/types.js';
|
|
4
|
+
interface ProviderExecutionContext {
|
|
5
|
+
providerType: ProviderType;
|
|
6
|
+
provider: ICodeHostProvider;
|
|
7
|
+
capabilities: ProviderCapabilities;
|
|
8
|
+
baseUrl?: string;
|
|
9
|
+
token?: string;
|
|
10
|
+
authInfo?: AuthInfo;
|
|
11
|
+
}
|
|
12
|
+
export declare class ProviderInitializationError extends Error {
|
|
13
|
+
readonly providerType: ProviderType;
|
|
14
|
+
constructor(providerType: ProviderType, message: string);
|
|
15
|
+
}
|
|
16
|
+
interface ProviderOperationSpec<TMeta, TData> {
|
|
17
|
+
meta: TMeta;
|
|
18
|
+
operation: () => Promise<ProviderResponse<TData>>;
|
|
19
|
+
}
|
|
20
|
+
interface ProviderOperationSuccess<TMeta, TData> {
|
|
21
|
+
meta: TMeta;
|
|
22
|
+
response: ProviderResponse<TData> & {
|
|
23
|
+
data: TData;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
interface ProviderOperationFailure<TMeta, TData> {
|
|
27
|
+
meta: TMeta;
|
|
28
|
+
response: ProviderResponse<TData>;
|
|
29
|
+
}
|
|
30
|
+
export type ProviderOperationResult<TMeta, TData> = ProviderOperationSuccess<TMeta, TData> | ProviderOperationFailure<TMeta, TData>;
|
|
31
|
+
export declare function createProviderExecutionContext(authInfo?: AuthInfo): ProviderExecutionContext;
|
|
32
|
+
export declare function createLazyProviderContext(authInfo?: AuthInfo): () => ProviderExecutionContext;
|
|
33
|
+
export declare function providerSupports(context: Pick<ProviderExecutionContext, 'capabilities'>, capability: keyof ProviderCapabilities): boolean;
|
|
34
|
+
export declare function executeProviderOperation<TQuery extends {
|
|
35
|
+
mainResearchGoal?: string;
|
|
36
|
+
researchGoal?: string;
|
|
37
|
+
reasoning?: string;
|
|
38
|
+
}, TData>(query: TQuery, operation: () => Promise<ProviderResponse<TData>>): Promise<{
|
|
39
|
+
ok: true;
|
|
40
|
+
response: ProviderResponse<TData> & {
|
|
41
|
+
data: TData;
|
|
42
|
+
};
|
|
43
|
+
} | {
|
|
44
|
+
ok: false;
|
|
45
|
+
result: ProcessedBulkResult;
|
|
46
|
+
}>;
|
|
47
|
+
export declare function executeProviderOperations<TMeta, TData>(operations: Array<ProviderOperationSpec<TMeta, TData>>, providerType?: ProviderType): Promise<{
|
|
48
|
+
successes: Array<ProviderOperationSuccess<TMeta, TData>>;
|
|
49
|
+
failures: Array<ProviderOperationFailure<TMeta, TData>>;
|
|
50
|
+
}>;
|
|
51
|
+
export {};
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
import type { CodeSearchResult, FileContentResult as ProviderFileContentResult, PullRequestSearchResult as ProviderPullRequestSearchResult, RepoSearchResult as ProviderRepoSearchResult, RepoStructureResult as ProviderRepoStructureResult } from '../providers/types.js';
|
|
2
|
+
import type { z } from 'zod';
|
|
3
|
+
import type { GitHubCodeSearchQuerySchema, GitHubReposSearchSingleQuerySchema, GitHubViewRepoStructureQuerySchema } from '@octocodeai/octocode-core/schemas';
|
|
4
|
+
import type { GitHubPullRequestSearchQueryLocalSchema } from './github_search_pull_requests/scheme.js';
|
|
5
|
+
import type { GitHubRepositoryOutput } from '@octocodeai/octocode-core/extra-types';
|
|
6
|
+
import type { WithOptionalMeta } from '../types/execution.js';
|
|
7
|
+
import { FileContentQueryLocalSchema } from './github_fetch_content/scheme.js';
|
|
8
|
+
type GitHubCodeSearchQuery = z.infer<typeof GitHubCodeSearchQuerySchema>;
|
|
9
|
+
type LocalFileContentQuery = z.infer<typeof FileContentQueryLocalSchema> & {
|
|
10
|
+
minify: import('../scheme/fields.js').MinifyMode;
|
|
11
|
+
};
|
|
12
|
+
type GitHubPullRequestSearchQuery = z.infer<typeof GitHubPullRequestSearchQueryLocalSchema>;
|
|
13
|
+
type GitHubReposSearchSingleQuery = z.infer<typeof GitHubReposSearchSingleQuerySchema>;
|
|
14
|
+
type GitHubViewRepoStructureQuery = z.infer<typeof GitHubViewRepoStructureQuerySchema>;
|
|
15
|
+
type PRDefaultKeys = 'order' | 'limit' | 'page';
|
|
16
|
+
type PartialPRQuery = WithOptionalMeta<Omit<GitHubPullRequestSearchQuery, PRDefaultKeys> & Partial<Pick<GitHubPullRequestSearchQuery, PRDefaultKeys>>>;
|
|
17
|
+
type PartialRepoStructureQuery = WithOptionalMeta<GitHubViewRepoStructureQuery>;
|
|
18
|
+
export declare function buildPaginationHints(pagination: {
|
|
19
|
+
currentPage: number;
|
|
20
|
+
totalPages: number;
|
|
21
|
+
hasMore: boolean;
|
|
22
|
+
entriesPerPage?: number;
|
|
23
|
+
perPage?: number;
|
|
24
|
+
totalMatches?: number;
|
|
25
|
+
reportedTotalMatches?: number;
|
|
26
|
+
reachableTotalMatches?: number;
|
|
27
|
+
totalMatchesKind?: 'exact' | 'reported' | 'lowerBound';
|
|
28
|
+
totalMatchesCapped?: boolean;
|
|
29
|
+
}, label: string): string[];
|
|
30
|
+
export declare function mapCodeSearchToolQuery(query: WithOptionalMeta<GitHubCodeSearchQuery>): {
|
|
31
|
+
keywords: string[];
|
|
32
|
+
projectId: string;
|
|
33
|
+
owner: string;
|
|
34
|
+
path: string;
|
|
35
|
+
filename: string;
|
|
36
|
+
extension: string;
|
|
37
|
+
language: string | undefined;
|
|
38
|
+
match: "path" | "file";
|
|
39
|
+
limit: number | undefined;
|
|
40
|
+
page: number;
|
|
41
|
+
mainResearchGoal: string;
|
|
42
|
+
researchGoal: string;
|
|
43
|
+
reasoning: string;
|
|
44
|
+
};
|
|
45
|
+
export interface CodeSearchGroupedMatch {
|
|
46
|
+
path: string;
|
|
47
|
+
value?: string;
|
|
48
|
+
pathOnly?: boolean;
|
|
49
|
+
matchIndices?: Array<{
|
|
50
|
+
start: number;
|
|
51
|
+
end: number;
|
|
52
|
+
lineOffset: number;
|
|
53
|
+
}>;
|
|
54
|
+
url?: string;
|
|
55
|
+
}
|
|
56
|
+
export interface CodeSearchGroupedResult {
|
|
57
|
+
id: string;
|
|
58
|
+
queryId?: string;
|
|
59
|
+
owner: string;
|
|
60
|
+
repo: string;
|
|
61
|
+
matches: CodeSearchGroupedMatch[];
|
|
62
|
+
}
|
|
63
|
+
export interface CodeSearchPagination {
|
|
64
|
+
currentPage: number;
|
|
65
|
+
totalPages: number;
|
|
66
|
+
perPage: number;
|
|
67
|
+
totalMatches: number;
|
|
68
|
+
reportedTotalMatches?: number;
|
|
69
|
+
reachableTotalMatches?: number;
|
|
70
|
+
totalMatchesKind?: 'exact' | 'reported' | 'lowerBound';
|
|
71
|
+
totalMatchesCapped?: boolean;
|
|
72
|
+
hasMore: boolean;
|
|
73
|
+
uniqueFileCount?: number;
|
|
74
|
+
}
|
|
75
|
+
export interface CodeSearchFlatResult {
|
|
76
|
+
results: CodeSearchGroupedResult[];
|
|
77
|
+
pagination?: CodeSearchPagination;
|
|
78
|
+
nonExistentScope?: boolean;
|
|
79
|
+
}
|
|
80
|
+
export declare function mapCodeSearchProviderResult(data: CodeSearchResult, query: WithOptionalMeta<GitHubCodeSearchQuery>): CodeSearchFlatResult;
|
|
81
|
+
export declare function mapRepoSearchToolQuery(query: WithOptionalMeta<GitHubReposSearchSingleQuery>): {
|
|
82
|
+
keywords: string[];
|
|
83
|
+
topics: string[];
|
|
84
|
+
owner: string;
|
|
85
|
+
stars: string;
|
|
86
|
+
size: string;
|
|
87
|
+
created: string;
|
|
88
|
+
updated: string;
|
|
89
|
+
language: string;
|
|
90
|
+
archived: boolean | undefined;
|
|
91
|
+
visibility: "public" | "private" | undefined;
|
|
92
|
+
forks: string | undefined;
|
|
93
|
+
license: string | undefined;
|
|
94
|
+
goodFirstIssues: string | undefined;
|
|
95
|
+
match: ("name" | "description" | "readme")[];
|
|
96
|
+
sort: "stars" | "forks" | "updated" | "created" | "best-match" | undefined;
|
|
97
|
+
limit: number | undefined;
|
|
98
|
+
page: number;
|
|
99
|
+
mainResearchGoal: string;
|
|
100
|
+
researchGoal: string;
|
|
101
|
+
reasoning: string;
|
|
102
|
+
};
|
|
103
|
+
export declare function mapRepoSearchProviderRepositories(repositories: ProviderRepoSearchResult['repositories']): GitHubRepositoryOutput[];
|
|
104
|
+
export declare function mapPullRequestToolQuery(query: PartialPRQuery): {
|
|
105
|
+
projectId: string;
|
|
106
|
+
owner: string;
|
|
107
|
+
query: string;
|
|
108
|
+
number: number;
|
|
109
|
+
state: "open" | "closed" | "merged" | "all" | undefined;
|
|
110
|
+
author: string;
|
|
111
|
+
assignee: string;
|
|
112
|
+
commenter: string;
|
|
113
|
+
involves: string;
|
|
114
|
+
mentions: string;
|
|
115
|
+
reviewRequested: string;
|
|
116
|
+
reviewedBy: string;
|
|
117
|
+
labels: string[];
|
|
118
|
+
noLabel: boolean;
|
|
119
|
+
noMilestone: boolean;
|
|
120
|
+
noProject: boolean;
|
|
121
|
+
noAssignee: boolean;
|
|
122
|
+
baseBranch: string;
|
|
123
|
+
headBranch: string;
|
|
124
|
+
created: string;
|
|
125
|
+
updated: string;
|
|
126
|
+
closed: string;
|
|
127
|
+
mergedAt: string;
|
|
128
|
+
comments: string;
|
|
129
|
+
reactions: string;
|
|
130
|
+
interactions: string;
|
|
131
|
+
draft: boolean;
|
|
132
|
+
match: ("comments" | "title" | "body")[];
|
|
133
|
+
archived: boolean | undefined;
|
|
134
|
+
content: unknown;
|
|
135
|
+
reviewMode: "summary" | "full";
|
|
136
|
+
filePage: number;
|
|
137
|
+
commentPage: number;
|
|
138
|
+
commitPage: number;
|
|
139
|
+
itemsPerPage: number;
|
|
140
|
+
sort: "created" | "updated" | "best-match" | "comments" | "reactions" | undefined;
|
|
141
|
+
order: "asc" | "desc" | undefined;
|
|
142
|
+
limit: number;
|
|
143
|
+
page: number;
|
|
144
|
+
charOffset: number;
|
|
145
|
+
charLength: number;
|
|
146
|
+
mainResearchGoal: string;
|
|
147
|
+
researchGoal: string;
|
|
148
|
+
reasoning: string;
|
|
149
|
+
};
|
|
150
|
+
export declare function mapPullRequestProviderResultData(data: ProviderPullRequestSearchResult, options?: {
|
|
151
|
+
includeFileChanges?: boolean;
|
|
152
|
+
}): {
|
|
153
|
+
pullRequests: {
|
|
154
|
+
sanitizationWarnings?: string[];
|
|
155
|
+
fileChanges?: {
|
|
156
|
+
path: string;
|
|
157
|
+
status: string;
|
|
158
|
+
additions: number;
|
|
159
|
+
deletions: number;
|
|
160
|
+
patch?: string;
|
|
161
|
+
}[];
|
|
162
|
+
reviewSummary: {
|
|
163
|
+
totalComments: number;
|
|
164
|
+
inlineComments: number;
|
|
165
|
+
discussionComments: number;
|
|
166
|
+
commenters: string[];
|
|
167
|
+
latestCommentAt?: string;
|
|
168
|
+
themes: string[];
|
|
169
|
+
};
|
|
170
|
+
commits: {
|
|
171
|
+
sha: string;
|
|
172
|
+
message: string;
|
|
173
|
+
author: string;
|
|
174
|
+
date: string;
|
|
175
|
+
}[];
|
|
176
|
+
reviews: {
|
|
177
|
+
id: string;
|
|
178
|
+
user: string;
|
|
179
|
+
state: string;
|
|
180
|
+
body: string;
|
|
181
|
+
submittedAt?: string;
|
|
182
|
+
commitId?: string;
|
|
183
|
+
}[];
|
|
184
|
+
comments: {
|
|
185
|
+
bodyPagination: {
|
|
186
|
+
charOffset: number;
|
|
187
|
+
charLength: number;
|
|
188
|
+
totalChars: number;
|
|
189
|
+
hasMore: boolean;
|
|
190
|
+
nextCharOffset?: number;
|
|
191
|
+
};
|
|
192
|
+
id: string;
|
|
193
|
+
author: string;
|
|
194
|
+
body: string;
|
|
195
|
+
createdAt: string;
|
|
196
|
+
updatedAt: string;
|
|
197
|
+
commentType?: "discussion" | "review_inline";
|
|
198
|
+
path?: string;
|
|
199
|
+
line?: number;
|
|
200
|
+
in_reply_to_id?: number;
|
|
201
|
+
}[];
|
|
202
|
+
url: string;
|
|
203
|
+
state: "closed" | "open" | "merged";
|
|
204
|
+
draft: boolean;
|
|
205
|
+
author: string;
|
|
206
|
+
assignees: string[];
|
|
207
|
+
labels: string[];
|
|
208
|
+
sourceBranch: string;
|
|
209
|
+
targetBranch: string;
|
|
210
|
+
sourceSha: string;
|
|
211
|
+
targetSha: string;
|
|
212
|
+
createdAt: string;
|
|
213
|
+
updatedAt: string;
|
|
214
|
+
closedAt: string;
|
|
215
|
+
mergedAt: string;
|
|
216
|
+
commentsCount: number;
|
|
217
|
+
changedFilesCount: number;
|
|
218
|
+
additions: number;
|
|
219
|
+
deletions: number;
|
|
220
|
+
bodyPagination: {
|
|
221
|
+
charOffset: number;
|
|
222
|
+
charLength: number;
|
|
223
|
+
totalChars: number;
|
|
224
|
+
hasMore: boolean;
|
|
225
|
+
nextCharOffset?: number;
|
|
226
|
+
};
|
|
227
|
+
number: number;
|
|
228
|
+
title: string;
|
|
229
|
+
body: string;
|
|
230
|
+
}[];
|
|
231
|
+
resultData: Record<string, unknown>;
|
|
232
|
+
pagination: {
|
|
233
|
+
hasMore: boolean;
|
|
234
|
+
uniqueFileCount?: number;
|
|
235
|
+
totalMatchesCapped?: boolean;
|
|
236
|
+
totalMatchesKind?: "exact" | "reported" | "lowerBound";
|
|
237
|
+
reachableTotalMatches?: number;
|
|
238
|
+
reportedTotalMatches?: number;
|
|
239
|
+
totalMatches?: number;
|
|
240
|
+
currentPage: number;
|
|
241
|
+
totalPages: number;
|
|
242
|
+
perPage: number;
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
export declare function mapFileContentToolQuery(query: LocalFileContentQuery): {
|
|
246
|
+
projectId: string;
|
|
247
|
+
path: string;
|
|
248
|
+
ref: string;
|
|
249
|
+
startLine: number;
|
|
250
|
+
endLine: number;
|
|
251
|
+
matchString: string;
|
|
252
|
+
contextLines: number;
|
|
253
|
+
fullContent: boolean;
|
|
254
|
+
charOffset: number;
|
|
255
|
+
charLength: number;
|
|
256
|
+
minify: "none" | "standard" | "symbols";
|
|
257
|
+
matchStringIsRegex: boolean;
|
|
258
|
+
matchStringCaseSensitive: boolean;
|
|
259
|
+
mainResearchGoal: string;
|
|
260
|
+
researchGoal: string;
|
|
261
|
+
reasoning: string;
|
|
262
|
+
};
|
|
263
|
+
export declare function mapFileContentProviderResult(data: ProviderFileContentResult, query: WithOptionalMeta<LocalFileContentQuery>): Record<string, unknown>;
|
|
264
|
+
export declare function mapRepoStructureToolQuery(query: PartialRepoStructureQuery, resolvedBranch: string): {
|
|
265
|
+
projectId: string;
|
|
266
|
+
ref: string;
|
|
267
|
+
path: string;
|
|
268
|
+
depth: number;
|
|
269
|
+
itemsPerPage: number;
|
|
270
|
+
page: number;
|
|
271
|
+
includeSizes: boolean;
|
|
272
|
+
mainResearchGoal: string;
|
|
273
|
+
researchGoal: string;
|
|
274
|
+
reasoning: string;
|
|
275
|
+
};
|
|
276
|
+
export declare function mapRepoStructureProviderResult(data: ProviderRepoStructureResult, _query: PartialRepoStructureQuery, filteredStructure: ProviderRepoStructureResult['structure'], resolvedBranch: string): Record<string, unknown>;
|
|
277
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
+
import { type z } from 'zod';
|
|
3
|
+
import { DEFAULT_TOOL_METADATA_GATEWAY, type ToolMetadataGateway } from './toolMetadata/gateway.js';
|
|
4
|
+
export type { ToolMetadataGateway };
|
|
5
|
+
export { DEFAULT_TOOL_METADATA_GATEWAY };
|
|
6
|
+
export type { ToolInvocationCallback } from '../types/toolResults.js';
|
|
7
|
+
export type ToolDirectSecurity = 'basic' | 'remote';
|
|
8
|
+
export interface ToolDirectExecutionConfig {
|
|
9
|
+
schema: z.ZodType;
|
|
10
|
+
inputSchema: z.ZodType;
|
|
11
|
+
executionFn: (input: never) => Promise<CallToolResult>;
|
|
12
|
+
security: ToolDirectSecurity;
|
|
13
|
+
requiresServerRuntime?: boolean;
|
|
14
|
+
requiresProviders?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface ToolConfig {
|
|
17
|
+
name: string;
|
|
18
|
+
description: string;
|
|
19
|
+
isDefault: boolean;
|
|
20
|
+
isLocal: boolean;
|
|
21
|
+
isClone?: boolean;
|
|
22
|
+
isBinary?: boolean;
|
|
23
|
+
type: 'search' | 'content' | 'history' | 'debug';
|
|
24
|
+
skipMetadataCheck?: boolean;
|
|
25
|
+
direct: ToolDirectExecutionConfig;
|
|
26
|
+
}
|
|
27
|
+
export declare const getDescription: (toolName: string, gateway?: Pick<ToolMetadataGateway, "getDescription">) => string;
|
|
28
|
+
export declare const GITHUB_SEARCH_CODE: ToolConfig;
|
|
29
|
+
export declare const GITHUB_FETCH_CONTENT: ToolConfig;
|
|
30
|
+
export declare const GITHUB_VIEW_REPO_STRUCTURE: ToolConfig;
|
|
31
|
+
export declare const GITHUB_SEARCH_REPOSITORIES: ToolConfig;
|
|
32
|
+
export declare const GITHUB_SEARCH_PULL_REQUESTS: ToolConfig;
|
|
33
|
+
export declare const PACKAGE_SEARCH: ToolConfig;
|
|
34
|
+
export declare const GITHUB_CLONE_REPO: ToolConfig;
|
|
35
|
+
export declare const LOCAL_RIPGREP: ToolConfig;
|
|
36
|
+
export declare const LOCAL_VIEW_STRUCTURE: ToolConfig;
|
|
37
|
+
export declare const LOCAL_FIND_FILES: ToolConfig;
|
|
38
|
+
export declare const LOCAL_FETCH_CONTENT: ToolConfig;
|
|
39
|
+
export declare const LSP_GET_SEMANTIC_CONTENT: ToolConfig;
|
|
40
|
+
export declare const LOCAL_BINARY_INSPECT: ToolConfig;
|
|
41
|
+
export declare const ALL_TOOLS: ToolConfig[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DESCRIPTIONS: Record<string, string>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ToolNames } from '@octocodeai/octocode-core/types';
|
|
2
|
+
export interface ToolMetadataGateway {
|
|
3
|
+
hasTool(toolName: string): boolean;
|
|
4
|
+
getDescription(toolName: string): string;
|
|
5
|
+
getToolName<TKey extends keyof ToolNames>(key: TKey): ToolNames[TKey];
|
|
6
|
+
}
|
|
7
|
+
export declare const DEFAULT_TOOL_METADATA_GATEWAY: ToolMetadataGateway;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isToolInMetadata(toolName: string): boolean;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { TOOL_NAMES } from './names.js';
|
|
2
|
+
export { DESCRIPTIONS } from './descriptions.js';
|
|
3
|
+
export { isToolInMetadata } from './metadataPresence.js';
|
|
4
|
+
export { BASE_SCHEMA } from './baseSchema.js';
|
|
5
|
+
type HintsMap = Record<string, readonly string[]>;
|
|
6
|
+
export declare const TOOL_HINTS: Record<string, HintsMap>;
|
|
7
|
+
export declare const GENERIC_ERROR_HINTS: readonly string[];
|
|
8
|
+
export declare function getToolHintsSync(toolName: string, status: string): readonly string[];
|
|
9
|
+
export declare function getDynamicHints(toolName: string, key: string): readonly string[];
|
|
10
|
+
export declare function getGenericErrorHintsSync(): readonly string[];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { CompleteMetadata } from '@octocodeai/octocode-core/types';
|
|
2
|
+
export declare function loadToolContent(): Promise<CompleteMetadata>;
|
|
3
|
+
export declare function initializeToolMetadata(): Promise<void>;
|
|
4
|
+
export declare function getMetadataOrNull(): CompleteMetadata | null;
|
|
5
|
+
export declare function _resetMetadataState(): void;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ToolErrorResult, ToolSuccessResult, ToolInvocationCallback } from '../types/toolResults.js';
|
|
2
|
+
import type { HintContext } from '../types/metadata.js';
|
|
3
|
+
import type { ProviderResponse } from '../providers/types.js';
|
|
4
|
+
import { createErrorResult } from '../utils/response/error.js';
|
|
5
|
+
export { createErrorResult };
|
|
6
|
+
export declare function invokeCallbackSafely(callback: ToolInvocationCallback | undefined, toolName: string, queries: unknown[]): Promise<void>;
|
|
7
|
+
interface SuccessResultOptions {
|
|
8
|
+
hintContext?: HintContext;
|
|
9
|
+
prefixHints?: string[];
|
|
10
|
+
extraHints?: string[];
|
|
11
|
+
rawResponse?: unknown;
|
|
12
|
+
}
|
|
13
|
+
export declare function createSuccessResult<T extends object>(_query: {
|
|
14
|
+
mainResearchGoal?: string;
|
|
15
|
+
researchGoal?: string;
|
|
16
|
+
reasoning?: string;
|
|
17
|
+
}, data: T, hasContent: boolean, toolName: string, options?: SuccessResultOptions): ToolSuccessResult & T;
|
|
18
|
+
export declare function handleProviderError(apiResult: ProviderResponse<unknown>, query: {
|
|
19
|
+
mainResearchGoal?: string;
|
|
20
|
+
researchGoal?: string;
|
|
21
|
+
reasoning?: string;
|
|
22
|
+
}): ToolErrorResult;
|
|
23
|
+
export declare function handleCatchError(error: unknown, query: {
|
|
24
|
+
mainResearchGoal?: string;
|
|
25
|
+
researchGoal?: string;
|
|
26
|
+
reasoning?: string;
|
|
27
|
+
}, contextMessage?: string, toolName?: string): ToolErrorResult;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { FlatQueryResult } from './toolResults.js';
|
|
2
|
+
export interface BulkFinalizerInput<TQuery, TOutput extends Record<string, unknown> = Record<string, unknown>> {
|
|
3
|
+
queries: TQuery[];
|
|
4
|
+
results: FlatQueryResult[];
|
|
5
|
+
config: BulkResponseConfig<TQuery, TOutput>;
|
|
6
|
+
}
|
|
7
|
+
export interface BulkFinalizerOutput<TOutput extends Record<string, unknown> = Record<string, unknown>> {
|
|
8
|
+
structuredContent: TOutput;
|
|
9
|
+
text: string;
|
|
10
|
+
isError?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export type BulkFinalizer<TQuery, TOutput extends Record<string, unknown> = Record<string, unknown>> = (input: BulkFinalizerInput<TQuery, TOutput>) => BulkFinalizerOutput<TOutput>;
|
|
13
|
+
export interface BulkResponsePagination {
|
|
14
|
+
responseCharOffset?: number;
|
|
15
|
+
responseCharLength?: number;
|
|
16
|
+
}
|
|
17
|
+
export interface ResponsePaginationInfo {
|
|
18
|
+
currentPage: number;
|
|
19
|
+
totalPages: number;
|
|
20
|
+
hasMore: boolean;
|
|
21
|
+
charOffset: number;
|
|
22
|
+
charLength: number;
|
|
23
|
+
totalChars: number;
|
|
24
|
+
nextCharOffset?: number;
|
|
25
|
+
}
|
|
26
|
+
export interface BulkResponseConfig<TQuery = object, TOutput extends Record<string, unknown> = Record<string, unknown>> {
|
|
27
|
+
toolName: string;
|
|
28
|
+
keysPriority?: string[];
|
|
29
|
+
peerHints?: boolean;
|
|
30
|
+
concurrency?: number;
|
|
31
|
+
minQueryTimeoutMs?: number;
|
|
32
|
+
responsePagination?: BulkResponsePagination;
|
|
33
|
+
finalize?: BulkFinalizer<TQuery, TOutput>;
|
|
34
|
+
}
|
|
35
|
+
export interface BulkToolResponse {
|
|
36
|
+
results: FlatQueryResult[];
|
|
37
|
+
hints?: string[];
|
|
38
|
+
base?: string;
|
|
39
|
+
shared?: Record<string, string | number | boolean>;
|
|
40
|
+
responsePagination?: ResponsePaginationInfo;
|
|
41
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { AuthInfo } from '@modelcontextprotocol/sdk/server/auth/types.js';
|
|
2
|
+
import type { HintContext } from './metadata.js';
|
|
3
|
+
export type WithOptionalMeta<T> = Partial<T>;
|
|
4
|
+
export interface ToolExecutionArgs<TQuery> {
|
|
5
|
+
queries: TQuery[];
|
|
6
|
+
responseCharOffset?: number;
|
|
7
|
+
responseCharLength?: number;
|
|
8
|
+
authInfo?: AuthInfo;
|
|
9
|
+
sessionId?: string;
|
|
10
|
+
hintContext?: HintContext;
|
|
11
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
export type HintStatus = 'empty' | 'error';
|
|
2
|
+
export interface HintContext {
|
|
3
|
+
fileSize?: number;
|
|
4
|
+
resultSize?: number;
|
|
5
|
+
tokenEstimate?: number;
|
|
6
|
+
entryCount?: number;
|
|
7
|
+
matchCount?: number;
|
|
8
|
+
fileCount?: number;
|
|
9
|
+
isLarge?: boolean;
|
|
10
|
+
errorType?: 'size_limit' | 'not_found' | 'directory' | 'permission' | 'pattern_too_broad' | 'symbol_not_found' | 'file_not_found' | 'timeout' | 'not_a_function' | 'rate_limit' | 'lsp_unavailable';
|
|
11
|
+
originalError?: string;
|
|
12
|
+
status?: number;
|
|
13
|
+
isRateLimited?: boolean;
|
|
14
|
+
retryAfter?: number;
|
|
15
|
+
rateLimitRemaining?: number;
|
|
16
|
+
hasPattern?: boolean;
|
|
17
|
+
hasPagination?: boolean;
|
|
18
|
+
path?: string;
|
|
19
|
+
hasOwnerRepo?: boolean;
|
|
20
|
+
match?: 'file' | 'path';
|
|
21
|
+
searchEngine?: 'rg' | 'grep';
|
|
22
|
+
wasFilteredToEmpty?: boolean;
|
|
23
|
+
hasConfigFiles?: boolean;
|
|
24
|
+
owner?: string;
|
|
25
|
+
repo?: string;
|
|
26
|
+
branch?: string;
|
|
27
|
+
extension?: string;
|
|
28
|
+
filename?: string;
|
|
29
|
+
keywords?: string[];
|
|
30
|
+
state?: string;
|
|
31
|
+
author?: string;
|
|
32
|
+
query?: string;
|
|
33
|
+
prNumber?: number;
|
|
34
|
+
locationCount?: number;
|
|
35
|
+
hasExternalPackage?: boolean;
|
|
36
|
+
isFallback?: boolean;
|
|
37
|
+
searchRadius?: number;
|
|
38
|
+
lineHint?: number;
|
|
39
|
+
symbolName?: string;
|
|
40
|
+
uri?: string;
|
|
41
|
+
hasMultipleFiles?: boolean;
|
|
42
|
+
hasMorePages?: boolean;
|
|
43
|
+
currentPage?: number;
|
|
44
|
+
totalPages?: number;
|
|
45
|
+
direction?: 'incoming' | 'outgoing';
|
|
46
|
+
callCount?: number;
|
|
47
|
+
depth?: number;
|
|
48
|
+
hasMoreContent?: boolean;
|
|
49
|
+
isPartial?: boolean;
|
|
50
|
+
endLine?: number;
|
|
51
|
+
totalLines?: number;
|
|
52
|
+
nextCharOffset?: number;
|
|
53
|
+
totalChars?: number;
|
|
54
|
+
filteredAll?: boolean;
|
|
55
|
+
matchedPaths?: string[];
|
|
56
|
+
totalMatches?: number;
|
|
57
|
+
hasMore?: boolean;
|
|
58
|
+
flagFiles?: string[];
|
|
59
|
+
language?: string;
|
|
60
|
+
topic?: string;
|
|
61
|
+
prMatch?: string[];
|
|
62
|
+
type?: string;
|
|
63
|
+
}
|
|
64
|
+
type HintGenerator = (context: HintContext) => (string | undefined)[];
|
|
65
|
+
export interface ToolHintGenerators {
|
|
66
|
+
empty: HintGenerator;
|
|
67
|
+
error: HintGenerator;
|
|
68
|
+
}
|
|
69
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface PromiseResult<T> {
|
|
2
|
+
success: boolean;
|
|
3
|
+
data?: T;
|
|
4
|
+
error?: Error;
|
|
5
|
+
index: number;
|
|
6
|
+
}
|
|
7
|
+
export interface PromiseExecutionOptions {
|
|
8
|
+
timeout?: number;
|
|
9
|
+
continueOnError?: boolean;
|
|
10
|
+
concurrency?: number;
|
|
11
|
+
onError?: (error: Error, index: number) => void;
|
|
12
|
+
}
|