@octocodeai/octocode-tools-core 16.6.2 → 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.
Files changed (58) hide show
  1. package/README.md +11 -9
  2. package/dist/direct.js +37 -34
  3. package/dist/github/pullRequestSearch.d.ts +1 -0
  4. package/dist/index.d.ts +6 -4
  5. package/dist/index.js +39 -43
  6. package/dist/oql/adapters/graphProof.d.ts +6 -0
  7. package/dist/oql/adapters/graphView.d.ts +28 -0
  8. package/dist/oql/adapters/resultMap.d.ts +7 -0
  9. package/dist/oql/adapters/runner.d.ts +7 -0
  10. package/dist/oql/index.js +37 -34
  11. package/dist/oql/schema.d.ts +24 -8
  12. package/dist/oql/schemeText.d.ts +12 -11
  13. package/dist/oql/transformers/github/common.d.ts +7 -1
  14. package/dist/oql/types.d.ts +12 -2
  15. package/dist/responses.d.ts +4 -35
  16. package/dist/schema.js +2 -2
  17. package/dist/scheme/pagination.d.ts +51 -0
  18. package/dist/scheme/responseEnvelope.d.ts +67 -1
  19. package/dist/shared/config/index.d.ts +1 -8
  20. package/dist/shared/config/index.js +1 -2
  21. package/dist/shared/credentials/index.d.ts +1 -1
  22. package/dist/shared/credentials/index.js +2 -1
  23. package/dist/shared/credentials/storage.d.ts +0 -2
  24. package/dist/shared/credentials/testing.js +1 -1
  25. package/dist/shared/paths.d.ts +4 -0
  26. package/dist/shared/paths.js +1 -1
  27. package/dist/shared/session/index.js +1 -1
  28. package/dist/tools/directToolCatalog.exec.d.ts +5 -0
  29. package/dist/tools/github_clone_repo/scheme.d.ts +0 -1
  30. package/dist/tools/github_fetch_content/scheme.d.ts +6 -7
  31. package/dist/tools/github_search_code/scheme.d.ts +4 -6
  32. package/dist/tools/github_search_pull_requests/scheme.d.ts +0 -1
  33. package/dist/tools/github_search_repos/execution.d.ts +58 -0
  34. package/dist/tools/github_search_repos/scheme.d.ts +3 -6
  35. package/dist/tools/github_view_repo_structure/scheme.d.ts +0 -1
  36. package/dist/tools/local_binary_inspect/scheme.d.ts +97 -0
  37. package/dist/tools/local_fetch_content/scheme.d.ts +66 -0
  38. package/dist/tools/local_find_files/scheme.d.ts +49 -0
  39. package/dist/tools/local_ripgrep/scheme.d.ts +75 -0
  40. package/dist/tools/local_view_structure/scheme.d.ts +52 -0
  41. package/dist/tools/lsp/semantic_content/scheme.d.ts +8 -8
  42. package/dist/tools/lsp/shared/readiness.d.ts +17 -0
  43. package/dist/tools/package_search/scheme.d.ts +2 -4
  44. package/dist/tools/toolNames.d.ts +1 -0
  45. package/dist/utils/response/bulk.d.ts +1 -0
  46. package/dist/utils/response/groupedFinalizer.d.ts +7 -2
  47. package/package.json +4 -3
  48. package/dist/oql/adapters/v2.d.ts +0 -32
  49. package/dist/oql/v2params.d.ts +0 -22
  50. package/dist/shared/config/defaults.d.ts +0 -14
  51. package/dist/shared/config/loader.d.ts +0 -7
  52. package/dist/shared/config/resolver.d.ts +0 -2
  53. package/dist/shared/config/resolverCache.d.ts +0 -12
  54. package/dist/shared/config/resolverSections.d.ts +0 -10
  55. package/dist/shared/config/runtimeSurface.d.ts +0 -22
  56. package/dist/shared/config/types.d.ts +0 -92
  57. package/dist/shared/config/validator.d.ts +0 -2
  58. 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 {};
@@ -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;