@github-tools/sdk 1.2.0 → 1.4.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/index.d.mts CHANGED
@@ -1,431 +1,8 @@
1
- import { Octokit, Octokit as Octokit$1 } from "octokit";
1
+ import { A as addPullRequestComment, B as createRepository, C as addLabels, D as listIssues, E as getIssue, F as listPullRequestReviews, G as createOctokit, H as getFileContent, I as listPullRequests, J as ToolOverrides, K as Octokit, L as mergePullRequest, M as createPullRequestReview, N as getPullRequest, O as listLabels, P as listPullRequestFiles, R as createBranch, S as addIssueComment, T as createIssue, U as getRepository, V as forkRepository, W as listBranches, _ as getBlame, a as listWorkflowJobs, b as searchCode, c as rerunWorkflowRun, d as createGistComment, f as deleteGist, g as updateGist, h as listGists, i as getWorkflowRun, j as createPullRequest, k as removeLabel, l as triggerWorkflow, m as listGistComments, n as createGithubAgent, o as listWorkflowRuns, p as getGist, q as ToolOptions, r as cancelWorkflowRun, s as listWorkflows, t as CreateGithubAgentOptions, u as createGist, v as getCommit, w as closeIssue, x as searchRepositories, y as listCommits, z as createOrUpdateFile } from "./agents-C6nqZiYp.mjs";
2
2
  import * as ai from "ai";
3
- import { ToolLoopAgent, ToolLoopAgentSettings } from "ai";
4
3
 
