@octocodeai/octocode-tools-core 18.2.0 → 19.1.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 +19 -19
- package/dist/chunks/direct/chunk-3AA4F3QO.js +10 -0
- package/dist/chunks/direct/chunk-43RVQWTG.js +8 -0
- package/dist/chunks/direct/chunk-7DYE654A.js +8 -0
- package/dist/chunks/direct/chunk-A4WMBDEC.js +8 -0
- package/dist/chunks/direct/chunk-AWZG43MA.js +8 -0
- package/dist/chunks/direct/chunk-BICVXQ5F.js +8 -0
- package/dist/chunks/direct/chunk-BMM5H6QF.js +11 -0
- package/dist/chunks/direct/chunk-C6HFNIDL.js +8 -0
- package/dist/chunks/direct/chunk-CBCZVCTZ.js +8 -0
- package/dist/chunks/direct/chunk-CBIKUVP6.js +11 -0
- package/dist/chunks/direct/chunk-CKB2ME2J.js +8 -0
- package/dist/chunks/direct/chunk-DBI23PBG.js +9 -0
- package/dist/chunks/direct/chunk-DBSQWRFS.js +9 -0
- package/dist/chunks/direct/chunk-DKGYPFGX.js +8 -0
- package/dist/chunks/direct/chunk-EOLHXX5I.js +8 -0
- package/dist/chunks/direct/chunk-IFPXDKUV.js +8 -0
- package/dist/chunks/direct/chunk-J3WYA3IJ.js +8 -0
- package/dist/chunks/direct/chunk-MCMOWPYL.js +8 -0
- package/dist/chunks/direct/chunk-MPTAIBY7.js +8 -0
- package/dist/chunks/direct/chunk-NQRDACK3.js +8 -0
- package/dist/chunks/direct/chunk-O5ETB2W5.js +8 -0
- package/dist/chunks/direct/chunk-OA6NU4KO.js +8 -0
- package/dist/chunks/direct/chunk-QKDE2HIF.js +10 -0
- package/dist/chunks/direct/chunk-RRSY2ZPX.js +13 -0
- package/dist/chunks/direct/chunk-UKQLRZEW.js +8 -0
- package/dist/chunks/direct/chunk-USZL65FN.js +8 -0
- package/dist/chunks/direct/chunk-WH6GL3J2.js +8 -0
- package/dist/chunks/direct/chunk-Y5OCKUQX.js +9 -0
- package/dist/chunks/direct/chunk-ZO44CZN5.js +8 -0
- package/dist/chunks/direct/chunk-ZSXRT7JL.js +12 -0
- package/dist/chunks/direct/chunk-ZUNPQVMO.js +8 -0
- package/dist/chunks/direct/execution-3T4B776P.js +9 -0
- package/dist/chunks/direct/execution-5BJNS7D7.js +8 -0
- package/dist/chunks/direct/execution-5O6QHKBR.js +8 -0
- package/dist/chunks/direct/execution-A4NK3BQO.js +8 -0
- package/dist/chunks/direct/execution-K4UOPXRQ.js +9 -0
- package/dist/chunks/direct/execution-SWWZOOA7.js +13 -0
- package/dist/chunks/direct/execution-X4MUJL4L.js +8 -0
- package/dist/chunks/direct/execution-XA6PXPRB.js +8 -0
- package/dist/chunks/direct/historyExecutions-6F3AA5PY.js +14 -0
- package/dist/direct.d.ts +6 -1
- package/dist/direct.js +2 -46
- package/dist/github/canonicalRepo.d.ts +2 -1
- package/dist/github/client.d.ts +3 -8
- package/dist/github/codeSearch/compactFragment.d.ts +7 -0
- package/dist/github/codeSearch.d.ts +2 -3
- package/dist/github/commit.d.ts +8 -0
- package/dist/github/commitDetail.d.ts +20 -0
- package/dist/github/commitSearch.d.ts +17 -0
- package/dist/github/compare.d.ts +15 -0
- package/dist/github/directoryFetch/cacheMetadata.d.ts +25 -0
- package/dist/github/directoryFetch/helpers.d.ts +1 -3
- package/dist/github/directoryFetch/snapshot.d.ts +10 -0
- package/dist/github/fileContentProcess.d.ts +0 -1
- package/dist/github/fileContentRaw/cache.d.ts +9 -0
- package/dist/github/fileContentRaw/fetch.d.ts +1 -1
- package/dist/github/githubAPI.d.ts +19 -2
- package/dist/github/history/commitFiles.d.ts +12 -0
- package/dist/github/issues/fetchers.d.ts +1 -1
- package/dist/github/issues/types.d.ts +3 -1
- package/dist/github/prContentFetcher/collectionPaging.d.ts +27 -0
- package/dist/github/prContentFetcher/comments.d.ts +7 -5
- package/dist/github/prContentFetcher/commits.d.ts +13 -14
- package/dist/github/prContentFetcher/flags.d.ts +0 -1
- package/dist/github/prContentFetcher/transform.d.ts +1 -1
- package/dist/github/prTransformation.d.ts +3 -1
- package/dist/github/queryBuilders/codeAndRepo.d.ts +2 -1
- package/dist/github/repoSearch.d.ts +2 -1
- package/dist/github/repoStructure/fetchOrchestration.d.ts +1 -1
- package/dist/github/repoStructurePagination.d.ts +1 -1
- package/dist/github/repoStructureTree.d.ts +4 -2
- package/dist/graph/advancedOperations.d.ts +2 -2
- package/dist/graph/buildFileGraph.d.ts +8 -13
- package/dist/graph/coverage.d.ts +6 -0
- package/dist/graph/diagnosticSnapshot.d.ts +10 -0
- package/dist/graph/fileImportLinker.d.ts +28 -0
- package/dist/graph/importResolver.d.ts +1 -1
- package/dist/graph/languageImportResolver.d.ts +5 -0
- package/dist/graph/metadataImports.d.ts +7 -0
- package/dist/graph/packageExportTargets.d.ts +11 -0
- package/dist/graph/rustCargoMetadata.d.ts +31 -0
- package/dist/graph/rustCargoProcess.d.ts +16 -0
- package/dist/graph/rustModules.d.ts +7 -0
- package/dist/graph/rustWorkspace.d.ts +5 -0
- package/dist/graph/types.d.ts +94 -3
- package/dist/graph/workspacePackageResolver.d.ts +7 -2
- package/dist/index.d.ts +46 -19
- package/dist/index.js +36 -45
- package/dist/providers/github/GitHubProvider.d.ts +3 -1
- package/dist/providers/github/githubContent.d.ts +3 -2
- package/dist/providers/github/githubPullRequests.d.ts +3 -2
- package/dist/providers/github/githubSearch.d.ts +6 -3
- package/dist/providers/github/githubStructure.d.ts +3 -2
- package/dist/providers/providerQueries.d.ts +4 -0
- package/dist/providers/providerResults.d.ts +29 -1
- package/dist/providers/types.d.ts +0 -2
- package/dist/schema.d.ts +9 -3
- package/dist/schema.js +4 -12
- package/dist/scheme/fields.d.ts +8 -8
- package/dist/scheme/pagination.d.ts +1 -0
- package/dist/serverConfig.d.ts +1 -1
- package/dist/shared/session/index.d.ts +1 -1
- package/dist/shared/session/index.js +1 -1
- package/dist/shared/session/storage.d.ts +0 -1
- package/dist/toolContract/descriptions.d.ts +6 -6
- package/dist/toolContract/input/resources/tools/ghSearch.d.ts +21 -20
- package/dist/toolContract/input/resources/tools/githubHistorySchema.d.ts +14 -6
- package/dist/toolContract/input/resources/tools/githubRepositoriesOperation.d.ts +3 -3
- package/dist/toolContract/input/resources/tools/githubTreeOperation.d.ts +4 -2
- package/dist/toolContract/input/resources/tools/historyCommitInput.d.ts +9 -0
- package/dist/toolContract/input/resources/tools/historyIssueInput.d.ts +4 -4
- package/dist/toolContract/input/resources/tools/historyPullRequestInput.d.ts +13 -5
- package/dist/toolContract/input/resources/tools/localAnalyzeGraph.d.ts +74 -32
- package/dist/toolContract/input/resources/tools/localFilesOperation.d.ts +2 -2
- package/dist/toolContract/input/resources/tools/localSearch.d.ts +44 -44
- package/dist/toolContract/input/resources/tools/localTextOperation.d.ts +1 -1
- package/dist/toolContract/input/resources/tools/localTreeOperation.d.ts +2 -2
- package/dist/toolContract/input/resources/tools/lspGetSemantics.d.ts +11 -2
- package/dist/toolContract/input/resources/tools/npmSearch.d.ts +2 -1
- package/dist/toolContract/metadata.d.ts +1 -1
- package/dist/toolContract/runtime.d.ts +1 -1
- package/dist/toolContract/types.d.ts +0 -1
- package/dist/tools/directToolCatalog/toolCatalogDefinitions.d.ts +2 -4
- package/dist/tools/directToolCatalog/toolInputPreparation.d.ts +2 -5
- package/dist/tools/directToolCatalog.exec.d.ts +10 -7
- package/dist/tools/github_clone_repo/cache.d.ts +0 -2
- package/dist/tools/github_clone_repo/cacheArtifacts.d.ts +3 -1
- package/dist/tools/github_clone_repo/cachePaths.d.ts +3 -2
- package/dist/tools/github_clone_repo/gitCheckout.d.ts +5 -0
- package/dist/tools/github_clone_repo/scheme.d.ts +3 -3
- package/dist/tools/github_clone_repo/types.d.ts +6 -1
- package/dist/tools/github_fetch_content/finalizer/types.d.ts +10 -2
- package/dist/tools/github_fetch_content/scheme.d.ts +3 -4
- package/dist/tools/github_fetch_content/types.d.ts +4 -3
- package/dist/tools/github_search/scheme.d.ts +24 -23
- package/dist/tools/github_search_code/execution.d.ts +1 -1
- package/dist/tools/github_search_code/finalizer/groups.d.ts +1 -1
- package/dist/tools/github_search_code/finalizer/ranking.d.ts +1 -1
- package/dist/tools/github_search_code/scheme.d.ts +3 -3
- package/dist/tools/github_search_pull_requests/contentResponse/commentsShaping.d.ts +4 -1
- package/dist/tools/github_search_pull_requests/contentResponse/contentView.d.ts +3 -0
- package/dist/tools/github_search_pull_requests/contentResponse/fileSurfaces.d.ts +30 -2
- package/dist/tools/github_search_pull_requests/contentResponse/nextCalls.d.ts +1 -7
- package/dist/tools/github_search_pull_requests/contentResponse/pagination.d.ts +14 -2
- package/dist/tools/github_search_pull_requests/historyContinuations.d.ts +1 -1
- package/dist/tools/github_search_pull_requests/historyDiffContinuations.d.ts +2 -0
- package/dist/tools/github_search_pull_requests/historySchemes.d.ts +23 -22
- package/dist/tools/github_search_pull_requests/scheme.d.ts +17 -9
- package/dist/tools/github_search_pull_requests/splitSchemes.d.ts +35 -26
- package/dist/tools/github_search_pull_requests/types.d.ts +5 -0
- package/dist/tools/github_search_repos/execution/pagination.d.ts +0 -17
- package/dist/tools/github_search_repos/execution/queryVariants.d.ts +1 -23
- package/dist/tools/github_search_repos/execution.d.ts +0 -1
- package/dist/tools/github_search_repos/scheme.d.ts +6 -6
- package/dist/tools/github_view_repo_structure/execution.d.ts +1 -1
- package/dist/tools/github_view_repo_structure/scheme.d.ts +6 -5
- package/dist/tools/local_analyze_graph/analysisTypes.d.ts +16 -3
- package/dist/tools/local_analyze_graph/analyzeGraph.d.ts +1 -1
- package/dist/tools/local_analyze_graph/completeness.d.ts +3 -0
- package/dist/tools/local_analyze_graph/deadCodeScan.d.ts +9 -5
- package/dist/tools/local_analyze_graph/rootInference.d.ts +2 -0
- package/dist/tools/local_analyze_graph/scheme.d.ts +13 -25
- package/dist/tools/local_fetch_content/fetchContent/pagination.d.ts +7 -0
- package/dist/tools/local_fetch_content/scheme.d.ts +3 -3
- package/dist/tools/local_find_files/findFiles.d.ts +1 -1
- package/dist/tools/local_find_files/scheme.d.ts +4 -4
- package/dist/tools/local_ripgrep/execution.d.ts +0 -1
- package/dist/tools/local_ripgrep/rankingProfile/rankingProfiles.d.ts +1 -2
- package/dist/tools/local_ripgrep/rankingProfile/rankingResults.d.ts +2 -2
- package/dist/tools/local_ripgrep/rankingProfile/rankingScoring.d.ts +1 -3
- package/dist/tools/local_ripgrep/ripgrepResultBuilder/buildResult.d.ts +0 -4
- package/dist/tools/local_ripgrep/ripgrepResultBuilder/searchNext.d.ts +1 -0
- package/dist/tools/local_ripgrep/scheme.d.ts +13 -5
- package/dist/tools/local_ripgrep/structuralCompleteness.d.ts +9 -0
- package/dist/tools/local_search/execution.d.ts +0 -1
- package/dist/tools/local_search/scheme.d.ts +47 -47
- package/dist/tools/local_view_structure/scheme.d.ts +5 -5
- package/dist/tools/lsp/semantic_content/scheme.d.ts +29 -7
- package/dist/tools/lsp/semantic_content/semanticAnchored.d.ts +2 -9
- package/dist/tools/lsp/semantic_content/semanticEnvelopes/callEnvelopes.d.ts +2 -2
- package/dist/tools/lsp/semantic_content/semanticEnvelopes/envelopeHelpers.d.ts +2 -1
- package/dist/tools/lsp/semantic_content/semanticEnvelopes/locationEnvelopes.d.ts +2 -3
- package/dist/tools/lsp/semantic_content/semanticFileOps/anchor.d.ts +0 -1
- package/dist/tools/lsp/semantic_content/semanticPresentation.d.ts +1 -0
- package/dist/tools/lsp/semantic_content/semanticSnapshot.d.ts +16 -0
- package/dist/tools/lsp/shared/callHierarchyTraversal.d.ts +2 -1
- package/dist/tools/lsp/shared/semanticTypes.d.ts +19 -10
- package/dist/tools/package_search/execution.d.ts +3 -4
- package/dist/tools/package_search/pagination.d.ts +1 -0
- package/dist/tools/package_search/scheme.d.ts +5 -4
- package/dist/tools/providerMappers/codeSearch.d.ts +2 -9
- package/dist/tools/providerMappers/fileContent.d.ts +1 -1
- package/dist/tools/providerMappers/pullRequests.d.ts +24 -4
- package/dist/tools/providerMappers/repoSearch.d.ts +4 -4
- package/dist/tools/providerMappers/repoStructure.d.ts +4 -3
- package/dist/tools/toolAvailability.d.ts +19 -0
- package/dist/tools/toolConfig.d.ts +1 -3
- package/dist/types/toolResults.d.ts +1 -0
- package/dist/utils/contextUtils.d.ts +1 -1
- package/dist/utils/core/types.d.ts +0 -2
- package/dist/utils/exec/npm.d.ts +2 -0
- package/dist/utils/file/byteOffset.d.ts +1 -1
- package/dist/utils/package/common.d.ts +0 -3
- package/dist/utils/package/npm/npmDeprecation.d.ts +1 -2
- package/dist/utils/package/npm/npmDetailsFetchers.d.ts +3 -15
- package/dist/utils/package/npm/npmMappers.d.ts +0 -4
- package/dist/utils/package/npm/npmRegistry.d.ts +9 -1
- package/dist/utils/package/npm/npmSearchStrategies.d.ts +2 -5
- package/dist/utils/package/types.d.ts +3 -0
- package/dist/utils/pagination/types.d.ts +1 -0
- package/dist/utils/response/callToolResult.d.ts +3 -1
- package/package.json +23 -19
- package/dist/errors/pathUtils.d.ts +0 -1
- package/dist/github/directoryFetch.d.ts +0 -3
- package/dist/github/fileContentRaw.d.ts +0 -2
- package/dist/github/issues.d.ts +0 -3
- package/dist/github/prContentFetcher.d.ts +0 -2
- package/dist/github/queryBuilders.d.ts +0 -4
- package/dist/github/repoStructure.d.ts +0 -1
- package/dist/shared/index.d.ts +0 -6
- package/dist/shared/languageSelectors.d.ts +0 -3
- package/dist/toolContract/schemas.d.ts +0 -31
- package/dist/tools/directToolCatalog.d.ts +0 -15
- package/dist/tools/directToolCatalog.meta.d.ts +0 -28
- package/dist/tools/github_search_code/finalizer.d.ts +0 -2
- package/dist/tools/github_search_repos/execution/ranking.d.ts +0 -4
- package/dist/tools/local_ripgrep/rankingProfile.d.ts +0 -35
- package/dist/tools/local_ripgrep/ripgrepResultBuilder.d.ts +0 -2
- package/dist/tools/lsp/semantic_content/index.d.ts +0 -3
- package/dist/tools/lsp/semantic_content/semanticEnvelopes.d.ts +0 -3
- package/dist/tools/lsp/semantic_content/semanticFileOps.d.ts +0 -8
- package/dist/tools/providerMappers.d.ts +0 -11
- package/dist/tools/toolMetadata/baseSchema.d.ts +0 -1
- package/dist/tools/toolMetadata/descriptions.d.ts +0 -1
- package/dist/tools/toolMetadata/proxies.d.ts +0 -4
- package/dist/tools/toolSchemaImports.d.ts +0 -16
- package/dist/utils/exec/spawn.d.ts +0 -2
- package/dist/utils/file/filters.d.ts +0 -2
- package/dist/utils/http/cache.d.ts +0 -5
- package/dist/utils/package/npm.d.ts +0 -2
- package/dist/utils/response/bulk.d.ts +0 -2
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { prepareMetadataImports } from './metadataImports.js';
|
|
2
|
+
import type { prepareRustResolver } from './rustWorkspace.js';
|
|
3
|
+
import type { WorkspacePackageExports } from './workspacePackageResolver.js';
|
|
4
|
+
import type { PackageExportMode } from './packageExportTargets.js';
|
|
5
|
+
import type { GraphCoverage, RawGraphFacts } from './types.js';
|
|
6
|
+
/** One coverage policy for every source import, reexport, and module load. */
|
|
7
|
+
export declare function createFileImportLinker(options: {
|
|
8
|
+
relativePath: string;
|
|
9
|
+
parsed: RawGraphFacts;
|
|
10
|
+
knownFiles: Set<string>;
|
|
11
|
+
getWorkspacePackageExports: () => WorkspacePackageExports;
|
|
12
|
+
metadata: ReturnType<typeof prepareMetadataImports>;
|
|
13
|
+
resolveRust: Awaited<ReturnType<typeof prepareRustResolver>>;
|
|
14
|
+
coverage: GraphCoverage;
|
|
15
|
+
}): {
|
|
16
|
+
extension: string;
|
|
17
|
+
javascript: boolean;
|
|
18
|
+
python: boolean;
|
|
19
|
+
cFamily: boolean;
|
|
20
|
+
auxiliaryTargets: Set<string>;
|
|
21
|
+
resolve: (specifier: string, line: number, options?: {
|
|
22
|
+
moduleDeclaration?: boolean;
|
|
23
|
+
resolutionHint?: string;
|
|
24
|
+
moduleScope?: string[];
|
|
25
|
+
importedName?: string;
|
|
26
|
+
exportMode?: PackageExportMode;
|
|
27
|
+
}) => string | null;
|
|
28
|
+
};
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* `knownFiles`, or `null` when it's external/bare or doesn't resolve within
|
|
4
4
|
* the scanned set (dangling import, or a target outside the scan scope).
|
|
5
5
|
*/
|
|
6
|
-
export declare function resolveImportSpecifier(specifier: string, importingFileRelativePath: string, knownFiles: ReadonlySet<string
|
|
6
|
+
export declare function resolveImportSpecifier(specifier: string, importingFileRelativePath: string, knownFiles: ReadonlySet<string>): string | null;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ImportResolution } from './types.js';
|
|
2
|
+
/** Resolve exact syntax paths only; build-system search paths remain unsupported. */
|
|
3
|
+
export declare function resolveCInclude(specifier: string, importer: string, hint: string | undefined, files: ReadonlySet<string>): ImportResolution;
|
|
4
|
+
/** The selected root is a candidate Python import root, not a sys.path claim. */
|
|
5
|
+
export declare function resolvePythonImport(specifier: string, importer: string, importedName: string | undefined, hint: string | undefined, files: ReadonlySet<string>): ImportResolution;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ImportResolution } from './types.js';
|
|
2
|
+
/** Only explicit package.json imports become leaves; never traverse their contents. */
|
|
3
|
+
export declare function prepareMetadataImports(root: string, knownFiles: Set<string>, excludeDirs: readonly string[], maxFiles: number): {
|
|
4
|
+
targets: Set<string>;
|
|
5
|
+
resolve: (specifier: string, importer: string) => ImportResolution | undefined;
|
|
6
|
+
truncated: () => boolean;
|
|
7
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Syntax contexts, independent of the host process's own module format. */
|
|
2
|
+
export type PackageExportMode = 'import' | 'require' | 'static' | 'types' | 'types-import' | 'types-require';
|
|
3
|
+
type Selection = {
|
|
4
|
+
kind: 'target';
|
|
5
|
+
target: string;
|
|
6
|
+
} | {
|
|
7
|
+
kind: 'unmatched' | 'blocked' | 'invalid' | 'unsupported';
|
|
8
|
+
};
|
|
9
|
+
/** Node export key order/pattern specificity, with explicit unknown-context gaps. */
|
|
10
|
+
export declare function selectPackageExport(exports: unknown, subpath: string, mode: PackageExportMode): Selection;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export interface RustCargoDependencyAlias {
|
|
2
|
+
alias: string;
|
|
3
|
+
packageName: string;
|
|
4
|
+
targetId?: string;
|
|
5
|
+
external: boolean;
|
|
6
|
+
conditional: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface RustCargoTarget {
|
|
9
|
+
id: string;
|
|
10
|
+
packageId: string;
|
|
11
|
+
packageName: string;
|
|
12
|
+
crateName: string;
|
|
13
|
+
kind: string[];
|
|
14
|
+
edition?: string;
|
|
15
|
+
srcPath: string;
|
|
16
|
+
dependencyAliases: RustCargoDependencyAlias[];
|
|
17
|
+
}
|
|
18
|
+
export interface RustCargoDiagnostic {
|
|
19
|
+
code: string;
|
|
20
|
+
message: string;
|
|
21
|
+
}
|
|
22
|
+
export interface RustCargoMetadataResult {
|
|
23
|
+
status: 'ok' | 'unsupported';
|
|
24
|
+
targets: RustCargoTarget[];
|
|
25
|
+
diagnostics: RustCargoDiagnostic[];
|
|
26
|
+
}
|
|
27
|
+
/** Called only by the explicit rustWorkspace:'cargo' graph mode. Never builds code. */
|
|
28
|
+
export declare function resolveRustCargoMetadata(input: {
|
|
29
|
+
root: string;
|
|
30
|
+
files: readonly string[];
|
|
31
|
+
}): Promise<RustCargoMetadataResult>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const TIMEOUT_MS = 5000;
|
|
2
|
+
export declare const MAX_BUFFER = 1048576;
|
|
3
|
+
export declare class MetadataFailure extends Error {
|
|
4
|
+
readonly code: string;
|
|
5
|
+
constructor(code: string, message: string);
|
|
6
|
+
}
|
|
7
|
+
export declare function within(root: string, path: string): boolean;
|
|
8
|
+
export declare function remaining(deadline: number): number;
|
|
9
|
+
export declare function command(file: string, args: string[], cwd: string, env: NodeJS.ProcessEnv, deadline: number): Promise<string>;
|
|
10
|
+
/** Use host PATH entries only; project rust-toolchain overrides never select the executable. */
|
|
11
|
+
export declare function hostCargo(root: string, deadline: number): Promise<{
|
|
12
|
+
executable: string;
|
|
13
|
+
env: NodeJS.ProcessEnv;
|
|
14
|
+
}>;
|
|
15
|
+
/** Probe only ancestors of known Rust files, stopping at the supplied scan root. */
|
|
16
|
+
export declare function manifests(root: string, files: readonly string[], deadline: number): Promise<string[]>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ImportResolution, RawGraphFacts } from './types.js';
|
|
2
|
+
export type RustDependencies = ReadonlyMap<string, ReadonlyMap<string, {
|
|
3
|
+
root?: string;
|
|
4
|
+
external: boolean;
|
|
5
|
+
}>>;
|
|
6
|
+
/** Build the logical module forest from declarations; physical neighbors are not modules. */
|
|
7
|
+
export declare function createRustModuleResolver(facts: ReadonlyMap<string, RawGraphFacts>, files: ReadonlySet<string>, roots: readonly string[], dependencies?: RustDependencies, editions?: ReadonlyMap<string, string>): (specifier: string, file: string, scope?: string[], moduleDeclaration?: boolean, line?: number) => ImportResolution;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { RawGraphFacts, GraphCoverage } from './types.js';
|
|
2
|
+
export declare function prepareRustResolver(rootAbsolutePath: string, knownFiles: ReadonlySet<string>, parsedEntries: Array<{
|
|
3
|
+
relativePath: string;
|
|
4
|
+
parsed: RawGraphFacts;
|
|
5
|
+
}>, rustWorkspace: 'syntax' | 'cargo', coverage: GraphCoverage): Promise<(specifier: string, file: string, scope?: string[], moduleDeclaration?: boolean, line?: number) => import("./types.js").ImportResolution>;
|
package/dist/graph/types.d.ts
CHANGED
|
@@ -1,17 +1,58 @@
|
|
|
1
|
+
export interface ImportResolution {
|
|
2
|
+
target: string | null;
|
|
3
|
+
status: 'resolved' | 'external' | 'unresolvedInternal' | 'unsupported';
|
|
4
|
+
additionalTargets?: string[];
|
|
5
|
+
/** Stable explanation for a bounded resolver's unavailable target or context. */
|
|
6
|
+
reason?: string;
|
|
7
|
+
}
|
|
1
8
|
export interface DeclarationFact {
|
|
9
|
+
/** Source occurrence identity; never a canonical cross-file symbol ID. */
|
|
2
10
|
id: string;
|
|
3
11
|
name: string;
|
|
4
12
|
kind: string;
|
|
5
13
|
line: number;
|
|
6
14
|
exported: boolean;
|
|
7
15
|
}
|
|
16
|
+
export interface GraphCoverage {
|
|
17
|
+
/** Public response pagination; graph construction retains the full diagnostic list. */
|
|
18
|
+
diagnosticsPagination?: {
|
|
19
|
+
currentPage: number;
|
|
20
|
+
totalPages: number;
|
|
21
|
+
entriesPerPage: number;
|
|
22
|
+
totalEntries: number;
|
|
23
|
+
hasMore: boolean;
|
|
24
|
+
resultId: string;
|
|
25
|
+
outOfRange?: boolean;
|
|
26
|
+
terminalLimit?: boolean;
|
|
27
|
+
};
|
|
28
|
+
diagnosticCounts?: Record<string, number>;
|
|
29
|
+
basis: 'syntactic';
|
|
30
|
+
referenceBasis: 'lexical-occurrence';
|
|
31
|
+
languages: Array<{
|
|
32
|
+
language: string;
|
|
33
|
+
files: number;
|
|
34
|
+
linking: 'javascript-relative' | 'rust-modules' | 'python-modules' | 'c-relative-includes' | 'metadata' | 'unsupported';
|
|
35
|
+
}>;
|
|
36
|
+
imports: {
|
|
37
|
+
resolved: number;
|
|
38
|
+
external: number;
|
|
39
|
+
unresolvedInternal: number;
|
|
40
|
+
unsupported: number;
|
|
41
|
+
};
|
|
42
|
+
diagnostics: Array<{
|
|
43
|
+
file: string;
|
|
44
|
+
line?: number;
|
|
45
|
+
code: 'parse-recovery' | 'unsupported-linking' | 'unresolved-internal' | 'syntax-only';
|
|
46
|
+
message: string;
|
|
47
|
+
}>;
|
|
48
|
+
}
|
|
8
49
|
export interface ImportFact {
|
|
9
50
|
specifier: string;
|
|
10
51
|
localName: string;
|
|
11
52
|
importedName: string;
|
|
12
53
|
line: number;
|
|
13
|
-
/** Native syntax classification; `
|
|
14
|
-
importKind: 'type' | 'value';
|
|
54
|
+
/** Native syntax classification; `module` denotes a Rust module declaration. */
|
|
55
|
+
importKind: 'type' | 'value' | 'module';
|
|
15
56
|
/**
|
|
16
57
|
* Canonical target resolved during graph construction with the complete
|
|
17
58
|
* workspace package-export map. `null` means the specifier is external or
|
|
@@ -64,4 +105,54 @@ export interface FileNode {
|
|
|
64
105
|
/** Exact syntactic provenance for every resolved file edge. */
|
|
65
106
|
edgeKinds: Map<string, Set<FileGraphEdgeKind>>;
|
|
66
107
|
}
|
|
67
|
-
export type FileGraphEdgeKind = 'static-import' | 'type-import' | 'dynamic-import' | 'named-reexport' | 'star-reexport';
|
|
108
|
+
export type FileGraphEdgeKind = 'static-import' | 'type-import' | 'dynamic-import' | 'named-reexport' | 'star-reexport' | 'type-named-reexport' | 'type-star-reexport' | 'commonjs-require' | 'create-require' | 'metadata-import' | 'python-import' | 'rust-module' | 'rust-use' | 'c-include';
|
|
109
|
+
export interface RawGraphFacts {
|
|
110
|
+
language?: string;
|
|
111
|
+
commonJs?: Array<{
|
|
112
|
+
specifier?: string;
|
|
113
|
+
line: number;
|
|
114
|
+
kind: 'commonjs-require';
|
|
115
|
+
binding: 'unshadowed-global' | 'create-require';
|
|
116
|
+
reason?: string;
|
|
117
|
+
}>;
|
|
118
|
+
diagnostics?: string[];
|
|
119
|
+
rustRootUnsupported?: boolean;
|
|
120
|
+
modules?: Array<{
|
|
121
|
+
name: string;
|
|
122
|
+
line: number;
|
|
123
|
+
scope: string[];
|
|
124
|
+
inline: boolean;
|
|
125
|
+
path?: string;
|
|
126
|
+
unsupported?: boolean;
|
|
127
|
+
}>;
|
|
128
|
+
declarations?: Array<{
|
|
129
|
+
id: string;
|
|
130
|
+
name: string;
|
|
131
|
+
kind: string;
|
|
132
|
+
line: number;
|
|
133
|
+
exported?: boolean;
|
|
134
|
+
}>;
|
|
135
|
+
imports?: Array<{
|
|
136
|
+
specifier: string;
|
|
137
|
+
localName: string;
|
|
138
|
+
importedName: string;
|
|
139
|
+
line: number;
|
|
140
|
+
importKind?: string;
|
|
141
|
+
resolutionHint?: string;
|
|
142
|
+
moduleScope?: string[];
|
|
143
|
+
}>;
|
|
144
|
+
calls?: Array<{
|
|
145
|
+
caller: string;
|
|
146
|
+
callee: string;
|
|
147
|
+
kind?: string;
|
|
148
|
+
line?: number;
|
|
149
|
+
}>;
|
|
150
|
+
exports?: Array<{
|
|
151
|
+
name: string;
|
|
152
|
+
line: number;
|
|
153
|
+
localName?: string;
|
|
154
|
+
exportKind?: string;
|
|
155
|
+
/** Present only for a re-export (`export ... from '...'`). */
|
|
156
|
+
source?: string;
|
|
157
|
+
}>;
|
|
158
|
+
}
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { type PackageExportMode } from './packageExportTargets.js';
|
|
2
|
+
import type { ImportResolution } from './types.js';
|
|
3
|
+
export interface WorkspacePackageExports {
|
|
4
|
+
resolve(specifier: string, mode: PackageExportMode): ImportResolution | undefined;
|
|
5
|
+
}
|
|
6
|
+
/** Package export selection precedes bounded source projection and file existence checks. */
|
|
7
|
+
export declare function buildWorkspacePackageExports(rootAbsolutePath: string, knownFiles: ReadonlySet<string>): WorkspacePackageExports;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,24 +3,32 @@ export * from './config.js';
|
|
|
3
3
|
export * from './errors/domainErrors.js';
|
|
4
4
|
export * from './errors/errorFactories.js';
|
|
5
5
|
export * from './errors/localToolErrors.js';
|
|
6
|
-
export
|
|
6
|
+
export { redactPath } from '@octocodeai/octocode-engine/pathUtils';
|
|
7
7
|
export * from './errors/ToolError.js';
|
|
8
8
|
export * from './github/client.js';
|
|
9
9
|
export * from './github/codeSearch.js';
|
|
10
|
-
export
|
|
10
|
+
export { MAX_DIRECTORY_FILES, MAX_TOTAL_SIZE, } from './github/directoryFetch/helpers.js';
|
|
11
|
+
export { fetchDirectoryContents } from './github/directoryFetch/fetchDirectoryContents.js';
|
|
12
|
+
export { fetchFileContentToDisk } from './github/directoryFetch/fetchFileContentToDisk.js';
|
|
11
13
|
export * from './github/errorConstants.js';
|
|
12
14
|
export * from './github/errors.js';
|
|
13
15
|
export * from './github/fileContent.js';
|
|
14
16
|
export * from './github/fileContentProcess.js';
|
|
15
|
-
export
|
|
17
|
+
export { applyContentPagination, fetchFileTimestamp, } from './github/fileContentPagination.js';
|
|
18
|
+
export type { RawContentResult, RawContentFetchOptions, RawContentFetchResponse, } from './github/fileContentRaw/fetch.js';
|
|
19
|
+
export { fetchRawGitHubFileContent } from './github/fileContentRaw/fetch.js';
|
|
16
20
|
export * from './github/prByNumber.js';
|
|
17
|
-
export
|
|
21
|
+
export { shouldEnrichPullRequestFromSearch } from './github/prContentFetcher/flags.js';
|
|
22
|
+
export { transformPullRequestItemFromSearch, transformPullRequestItemFromREST, } from './github/prContentFetcher/transform.js';
|
|
18
23
|
export * from './github/prTransformation.js';
|
|
19
24
|
export * from './github/pullRequestSearch.js';
|
|
20
25
|
export * from './github/history.js';
|
|
21
|
-
export
|
|
26
|
+
export { getOwnerQualifier } from './github/queryBuilders/base.js';
|
|
27
|
+
export { buildCodeSearchQuery, buildRepoSearchQuery, } from './github/queryBuilders/codeAndRepo.js';
|
|
28
|
+
export { buildPullRequestSearchQuery, shouldUseSearchForPRs, } from './github/queryBuilders/pullRequests.js';
|
|
29
|
+
export { buildIssueSearchQuery, shouldUseSearchForIssues, type IssueSearchParams, } from './github/queryBuilders/issues.js';
|
|
22
30
|
export * from './github/repoSearch.js';
|
|
23
|
-
export
|
|
31
|
+
export { viewGitHubRepositoryStructureAPI } from './github/repoStructure/fetchOrchestration.js';
|
|
24
32
|
export * from './github/repoStructurePagination.js';
|
|
25
33
|
export * from './github/repoStructureRecursive.js';
|
|
26
34
|
export * from './github/responseHeaders.js';
|
|
@@ -40,6 +48,8 @@ export * from './cacheMaintenance.js';
|
|
|
40
48
|
export * from './session.js';
|
|
41
49
|
export * from './tools/executionGuard.js';
|
|
42
50
|
export * from './tools/github_clone_repo/cache.js';
|
|
51
|
+
export { cleanupStaleMaterializationArtifacts, tryRecoverStaleCloneLock, writeCloneLockMeta, } from './tools/github_clone_repo/cacheArtifacts.js';
|
|
52
|
+
export { getCloneBaseDir, getTreeBaseDir, getCloneDir, getTreeDir, } from './tools/github_clone_repo/cachePaths.js';
|
|
43
53
|
export * from './tools/github_clone_repo/cloneRepo.js';
|
|
44
54
|
export * from './tools/github_clone_repo/execution.js';
|
|
45
55
|
export * from './tools/github_clone_repo/scheme.js';
|
|
@@ -66,25 +76,35 @@ export * from './tools/local_analyze_graph/scheme.js';
|
|
|
66
76
|
export * from './tools/local_search/execution.js';
|
|
67
77
|
export * from './tools/local_search/scheme.js';
|
|
68
78
|
export * from './tools/lsp/semantic_content/execution.js';
|
|
69
|
-
export * from './tools/lsp/semantic_content/index.js';
|
|
70
79
|
export * from './tools/lsp/semantic_content/scheme.js';
|
|
71
80
|
export * from './tools/lsp/shared/callHierarchyTraversal.js';
|
|
72
81
|
export * from './tools/lsp/shared/resolveSymbolAnchor.js';
|
|
73
82
|
export * from './tools/lsp/shared/semanticTypes.js';
|
|
74
83
|
export * from './tools/package_search/execution.js';
|
|
84
|
+
export { foldKeywords, isPackageNotFoundError, } from './tools/package_search/queryHelpers.js';
|
|
85
|
+
export { buildPackagePagination } from './tools/package_search/pagination.js';
|
|
75
86
|
export * from './tools/package_search/scheme.js';
|
|
76
87
|
export * from './tools/providerExecution.js';
|
|
77
|
-
export * from './tools/providerMappers.js';
|
|
88
|
+
export * from './tools/providerMappers/codeSearch.js';
|
|
89
|
+
export * from './tools/providerMappers/repoSearch.js';
|
|
90
|
+
export * from './tools/providerMappers/pullRequests.js';
|
|
91
|
+
export * from './tools/providerMappers/fileContent.js';
|
|
92
|
+
export * from './tools/providerMappers/repoStructure.js';
|
|
78
93
|
export * from './tools/toolConfig.js';
|
|
79
94
|
export type { ToolConfig, ToolDirectExecutionConfig, ToolDirectSecurity, } from './tools/toolCatalogFactory.js';
|
|
80
|
-
export
|
|
81
|
-
export
|
|
95
|
+
export { baseSchemaDescriptions } from './toolContract/input/resources/global.js';
|
|
96
|
+
export { PUBLIC_TOOL_DESCRIPTIONS } from './toolContract/descriptions.js';
|
|
82
97
|
export * from './tools/toolMetadata/metadataPresence.js';
|
|
83
98
|
export * from './tools/toolMetadata/names.js';
|
|
84
|
-
export * from './tools/toolMetadata/proxies.js';
|
|
85
99
|
export * from './tools/toolMetadata/state.js';
|
|
86
100
|
export * from './tools/toolMetadata/types.js';
|
|
87
|
-
export * from './tools/directToolCatalog.js';
|
|
101
|
+
export * from './tools/directToolCatalog/toolCatalogDefinitions.js';
|
|
102
|
+
export * from './tools/directToolCatalog/toolCatalogFormatters.js';
|
|
103
|
+
export * from './tools/directToolCatalog/toolSchemaIntrospection.js';
|
|
104
|
+
export * from './tools/directToolCatalog/toolCommandPatterns.js';
|
|
105
|
+
export * from './tools/directToolCatalog/toolInputPreparation.js';
|
|
106
|
+
export * from './tools/directToolCatalog/toolSchemaRelations.js';
|
|
107
|
+
export { executeDirectTool } from './tools/directToolCatalog.exec.js';
|
|
88
108
|
export * from './tools/toolNames.js';
|
|
89
109
|
export * from './tools/utils.js';
|
|
90
110
|
export * from './types/bulk.js';
|
|
@@ -103,16 +123,23 @@ export * from './utils/core/safeRegex.js';
|
|
|
103
123
|
export * from './utils/environment/environmentDetection.js';
|
|
104
124
|
export * from './utils/exec/npm.js';
|
|
105
125
|
export * from './utils/exec/safe.js';
|
|
106
|
-
export * from './utils/exec/spawn.js';
|
|
126
|
+
export * from './utils/exec/spawn/env.js';
|
|
127
|
+
export * from './utils/exec/spawn/wrappers.js';
|
|
107
128
|
export * from './utils/file/byteOffset.js';
|
|
108
|
-
export
|
|
129
|
+
export { DISCOVERY_IGNORED_FILE_EXTENSIONS, DISCOVERY_IGNORED_FILE_NAMES, DISCOVERY_IGNORED_FOLDER_NAMES, getDiscoveryExtension, shouldIgnoreDiscoveryDir, shouldIgnoreDiscoveryFile, } from '@octocodeai/octocode-engine/security';
|
|
130
|
+
export type { DiscoveryExtensionOptions } from '@octocodeai/octocode-engine/security';
|
|
109
131
|
export * from './utils/file/size.js';
|
|
110
132
|
export * from './utils/file/toolHelpers.js';
|
|
111
|
-
export * from './utils/http/cache.js';
|
|
133
|
+
export * from './utils/http/cache/key.js';
|
|
134
|
+
export * from './utils/http/cache/dataCache.js';
|
|
135
|
+
export * from './utils/http/cache/conditional.js';
|
|
136
|
+
export * from './utils/http/cache/management.js';
|
|
137
|
+
export * from './utils/http/cache/diskStore.js';
|
|
112
138
|
export * from './utils/http/circuitBreaker.js';
|
|
113
139
|
export * from './utils/http/fetch.js';
|
|
114
140
|
export * from './utils/package/common.js';
|
|
115
|
-
export
|
|
141
|
+
export { getNpmRegistryUrl, checkNpmRegistryReachable, } from './utils/package/npm/npmRegistry.js';
|
|
142
|
+
export { isExactPackageName, searchNpmPackage, checkNpmDeprecation, } from './utils/package/npm/npmDeprecation.js';
|
|
116
143
|
export * from './utils/package/schemas.js';
|
|
117
144
|
export * from './utils/package/types.js';
|
|
118
145
|
export * from './utils/pagination/boundary.js';
|
|
@@ -122,7 +149,8 @@ export * from './utils/pagination/hints.js';
|
|
|
122
149
|
export * from './utils/pagination/types.js';
|
|
123
150
|
export * from './utils/parsers/diff.js';
|
|
124
151
|
export * from './utils/parsers/schemas.js';
|
|
125
|
-
export
|
|
152
|
+
export { computeQueryTimeout } from './utils/response/bulk/queries.js';
|
|
153
|
+
export { executeBulkOperation } from './utils/response/bulk/response.js';
|
|
126
154
|
export * from './utils/response/callToolResult.js';
|
|
127
155
|
export * from './utils/response/normalizedError.js';
|
|
128
156
|
export * from './utils/response/charSavings.js';
|
|
@@ -132,8 +160,7 @@ export * from './utils/response/pathRelativize.js';
|
|
|
132
160
|
export type { GitHubPullRequestItem, Repository } from './github/githubAPI.js';
|
|
133
161
|
export { isGitHubAPIError, isGitHubAPISuccess, isRepository, } from './github/githubAPI.js';
|
|
134
162
|
export type { ProviderType, ProviderConfig, ProviderCapabilities, ProviderResponse, ICodeHostProvider, } from './providers/types.js';
|
|
135
|
-
export type {
|
|
136
|
-
export type { UnifiedRepository, CodeSearchItem, CodeSearchResult, FileContentResult, RepoSearchResult, PullRequestSearchResult, RepoStructureResult, } from './providers/types.js';
|
|
163
|
+
export type { UnifiedRepository, CodeSearchItem, CodeSearchResult, FileContentResult, RepoSearchResult, PullRequestSearchResult, RepoStructureResult, } from './providers/providerResults.js';
|
|
137
164
|
export { isProviderSuccess, isProviderError } from './providers/types.js';
|
|
138
165
|
export type { GitHubAPIError, GitHubAPISuccess, OptimizedCodeSearchResult, DiffEntry, PullRequestSimple, GitHubPullRequestsSearchParams, ContentDirectoryEntry, CodeSearchResultItem, RepoSearchResultItem, IssueSearchResultItem, IssueComment, PRReviewInfo, CommitFileInfo, CommitInfo, PRCommentItem, GetContentParameters, SearchCodeParameters, SearchCodeResponse, SearchReposParameters, GitHubAPIResponse, } from './github/githubAPI.js';
|
|
139
166
|
export { summarizeEntries, paginateEntries, buildEntryPaginationHints, buildWalkWarnings, } from './tools/local_view_structure/structureResponse.js';
|