@octocodeai/octocode-tools-core 16.6.0 → 16.6.3
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 +179 -249
- package/dist/direct.js +37 -35
- package/dist/errors/localToolErrors.d.ts +1 -0
- package/dist/github/pullRequestSearch.d.ts +1 -0
- package/dist/index.d.ts +6 -4
- package/dist/index.js +39 -44
- package/dist/oql/adapters/graphProof.d.ts +6 -0
- package/dist/oql/adapters/graphView.d.ts +28 -0
- package/dist/oql/adapters/local.d.ts +1 -0
- package/dist/oql/adapters/resultMap.d.ts +7 -0
- package/dist/oql/adapters/runner.d.ts +7 -0
- package/dist/oql/envelope.d.ts +2 -0
- package/dist/oql/index.d.ts +2 -1
- package/dist/oql/index.js +37 -34
- package/dist/oql/schema.d.ts +24 -8
- package/dist/oql/schemeText.d.ts +27 -10
- package/dist/oql/transformers/github/common.d.ts +7 -1
- package/dist/oql/types.d.ts +19 -2
- package/dist/responses.d.ts +4 -35
- package/dist/schema.d.ts +1 -1
- package/dist/schema.js +2 -1
- package/dist/scheme/pagination.d.ts +51 -0
- package/dist/scheme/responseEnvelope.d.ts +67 -1
- package/dist/shared/config/index.d.ts +1 -8
- package/dist/shared/config/index.js +1 -2
- package/dist/shared/credentials/index.d.ts +1 -1
- package/dist/shared/credentials/index.js +2 -1
- package/dist/shared/credentials/storage.d.ts +0 -2
- package/dist/shared/credentials/testing.js +1 -1
- package/dist/shared/credentials/types.d.ts +1 -1
- package/dist/shared/paths.d.ts +6 -1
- package/dist/shared/paths.js +1 -1
- package/dist/shared/session/index.js +1 -1
- package/dist/tools/directToolCatalog.exec.d.ts +5 -0
- package/dist/tools/directToolCatalog.meta.d.ts +1 -0
- package/dist/tools/github_clone_repo/scheme.d.ts +0 -1
- package/dist/tools/github_fetch_content/scheme.d.ts +6 -89
- package/dist/tools/github_search_code/scheme.d.ts +4 -6
- package/dist/tools/github_search_pull_requests/scheme.d.ts +0 -1
- package/dist/tools/github_search_repos/execution.d.ts +58 -0
- package/dist/tools/github_search_repos/scheme.d.ts +3 -6
- package/dist/tools/github_view_repo_structure/scheme.d.ts +0 -1
- package/dist/tools/local_binary_inspect/binaryInspector.d.ts +0 -4
- package/dist/tools/local_binary_inspect/scheme.d.ts +97 -0
- package/dist/tools/local_fetch_content/scheme.d.ts +66 -0
- package/dist/tools/local_find_files/scheme.d.ts +49 -0
- package/dist/tools/local_ripgrep/scheme.d.ts +75 -0
- package/dist/tools/local_view_structure/scheme.d.ts +52 -0
- package/dist/tools/lsp/semantic_content/scheme.d.ts +8 -22
- package/dist/tools/lsp/shared/readiness.d.ts +17 -0
- package/dist/tools/lsp/shared/semanticTypes.d.ts +2 -2
- package/dist/tools/package_search/execution.d.ts +23 -0
- package/dist/tools/package_search/scheme.d.ts +10 -4
- package/dist/tools/toolNames.d.ts +2 -1
- package/dist/types/server.d.ts +1 -1
- package/dist/utils/response/bulk.d.ts +1 -0
- package/dist/utils/response/groupedFinalizer.d.ts +7 -2
- package/package.json +7 -3
- package/dist/oql/adapters/v2.d.ts +0 -32
- package/dist/oql/v2params.d.ts +0 -22
- package/dist/shared/config/defaults.d.ts +0 -14
- package/dist/shared/config/loader.d.ts +0 -7
- package/dist/shared/config/resolver.d.ts +0 -2
- package/dist/shared/config/resolverCache.d.ts +0 -12
- package/dist/shared/config/resolverSections.d.ts +0 -10
- package/dist/shared/config/runtimeSurface.d.ts +0 -21
- package/dist/shared/config/types.d.ts +0 -92
- package/dist/shared/config/validator.d.ts +0 -2
- package/dist/shared/credentials/envTokens.d.ts +0 -9
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ResearchEvidencePacket } from '../research/packets.js';
|
|
2
|
+
import type { OqlDiagnostic, OqlQuery } from '../types.js';
|
|
3
|
+
import { type GraphFilters } from './graphView.js';
|
|
4
|
+
export declare function shouldRunLspProof(mode: 'plan' | 'analyze' | 'prove', p: Record<string, unknown>): boolean;
|
|
5
|
+
export declare function graphProofLimit(query: OqlQuery, p: Record<string, unknown>): number;
|
|
6
|
+
export declare function escalateGraphPacketsWithLsp(root: string, query: OqlQuery, packets: ResearchEvidencePacket[], filters: GraphFilters, limit: number): Promise<OqlDiagnostic[]>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { analyzeResearchFlow } from '../research/analyze.js';
|
|
2
|
+
import type { ResearchEvidencePacket, ResearchGraphSummary } from '../research/packets.js';
|
|
3
|
+
import type { OqlGraphData, OqlQuery, Pagination } from '../types.js';
|
|
4
|
+
export declare function packetPage(query: OqlQuery, totalItems: number): {
|
|
5
|
+
packetsStart: number;
|
|
6
|
+
packetsEnd: number;
|
|
7
|
+
pagination: Pagination;
|
|
8
|
+
};
|
|
9
|
+
type GraphDirection = 'incoming' | 'outgoing' | 'both';
|
|
10
|
+
export interface GraphFilters {
|
|
11
|
+
subject?: string;
|
|
12
|
+
subjectKind?: string;
|
|
13
|
+
relations?: ReadonlySet<string>;
|
|
14
|
+
verdicts?: ReadonlySet<string>;
|
|
15
|
+
direction: GraphDirection;
|
|
16
|
+
includePackets: boolean;
|
|
17
|
+
includeFacts: boolean;
|
|
18
|
+
includeEdges: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare function graphFilters(p: Record<string, unknown>): GraphFilters;
|
|
21
|
+
export declare function packetMatchesGraphFilters(packet: ResearchEvidencePacket, filters: GraphFilters): boolean;
|
|
22
|
+
export declare function buildGraphView(query: OqlQuery, packets: ResearchEvidencePacket[], graphSummary: ResearchGraphSummary, filters: GraphFilters, nativeGraphFacts: Awaited<ReturnType<typeof analyzeResearchFlow>>['graphFacts'], root: string): {
|
|
23
|
+
data: OqlGraphData;
|
|
24
|
+
pagination: Pagination;
|
|
25
|
+
};
|
|
26
|
+
export declare function nativeGraphSummary(facts: Awaited<ReturnType<typeof analyzeResearchFlow>>['graphFacts']): Record<string, number>;
|
|
27
|
+
export declare function summarizePacketGraph(packets: readonly ResearchEvidencePacket[]): ResearchGraphSummary;
|
|
28
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type MappedResult } from './resultMap.js';
|
|
2
2
|
import type { OqlDiagnostic, OqlProvenance, OqlQuery } from '../types.js';
|
|
3
3
|
export interface AdapterResult extends MappedResult {
|
|
4
|
+
shared?: Record<string, unknown>;
|
|
4
5
|
diagnostics: OqlDiagnostic[];
|
|
5
6
|
provenance: OqlProvenance[];
|
|
6
7
|
}
|
|
@@ -9,6 +9,13 @@ export interface MappedResult {
|
|
|
9
9
|
pagination?: Pagination;
|
|
10
10
|
}
|
|
11
11
|
export declare function mapCodeResult(result: LocalSearchCodeToolResult, source: QuerySource): MappedResult;
|
|
12
|
+
/**
|
|
13
|
+
* Mark file-unit code pagination: `page`/`itemsPerPage` count matched FILES
|
|
14
|
+
* while OQL code rows are individual matches. `filesUnit` forces the marker
|
|
15
|
+
* for providers (GitHub code search) whose totalItemsKind carries exactness
|
|
16
|
+
* (`lowerBound`/`reported`) instead of the local `'files'` unit tag.
|
|
17
|
+
*/
|
|
18
|
+
export declare function enrichCodePagination(pagination: Pagination | undefined, rowCount: number, filesUnit?: boolean): Pagination | undefined;
|
|
12
19
|
export declare function mapFilesResult(result: LocalFindFilesToolResult, source: QuerySource): MappedResult;
|
|
13
20
|
export declare function mapStructureResult(result: LocalViewStructureToolResult, source: QuerySource): MappedResult;
|
|
14
21
|
export declare function mapContentResult(result: LocalGetFileContentToolResult, source: QuerySource, path: string,
|
|
@@ -12,3 +12,10 @@
|
|
|
12
12
|
import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
13
13
|
/** Run one backing tool with a single query, via the shared direct-tool path. */
|
|
14
14
|
export declare function runDirect(name: string, query: Record<string, unknown>): Promise<CallToolResult>;
|
|
15
|
+
/** Pull the single query's `{data,status}` out of a bulk-shaped tool result. */
|
|
16
|
+
export declare function firstQueryData<T = Record<string, unknown>>(result: CallToolResult): {
|
|
17
|
+
data?: T;
|
|
18
|
+
status?: string;
|
|
19
|
+
};
|
|
20
|
+
export declare function numberFrom(value: unknown): number | undefined;
|
|
21
|
+
export declare function stringFrom(value: unknown): string | undefined;
|
package/dist/oql/envelope.d.ts
CHANGED
|
@@ -3,8 +3,10 @@ export interface BuildEnvelopeArgs {
|
|
|
3
3
|
queryId?: string;
|
|
4
4
|
queryIndex?: number;
|
|
5
5
|
results: OqlProofGradedResultRow[];
|
|
6
|
+
shared?: OqlResultEnvelope['shared'];
|
|
6
7
|
pagination?: Pagination;
|
|
7
8
|
next?: OqlResultEnvelope['next'];
|
|
9
|
+
nextHints?: OqlResultEnvelope['nextHints'];
|
|
8
10
|
diagnostics: OqlDiagnostic[];
|
|
9
11
|
provenance: OqlProvenance[];
|
|
10
12
|
/** Whether the plan was executable (no UNSUPPORTED nodes / blocking errors). */
|
package/dist/oql/index.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export { runOqlSearch, type RunOptions } from './run.js';
|
|
|
21
21
|
export { buildShorthandInput, type SearchShorthand, type ShorthandCorpus, type ShorthandResult, } from './shorthand.js';
|
|
22
22
|
export { listTransformerEntries, findTransformerById, findTransformerEntry, backendCallsForTransformer, } from './transformers/registry.js';
|
|
23
23
|
export type { TransformerRegistryEntry, TransformerStatus, } from './transformers/contract.js';
|
|
24
|
-
export { oqlSchemaText, OQL_SCHEMA_DOC } from './schemeText.js';
|
|
24
|
+
export { oqlSchemaText, oqlCompactSchemeText, oqlCompactSchemeJson, OQL_SCHEMA_DOC, } from './schemeText.js';
|
|
25
|
+
export { sanitizeStructuredContent } from '../responses.js';
|
|
25
26
|
export { analyzeResearchFlow, type AnalyzeResearchOptions, type ResearchAnalysisResult, type ResearchDependencyIssue, type ResearchFileIssue, type ResearchFlowStep, type ResearchIntent, type ResearchManifestSummary, type ResearchMode, type ResearchSymbolRow, type ResearchSymbolVerdict, } from './research/analyze.js';
|
|
26
27
|
export { buildResearchPackets, type EvidenceClaim, type EvidenceConfidence, type EvidenceEdge, type EvidenceFact, type EvidenceFlag, type EvidenceLocation, type EvidenceRelation, type EvidenceSource, type EvidenceSubject, type MissingProof, type MissingProofKind, type PacketProofStatus, type PacketVerdict, type ResearchEvidencePacket, type ResearchGraphSummary, type ResearchPacketBundle, } from './research/packets.js';
|