5
- //#region src/client.d.ts
6
- declare function createOctokit(token: string): Octokit$1;
7
- //#endregion
8
- //#region src/types.d.ts
9
- type ToolOptions = {
10
- needsApproval?: boolean;
11
- };
12
- //#endregion
13
- //#region src/tools/repository.d.ts
14
- declare const getRepository: (octokit: Octokit) => ai.Tool<{
15
- owner: string;
16
- repo: string;
17
- }, {
18
- name: string;
19
- fullName: string;
20
- description: string | null;
21
- url: string;
22
- defaultBranch: string;
23
- stars: number;
24
- forks: number;
25
- openIssues: number;
26
- language: string | null;
27
- private: boolean;
28
- createdAt: string;
29
- updatedAt: string;
30
- }>;
31
- declare const listBranches: (octokit: Octokit) => ai.Tool<{
32
- owner: string;
33
- repo: string;
34
- perPage: number;
35
- }, {
36
- name: string;
37
- sha: string;
38
- protected: boolean;
39
- }[]>;
40
- declare const getFileContent: (octokit: Octokit) => ai.Tool<{
41
- owner: string;
42
- repo: string;
43
- path: string;
44
- ref?: string | undefined;
45
- }, {
46
- type: string;
47
- entries: {
48
- name: string;
49
- type: "file" | "dir" | "submodule" | "symlink";
50
- path: string;
51
- }[];
52
- path?: undefined;
53
- sha?: undefined;
54
- size?: undefined;
55
- content?: undefined;
56
- } | {
57
- type: "submodule" | "symlink";
58
- path: string;
59
- entries?: undefined;
60
- sha?: undefined;
61
- size?: undefined;
62
- content?: undefined;
63
- } | {
64
- type: string;
65
- path: string;
66
- sha: string;
67
- size: number;
68
- content: string;
69
- entries?: undefined;
70
- }>;
71
- declare const createBranch: (octokit: Octokit, {
72
- needsApproval
73
- }?: ToolOptions) => ai.Tool<{
74
- owner: string;
75
- repo: string;
76
- branch: string;
77
- from?: string | undefined;
78
- }, {
79
- ref: string;
80
- sha: string;
81
- url: string;
82
- }>;
83
- declare const forkRepository: (octokit: Octokit, {
84
- needsApproval
85
- }?: ToolOptions) => ai.Tool<{
86
- owner: string;
87
- repo: string;
88
- organization?: string | undefined;
89
- name?: string | undefined;
90
- }, {
91
- name: string;
92
- fullName: string;
93
- url: string;
94
- cloneUrl: string;
95
- sshUrl: string;
96
- defaultBranch: string;
97
- private: boolean;
98
- parent: {
99
- fullName: string;
100
- url: string;
101
- } | null;
102
- }>;
103
- declare const createRepository: (octokit: Octokit, {
104
- needsApproval
105
- }?: ToolOptions) => ai.Tool<{
106
- name: string;
107
- isPrivate: boolean;
108
- autoInit: boolean;
109
- description?: string | undefined;
110
- gitignoreTemplate?: string | undefined;
111
- licenseTemplate?: string | undefined;
112
- org?: string | undefined;
113
- }, {
114
- name: string;
115
- fullName: string;
116
- description: string | null;
117
- url: string;
118
- cloneUrl: string;
119
- sshUrl: string;
120
- defaultBranch: string;
121
- private: boolean;
122
- createdAt: string;
123
- }>;
124
- declare const createOrUpdateFile: (octokit: Octokit, {
125
- needsApproval
126
- }?: ToolOptions) => ai.Tool<{
127
- owner: string;
128
- repo: string;
129
- path: string;
130
- message: string;
131
- content: string;
132
- branch?: string | undefined;
133
- sha?: string | undefined;
134
- }, {
135
- path: string | undefined;
136
- sha: string | undefined;
137
- commitSha: string | undefined;
138
- commitUrl: string | undefined;
139
- }>;
140
- //#endregion
141
- //#region src/tools/pull-requests.d.ts
142
- declare const listPullRequests: (octokit: Octokit) => ai.Tool<{
143
- owner: string;
144
- repo: string;
145
- state: "open" | "closed" | "all";
146
- perPage: number;
147
- }, {
148
- number: number;
149
- title: string;
150
- state: string;
151
- url: string;
152
- author: string | undefined;
153
- branch: string;
154
- base: string;
155
- draft: boolean | undefined;
156
- createdAt: string;
157
- updatedAt: string;
158
- }[]>;
159
- declare const getPullRequest: (octokit: Octokit) => ai.Tool<{
160
- owner: string;
161
- repo: string;
162
- pullNumber: number;
163
- }, {
164
- number: number;
165
- title: string;
166
- body: string | null;
167
- state: "open" | "closed";
168
- url: string;
169
- author: string;
170
- branch: string;
171
- base: string;
172
- draft: boolean | undefined;
173
- merged: boolean;
174
- mergeable: boolean | null;
175
- additions: number;
176
- deletions: number;
177
- changedFiles: number;
178
- createdAt: string;
179
- updatedAt: string;
180
- mergedAt: string | null;
181
- }>;
182
- declare const createPullRequest: (octokit: Octokit, {
183
- needsApproval
184
- }?: ToolOptions) => ai.Tool<{
185
- owner: string;
186
- repo: string;
187
- title: string;
188
- head: string;
189
- base: string;
190
- draft: boolean;
191
- body?: string | undefined;
192
- }, {
193
- number: number;
194
- title: string;
195
- url: string;
196
- state: "open" | "closed";
197
- draft: boolean | undefined;
198
- branch: string;
199
- base: string;
200
- }>;
201
- declare const mergePullRequest: (octokit: Octokit, {
202
- needsApproval
203
- }?: ToolOptions) => ai.Tool<{
204
- owner: string;
205
- repo: string;
206
- pullNumber: number;
207
- mergeMethod: "merge" | "squash" | "rebase";
208
- commitTitle?: string | undefined;
209
- commitMessage?: string | undefined;
210
- }, {
211
- merged: boolean;
212
- message: string;
213
- sha: string;
214
- }>;
215
- declare const addPullRequestComment: (octokit: Octokit, {
216
- needsApproval
217
- }?: ToolOptions) => ai.Tool<{
218
- owner: string;
219
- repo: string;
220
- pullNumber: number;
221
- body: string;
222
- }, {
223
- id: number;
224
- url: string;
225
- body: string | undefined;
226
- author: string | undefined;
227
- createdAt: string;
228
- }>;
229
- //#endregion
230
- //#region src/tools/issues.d.ts
231
- declare const listIssues: (octokit: Octokit) => ai.Tool<{
232
- owner: string;
233
- repo: string;
234
- state: "open" | "closed" | "all";
235
- perPage: number;
236
- labels?: string | undefined;
237
- }, {
238
- number: number;
239
- title: string;
240
- state: string;
241
- url: string;
242
- author: string | undefined;
243
- labels: (string | undefined)[];
244
- createdAt: string;
245
- updatedAt: string;
246
- }[]>;
247
- declare const getIssue: (octokit: Octokit) => ai.Tool<{
248
- owner: string;
249
- repo: string;
250
- issueNumber: number;
251
- }, {
252
- number: number;
253
- title: string;
254
- body: string | null | undefined;
255
- state: string;
256
- url: string;
257
- author: string | undefined;
258
- assignees: string[] | undefined;
259
- labels: (string | undefined)[];
260
- comments: number;
261
- createdAt: string;
262
- updatedAt: string;
263
- closedAt: string | null;
264
- }>;
265
- declare const createIssue: (octokit: Octokit, {
266
- needsApproval
267
- }?: ToolOptions) => ai.Tool<{
268
- owner: string;
269
- repo: string;
270
- title: string;
271
- body?: string | undefined;
272
- labels?: string[] | undefined;
273
- assignees?: string[] | undefined;
274
- }, {
275
- number: number;
276
- title: string;
277
- url: string;
278
- state: string;
279
- labels: (string | undefined)[];
280
- }>;
281
- declare const addIssueComment: (octokit: Octokit, {
282
- needsApproval
283
- }?: ToolOptions) => ai.Tool<{
284
- owner: string;
285
- repo: string;
286
- issueNumber: number;
287
- body: string;
288
- }, {
289
- id: number;
290
- url: string;
291
- body: string | undefined;
292
- author: string | undefined;
293
- createdAt: string;
294
- }>;
295
- declare const closeIssue: (octokit: Octokit, {
296
- needsApproval
297
- }?: ToolOptions) => ai.Tool<{
298
- owner: string;
299
- repo: string;
300
- issueNumber: number;
301
- stateReason: "completed" | "not_planned";
302
- }, {
303
- number: number;
304
- title: string;
305
- state: string;
306
- url: string;
307
- closedAt: string | null;
308
- }>;
309
- //#endregion
310
- //#region src/tools/search.d.ts
311
- declare const searchCode: (octokit: Octokit) => ai.Tool<{
312
- query: string;
313
- perPage: number;
314
- }, {
315
- totalCount: number;
316
- items: {
317
- name: string;
318
- path: string;
319
- url: string;
320
- repository: string;
321
- sha: string;
322
- }[];
323
- }>;
324
- declare const searchRepositories: (octokit: Octokit) => ai.Tool<{
325
- query: string;
326
- perPage: number;
327
- order: "asc" | "desc";
328
- sort?: "stars" | "forks" | "help-wanted-issues" | "updated" | undefined;
329
- }, {
330
- totalCount: number;
331
- items: {
332
- name: string;
333
- fullName: string;
334
- description: string | null;
335
- url: string;
336
- stars: number;
337
- forks: number;
338
- language: string | null;
339
- topics: string[] | undefined;
340
- }[];
341
- }>;
342
- //#endregion
343
- //#region src/tools/commits.d.ts
344
- declare const listCommits: (octokit: Octokit) => ai.Tool<{
345
- owner: string;
346
- repo: string;
347
- perPage: number;
348
- path?: string | undefined;
349
- sha?: string | undefined;
350
- author?: string | undefined;
351
- since?: string | undefined;
352
- until?: string | undefined;
353
- }, {
354
- sha: string;
355
- message: string;
356
- author: string | undefined;
357
- authorLogin: string | undefined;
358
- date: string | undefined;
359
- url: string;
360
- }[]>;
361
- declare const getCommit: (octokit: Octokit) => ai.Tool<{
362
- owner: string;
363
- repo: string;
364
- ref: string;
365
- }, {
366
- sha: string;
367
- message: string;
368
- author: string | undefined;
369
- authorLogin: string | undefined;
370
- date: string | undefined;
371
- url: string;
372
- stats: {
373
- additions: number | undefined;
374
- deletions: number | undefined;
375
- total: number | undefined;
376
- } | null;
377
- files: {
378
- filename: string;
379
- status: "added" | "removed" | "modified" | "renamed" | "copied" | "changed" | "unchanged";
380
- additions: number;
381
- deletions: number;
382
- patch: string | undefined;
383
- }[] | undefined;
384
- }>;
385
- //#endregion
386
- //#region src/agents.d.ts
387
- type AgentOptions = Omit<ToolLoopAgentSettings, 'model' | 'tools' | 'instructions'>;
388
- type CreateGithubAgentOptions = AgentOptions & {
389
- model: ToolLoopAgentSettings['model'];
390
- /**
391
- * GitHub personal access token.
392
- * Falls back to `process.env.GITHUB_TOKEN` when omitted.
393
- */
394
- token?: string;
395
- preset?: GithubToolPreset | GithubToolPreset[];
396
- requireApproval?: ApprovalConfig;
397
- instructions?: string;
398
- additionalInstructions?: string;
399
- };
400
- /**
401
- * Create a pre-configured GitHub agent powered by the AI SDK's `ToolLoopAgent`.
402
- *
403
- * Returns a `ToolLoopAgent` instance with `.generate()` and `.stream()` methods.
404
- *
405
- * @example
406
- * ```ts
407
- * import { createGithubAgent } from '@github-tools/sdk'
408
- *
409
- * const agent = createGithubAgent({
410
- * model: 'anthropic/claude-sonnet-4.6',
411
- * token: process.env.GITHUB_TOKEN!,
412
- * preset: 'code-review',
413
- * })
414
- *
415
- * const result = await agent.generate({ prompt: 'Review PR #42 on vercel/ai' })
416
- * ```
417
- */
418
- declare function createGithubAgent({
419
- token,
420
- preset,
421
- requireApproval,
422
- instructions,
423
- additionalInstructions,
424
- ...agentOptions
425
- }: CreateGithubAgentOptions): ToolLoopAgent<never, {}, never>;
426
- //#endregion
427
4
  //#region src/index.d.ts
