@octocodeai/octocode-tools-core 18.0.1 → 18.1.2

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.
@@ -1,5 +1,5 @@
1
1
  import type { AuthInfo } from '@modelcontextprotocol/sdk/server/auth/types.js';
2
- import type { GitHubAPIResponse } from './githubAPI.js';
2
+ import type { GitHubAPIResponse, HistoryCommitFile } from './githubAPI.js';
3
3
  export type CompareResult = {
4
4
  type: 'compare';
5
5
  owner: string;
@@ -19,14 +19,17 @@ export type CompareResult = {
19
19
  }>;
20
20
  /** File count when includeDiff is off (lean default). */
21
21
  changedFiles?: number;
22
- /** Per-file diffs when includeDiff is on. */
23
- files?: Array<{
24
- filename: string;
25
- status: string;
26
- additions: number;
27
- deletions: number;
28
- patch?: string;
29
- }>;
22
+ /** Per-file diffs when includeDiff is on (windowed + paginated). */
23
+ files?: HistoryCommitFile[];
24
+ /** File-list pagination when includeDiff is on. */
25
+ filesPagination?: {
26
+ currentPage: number;
27
+ totalPages: number;
28
+ itemsPerPage: number;
29
+ totalFiles: number;
30
+ hasMore: boolean;
31
+ nextFilePage?: number;
32
+ };
30
33
  };
31
34
  /**
32
35
  * Compare mode of ghSearchCommits: diff two refs (base...head) via GitHub's
@@ -39,4 +42,10 @@ export declare function compareRefs(params: {
39
42
  base: string;
40
43
  head: string;
41
44
  includeDiff?: boolean;
45
+ /** Restrict the diff to a single file path (searchable scope). */
46
+ path?: string;
47
+ filePage?: number;
48
+ itemsPerPage?: number;
49
+ charOffset?: number;
50
+ charLength?: number;
42
51
  }, authInfo?: AuthInfo): Promise<GitHubAPIResponse<CompareResult>>;