428
- type GithubWriteToolName = 'createBranch' | 'forkRepository' | 'createRepository' | 'createOrUpdateFile' | 'createPullRequest' | 'mergePullRequest' | 'addPullRequestComment' | 'createIssue' | 'addIssueComment' | 'closeIssue';
5
+ type GithubWriteToolName = 'createBranch' | 'forkRepository' | 'createRepository' | 'createOrUpdateFile' | 'createPullRequest' | 'mergePullRequest' | 'addPullRequestComment' | 'createPullRequestReview' | 'createIssue' | 'addIssueComment' | 'closeIssue' | 'addLabels' | 'removeLabel' | 'createGist' | 'updateGist' | 'deleteGist' | 'createGistComment' | 'triggerWorkflow' | 'cancelWorkflowRun' | 'rerunWorkflowRun';
429
6
  /**
430
7
  * Whether write operations require user approval.
431
8
  * - `true` — all write tools need approval (default)
@@ -449,9 +26,10 @@ type ApprovalConfig = boolean | Partial<Record<GithubWriteToolName, boolean>>;
449
26
  * - `'code-review'` — Review PRs: read PRs, file content, commits, and post comments
450
27
  * - `'issue-triage'` — Triage issues: read/create/close issues, search, and comment
451
28
  * - `'repo-explorer'` — Explore repos: read-only access to repos, branches, code, and search
29
+ * - `'ci-ops'` — CI operations: monitor and manage GitHub Actions workflows
452
30
  * - `'maintainer'` — Full maintenance: all read + create PRs, merge, manage issues
453
31
  */
454
- type GithubToolPreset = 'code-review' | 'issue-triage' | 'repo-explorer' | 'maintainer';
32
+ type GithubToolPreset = 'code-review' | 'issue-triage' | 'repo-explorer' | 'ci-ops' | 'maintainer';
455
33
  type GithubToolsOptions = {
456
34
  /**
457
35
  * GitHub personal access token.
@@ -459,6 +37,22 @@ type GithubToolsOptions = {
459
37
  */
460
38
  token?: string;
461
39
  requireApproval?: ApprovalConfig;
40
+ /**
41
+ * Per-tool overrides for customizing tool behavior (description, title, needsApproval, etc.)
42
+ * without changing the underlying implementation. `execute`, `inputSchema`, and `outputSchema`
43
+ * cannot be overridden.
44
+ *
45
+ * @example
46
+ * ```ts
47
+ * createGithubTools({
48
+ * overrides: {
49
+ * deleteGist: { needsApproval: false },
50
+ * listIssues: { description: 'List bugs for the current sprint' },
51
+ * }
52
+ * })
53
+ * ```
54
+ */
55
+ overrides?: Partial<Record<string, ToolOverrides>>;
462
56
  /**
463
57
  * Restrict the returned tools to a predefined preset.
464
58
  * Omit to get all tools.
@@ -507,7 +101,8 @@ type GithubToolsOptions = {
507
101
  declare function createGithubTools({
508
102
  token,
509
103
  requireApproval,
510
- preset
104
+ preset,
105
+ overrides
511
106
  }?: GithubToolsOptions): Partial<{
512
107
  getRepository: ai.Tool<{
513
108
  owner: string;
@@ -712,6 +307,43 @@ declare function createGithubTools({
712
307
  patch: string | undefined;
713
308
  }[] | undefined;
714
309
  }>;
310
+ getBlame: ai.Tool<{
311
+ owner: string;
312
+ repo: string;
313
+ path: string;
314
+ ref?: string | undefined;
315
+ line?: number | undefined;
316
+ lineStart?: number | undefined;
317
+ lineEnd?: number | undefined;
318
+ }, {
319
+ error: string;
320
+ ref?: undefined;
321
+ tipSha?: undefined;
322
+ path?: undefined;
323
+ rangeCount?: undefined;
324
+ ranges?: undefined;
325
+ } | {
326
+ ref: string;
327
+ tipSha: string;
328
+ path: string;
329
+ rangeCount: number;
330
+ ranges: {
331
+ startingLine: number;
332
+ endingLine: number;
333
+ age: number;
334
+ commit: {
335
+ sha: string;
336
+ abbreviatedSha: string;
337
+ messageHeadline: string;
338
+ authoredDate: string;
339
+ url: string;
340
+ authorName: string | null;
341
+ authorEmail: string | null;
342
+ authorLogin: string | null;
343
+ };
344
+ }[];
345
+ error?: undefined;
346
+ }>;
715
347
  createBranch: ai.Tool<{
716
348
  owner: string;
717
349
  repo: string;
@@ -814,6 +446,54 @@ declare function createGithubTools({
814
446
  author: string | undefined;
815
447
  createdAt: string;
816
448
  }>;
449
+ listPullRequestFiles: ai.Tool<{
450
+ owner: string;
451
+ repo: string;
452
+ pullNumber: number;
453
+ perPage: number;
454
+ page: number;
455
+ }, {
456
+ filename: string;
457
+ status: "added" | "removed" | "modified" | "renamed" | "copied" | "changed" | "unchanged";
458
+ additions: number;
459
+ deletions: number;
460
+ changes: number;
461
+ patch: string | undefined;
462
+ }[]>;
463
+ listPullRequestReviews: ai.Tool<{
464
+ owner: string;
465
+ repo: string;
466
+ pullNumber: number;
467
+ perPage: number;
468
+ page: number;
469
+ }, {
470
+ id: number;
471
+ state: string;
472
+ body: string;
473
+ author: string | undefined;
474
+ url: string;
475
+ submittedAt: string | undefined;
476
+ }[]>;
477
+ createPullRequestReview: ai.Tool<{
478
+ owner: string;
479
+ repo: string;
480
+ pullNumber: number;
481
+ event: "APPROVE" | "REQUEST_CHANGES" | "COMMENT";
482
+ body?: string | undefined;
483
+ comments?: {
484
+ path: string;
485
+ body: string;
486
+ line?: number | undefined;
487
+ side?: "LEFT" | "RIGHT" | undefined;
488
+ }[] | undefined;
489
+ }, {
490
+ id: number;
491
+ state: string;
492
+ body: string;
493
+ url: string;
494
+ author: string | undefined;
495
+ submittedAt: string | undefined;
496
+ }>;
817
497
  createIssue: ai.Tool<{
818
498
  owner: string;
819
499
  repo: string;
@@ -852,8 +532,246 @@ declare function createGithubTools({
852
532
  url: string;
853
533
  closedAt: string | null;
854
534
  }>;
535
+ listLabels: ai.Tool<{
536
+ owner: string;
537
+ repo: string;
538
+ perPage: number;
539
+ page: number;
540
+ }, {
541
+ name: string;
542
+ color: string;
543
+ description: string | null;
544
+ }[]>;
545
+ addLabels: ai.Tool<{
546
+ owner: string;
547
+ repo: string;
548
+ issueNumber: number;
549
+ labels: string[];
550
+ }, {
551
+ name: string;
552
+ color: string;
553
+ description: string | null;
554
+ }[]>;
555
+ removeLabel: ai.Tool<{
556
+ owner: string;
557
+ repo: string;
558
+ issueNumber: number;
559
+ label: string;
560
+ }, {
561
+ removed: boolean;
562
+ label: string;
563
+ issueNumber: number;
564
+ }>;
565
+ listGists: ai.Tool<{
566
+ perPage: number;
567
+ page: number;
568
+ username?: string | undefined;
569
+ }, {
570
+ id: string;
571
+ description: string | null;
572
+ public: boolean;
573
+ url: string;
574
+ files: string[];
575
+ owner: string | undefined;
576
+ comments: number;
577
+ createdAt: string;
578
+ updatedAt: string;
579
+ }[]>;
580
+ getGist: ai.Tool<{
581
+ gistId: string;
582
+ }, {
583
+ id: string | undefined;
584
+ description: string | null | undefined;
585
+ public: boolean | undefined;
586
+ url: string | undefined;
587
+ owner: string | undefined;
588
+ files: {
589
+ filename: string | undefined;
590
+ language: string | undefined;
591
+ size: number | undefined;
592
+ content: string | undefined;
593
+ }[];
594
+ comments: number | undefined;
595
+ createdAt: string | undefined;
596
+ updatedAt: string | undefined;
597
+ }>;
598
+ listGistComments: ai.Tool<{
599
+ gistId: string;
600
+ perPage: number;
601
+ page: number;
602
+ }, {
603
+ id: number;
604
+ body: string;
605
+ author: string | undefined;
606
+ url: string;
607
+ createdAt: string;
608
+ updatedAt: string;
609
+ }[]>;
610
+ createGist: ai.Tool<{
611
+ files: Record<string, {
612
+ content: string;
613
+ }>;
614
+ isPublic: boolean;
615
+ description?: string | undefined;
616
+ }, {
617
+ id: string | undefined;
618
+ description: string | null | undefined;
619
+ public: boolean | undefined;
620
+ url: string | undefined;
621
+ files: string[];
622
+ owner: string | undefined;
623
+ }>;
624
+ updateGist: ai.Tool<{
625
+ gistId: string;
626
+ description?: string | undefined;
627
+ files?: Record<string, {
628
+ content: string;
629
+ }> | undefined;
630
+ filesToDelete?: string[] | undefined;
631
+ }, {
632
+ id: string | undefined;
633
+ description: string | null | undefined;
634
+ url: string | undefined;
635
+ files: string[];
636
+ }>;
637
+ deleteGist: ai.Tool<{
638
+ gistId: string;
639
+ }, {
640
+ deleted: boolean;
641
+ gistId: string;
642
+ }>;
643
+ createGistComment: ai.Tool<{
644
+ gistId: string;
645
+ body: string;
646
+ }, {
647
+ id: number;
648
+ url: string;
649
+ body: string;
650
+ author: string | undefined;
651
+ createdAt: string;
652
+ }>;
653
+ listWorkflows: ai.Tool<{
654
+ owner: string;
655
+ repo: string;
656
+ perPage: number;
657
+ page: number;
658
+ }, {
659
+ totalCount: number;
660
+ workflows: {
661
+ id: number;
662
+ name: string;
663
+ path: string;
664
+ state: "active" | "deleted" | "disabled_fork" | "disabled_inactivity" | "disabled_manually";
665
+ url: string;
666
+ createdAt: string;
667
+ updatedAt: string;
668
+ }[];
669
+ }>;
670
+ listWorkflowRuns: ai.Tool<{
671
+ owner: string;
672
+ repo: string;
673
+ perPage: number;
674
+ page: number;
675
+ workflowId?: string | number | undefined;
676
+ branch?: string | undefined;
677
+ event?: string | undefined;
678
+ status?: "success" | "completed" | "action_required" | "cancelled" | "failure" | "neutral" | "skipped" | "stale" | "timed_out" | "in_progress" | "queued" | "requested" | "waiting" | "pending" | undefined;
679
+ }, {
680
+ totalCount: number;
681
+ runs: {
682
+ id: number;
683
+ name: string | null | undefined;
684
+ status: string | null;
685
+ conclusion: string | null;
686
+ branch: string | null;
687
+ event: string;
688
+ url: string;
689
+ actor: string | undefined;
690
+ createdAt: string;
691
+ updatedAt: string;
692
+ runNumber: number;
693
+ runAttempt: number | undefined;
694
+ }[];
695
+ }>;
696
+ getWorkflowRun: ai.Tool<{
697
+ owner: string;
698
+ repo: string;
699
+ runId: number;
700
+ }, {
701
+ id: number;
702
+ name: string | null | undefined;
703
+ status: string | null;
704
+ conclusion: string | null;
705
+ branch: string | null;
706
+ sha: string;
707
+ event: string;
708
+ url: string;
709
+ actor: string | undefined;
710
+ runNumber: number;
711
+ runAttempt: number | undefined;
712
+ createdAt: string;
713
+ updatedAt: string;
714
+ runStartedAt: string | undefined;
715
+ }>;
716
+ listWorkflowJobs: ai.Tool<{
717
+ owner: string;
718
+ repo: string;
719
+ runId: number;
720
+ filter: "all" | "latest";
721
+ perPage: number;
722
+ page: number;
723
+ }, {
724
+ totalCount: number;
725
+ jobs: {
726
+ id: number;
727
+ name: string;
728
+ status: "completed" | "in_progress" | "queued" | "requested" | "waiting" | "pending";
729
+ conclusion: "success" | "action_required" | "cancelled" | "failure" | "neutral" | "skipped" | "timed_out" | null;
730
+ url: string | null;
731
+ startedAt: string;
732
+ completedAt: string | null;
733
+ runnerName: string | null;
734
+ steps: {
735
+ name: string;
736
+ status: "completed" | "in_progress" | "queued";
737
+ conclusion: string | null;
738
+ number: number;
739
+ startedAt: string | null | undefined;
740
+ completedAt: string | null | undefined;
741
+ }[] | undefined;
742
+ }[];
743
+ }>;
744
+ triggerWorkflow: ai.Tool<{
745
+ owner: string;
746
+ repo: string;
747
+ workflowId: string | number;
748
+ ref: string;
749
+ inputs?: Record<string, string> | undefined;
750
+ }, {
751
+ triggered: boolean;
752
+ workflowId: string | number;
753
+ ref: string;
754
+ }>;
755
+ cancelWorkflowRun: ai.Tool<{
756
+ owner: string;
757
+ repo: string;
758
+ runId: number;
759
+ }, {
760
+ cancelled: boolean;
761
+ runId: number;
762
+ }>;
763
+ rerunWorkflowRun: ai.Tool<{
764
+ owner: string;
765
+ repo: string;
766
+ runId: number;
767
+ onlyFailedJobs: boolean;
768
+ }, {
769
+ rerun: boolean;
770
+ runId: number;
771
+ onlyFailedJobs: boolean;
772
+ }>;
855
773
  }>;
856
774
  type GithubTools = ReturnType<typeof createGithubTools>;
857
775
  //#endregion
858
- export { ApprovalConfig, type CreateGithubAgentOptions, GithubToolPreset, GithubTools, GithubToolsOptions, GithubWriteToolName, type Octokit, type ToolOptions, addIssueComment, addPullRequestComment, closeIssue, createBranch, createGithubAgent, createGithubTools, createIssue, createOctokit, createOrUpdateFile, createPullRequest, createRepository, forkRepository, getCommit, getFileContent, getIssue, getPullRequest, getRepository, listBranches, listCommits, listIssues, listPullRequests, mergePullRequest, searchCode, searchRepositories };
776
+ export { ApprovalConfig, type CreateGithubAgentOptions, GithubToolPreset, GithubTools, GithubToolsOptions, GithubWriteToolName, type Octokit, type ToolOptions, type ToolOverrides, addIssueComment, addLabels, addPullRequestComment, cancelWorkflowRun, closeIssue, createBranch, createGist, createGistComment, createGithubAgent, createGithubTools, createIssue, createOctokit, createOrUpdateFile, createPullRequest, createPullRequestReview, createRepository, deleteGist, forkRepository, getBlame, getCommit, getFileContent, getGist, getIssue, getPullRequest, getRepository, getWorkflowRun, listBranches, listCommits, listGistComments, listGists, listIssues, listLabels, listPullRequestFiles, listPullRequestReviews, listPullRequests, listWorkflowJobs, listWorkflowRuns, listWorkflows, mergePullRequest, removeLabel, rerunWorkflowRun, searchCode, searchRepositories, triggerWorkflow, updateGist };
859
777
  //# sourceMappingURL=index.d.mts.map