@github-tools/sdk 1.6.0 → 1.8.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.
Files changed (39) hide show
  1. package/README.md +150 -10
  2. package/dist/connect/eve.d.mts +17 -0
  3. package/dist/connect/eve.d.mts.map +1 -0
  4. package/dist/connect/eve.mjs +27 -0
  5. package/dist/connect/eve.mjs.map +1 -0
  6. package/dist/connect.d.mts +46 -0
  7. package/dist/connect.d.mts.map +1 -0
  8. package/dist/connect.mjs +22 -0
  9. package/dist/connect.mjs.map +1 -0
  10. package/dist/eve-B-LChKzS.mjs +526 -0
  11. package/dist/eve-B-LChKzS.mjs.map +1 -0
  12. package/dist/eve.d.mts +125 -0
  13. package/dist/eve.d.mts.map +1 -0
  14. package/dist/eve.mjs +3 -0
  15. package/dist/index-SZCaP-y9.d.mts +220 -0
  16. package/dist/index-SZCaP-y9.d.mts.map +1 -0
  17. package/dist/index.d.mts +3 -2
  18. package/dist/index.mjs +3 -2
  19. package/dist/src-CfzZfU82.mjs +812 -0
  20. package/dist/src-CfzZfU82.mjs.map +1 -0
  21. package/dist/token-CW8lQBND.mjs +100 -0
  22. package/dist/token-CW8lQBND.mjs.map +1 -0
  23. package/dist/tool-types-C0kszIwd.d.mts +249 -0
  24. package/dist/tool-types-C0kszIwd.d.mts.map +1 -0
  25. package/dist/types-BTanS_dq.d.mts +49 -0
  26. package/dist/types-BTanS_dq.d.mts.map +1 -0
  27. package/dist/types-DOeq0Iia.d.mts +27 -0
  28. package/dist/types-DOeq0Iia.d.mts.map +1 -0
  29. package/dist/workflow.d.mts +53 -730
  30. package/dist/workflow.d.mts.map +1 -1
  31. package/dist/workflow.mjs +14 -74
  32. package/dist/workflow.mjs.map +1 -1
  33. package/dist/write-tools-Dx9LfYlU.mjs +1840 -0
  34. package/dist/write-tools-Dx9LfYlU.mjs.map +1 -0
  35. package/package.json +40 -8
  36. package/dist/index-ikP-LT-3.d.mts +0 -1634
  37. package/dist/index-ikP-LT-3.d.mts.map +0 -1
  38. package/dist/src--pAdGYqY.mjs +0 -1961
  39. package/dist/src--pAdGYqY.mjs.map +0 -1
@@ -1,1634 +0,0 @@
1
- import * as _$ai from "ai";
2
- import { Tool, ToolLoopAgent, ToolLoopAgentSettings } from "ai";
3
- import { Octokit, Octokit as Octokit$1 } from "octokit";
4
-
5
- //#region src/types.d.ts
6
- type ToolOptions = {
7
- needsApproval?: boolean;
8
- };
9
- /**
10
- * Identity for commit author or committer.
11
- */
12
- type CommitIdentity = {
13
- name: string;
14
- email: string;
15
- };
16
- /**
17
- * Options for commit-creating tools (createOrUpdateFile, mergePullRequest).
18
- */
19
- type CommitToolOptions = ToolOptions & {
20
- /**
21
- * The author of the commit, person who wrote the code patch.
22
- * Falls back to the authenticated user when omitted.
23
- */
24
- author?: CommitIdentity;
25
- /**
26
- * The committer of the commit, person who applied the commit.
27
- * Falls back to the authenticated user when omitted.
28
- */
29
- committer?: CommitIdentity;
30
- /**
31
- * Co-authors to attribute on commits.
32
- * Added as "Co-authored-by" trailers to commit messages.
33
- */
34
- coAuthors?: CommitIdentity[];
35
- };
36
- /**
37
- * Per-tool overrides for customizing tool behavior without changing the underlying implementation.
38
- * Properties like `execute`, `inputSchema`, and `outputSchema` are intentionally excluded.
39
- */
40
- type ToolOverrides = Partial<Pick<Tool, 'description' | 'needsApproval' | 'onInputAvailable' | 'onInputDelta' | 'onInputStart' | 'providerOptions' | 'strict' | 'title' | 'toModelOutput'>>;
41
- //#endregion
42
- //#region src/client.d.ts
43
- declare function createOctokit(token: string): Octokit;
44
- //#endregion
45
- //#region src/tools/repository.d.ts
46
- declare const getRepository: (token: string) => _$ai.Tool<{
47
- owner: string;
48
- repo: string;
49
- }, {
50
- name: string;
51
- fullName: string;
52
- description: string | null;
53
- url: string;
54
- defaultBranch: string;
55
- stars: number;
56
- forks: number;
57
- openIssues: number;
58
- language: string | null;
59
- private: boolean;
60
- createdAt: string;
61
- updatedAt: string;
62
- }>;
63
- declare const listBranches: (token: string) => _$ai.Tool<{
64
- owner: string;
65
- repo: string;
66
- perPage: number;
67
- }, {
68
- name: string;
69
- sha: string;
70
- protected: boolean;
71
- }[]>;
72
- declare const getFileContent: (token: string) => _$ai.Tool<{
73
- owner: string;
74
- repo: string;
75
- path: string;
76
- ref?: string | undefined;
77
- }, {
78
- type: string;
79
- entries: {
80
- name: string;
81
- type: "file" | "dir" | "submodule" | "symlink";
82
- path: string;
83
- }[];
84
- path?: undefined;
85
- sha?: undefined;
86
- size?: undefined;
87
- content?: undefined;
88
- } | {
89
- type: "submodule" | "symlink";
90
- path: string;
91
- entries?: undefined;
92
- sha?: undefined;
93
- size?: undefined;
94
- content?: undefined;
95
- } | {
96
- type: string;
97
- path: string;
98
- sha: string;
99
- size: number;
100
- content: string;
101
- entries?: undefined;
102
- }>;
103
- declare const createBranch: (token: string, {
104
- needsApproval
105
- }?: ToolOptions) => _$ai.Tool<{
106
- owner: string;
107
- repo: string;
108
- branch: string;
109
- from?: string | undefined;
110
- }, {
111
- ref: string;
112
- sha: string;
113
- url: string;
114
- }>;
115
- declare const forkRepository: (token: string, {
116
- needsApproval
117
- }?: ToolOptions) => _$ai.Tool<{
118
- owner: string;
119
- repo: string;
120
- organization?: string | undefined;
121
- name?: string | undefined;
122
- }, {
123
- name: string;
124
- fullName: string;
125
- url: string;
126
- cloneUrl: string;
127
- sshUrl: string;
128
- defaultBranch: string;
129
- private: boolean;
130
- parent: {
131
- fullName: string;
132
- url: string;
133
- } | null;
134
- }>;
135
- declare const createRepository: (token: string, {
136
- needsApproval
137
- }?: ToolOptions) => _$ai.Tool<{
138
- name: string;
139
- isPrivate: boolean;
140
- autoInit: boolean;
141
- description?: string | undefined;
142
- gitignoreTemplate?: string | undefined;
143
- licenseTemplate?: string | undefined;
144
- org?: string | undefined;
145
- }, {
146
- name: string;
147
- fullName: string;
148
- description: string | null;
149
- url: string;
150
- cloneUrl: string;
151
- sshUrl: string;
152
- defaultBranch: string;
153
- private: boolean;
154
- createdAt: string;
155
- }>;
156
- declare const createOrUpdateFile: (token: string, {
157
- needsApproval,
158
- author,
159
- committer,
160
- coAuthors
161
- }?: CommitToolOptions) => _$ai.Tool<{
162
- owner: string;
163
- repo: string;
164
- path: string;
165
- message: string;
166
- content: string;
167
- branch?: string | undefined;
168
- sha?: string | undefined;
169
- }, {
170
- path: string | undefined;
171
- sha: string | undefined;
172
- commitSha: string | undefined;
173
- commitUrl: string | undefined;
174
- }>;
175
- //#endregion
176
- //#region src/tools/pull-requests.d.ts
177
- type MergeToolOptions = ToolOptions & {
178
- coAuthors?: CommitIdentity[];
179
- };
180
- declare const listPullRequests: (token: string) => _$ai.Tool<{
181
- owner: string;
182
- repo: string;
183
- state: "open" | "closed" | "all";
184
- perPage: number;
185
- }, {
186
- number: number;
187
- title: string;
188
- state: string;
189
- url: string;
190
- author: string | undefined;
191
- branch: string;
192
- base: string;
193
- draft: boolean | undefined;
194
- createdAt: string;
195
- updatedAt: string;
196
- }[]>;
197
- declare const getPullRequest: (token: string) => _$ai.Tool<{
198
- owner: string;
199
- repo: string;
200
- pullNumber: number;
201
- }, {
202
- number: number;
203
- title: string;
204
- body: string | null;
205
- state: "open" | "closed";
206
- url: string;
207
- author: string;
208
- branch: string;
209
- base: string;
210
- draft: boolean | undefined;
211
- merged: boolean;
212
- mergeable: boolean | null;
213
- additions: number;
214
- deletions: number;
215
- changedFiles: number;
216
- createdAt: string;
217
- updatedAt: string;
218
- mergedAt: string | null;
219
- }>;
220
- declare const createPullRequest: (token: string, {
221
- needsApproval
222
- }?: ToolOptions) => _$ai.Tool<{
223
- owner: string;
224
- repo: string;
225
- title: string;
226
- head: string;
227
- base: string;
228
- draft: boolean;
229
- body?: string | undefined;
230
- }, {
231
- number: number;
232
- title: string;
233
- url: string;
234
- state: "open" | "closed";
235
- draft: boolean | undefined;
236
- branch: string;
237
- base: string;
238
- }>;
239
- declare const mergePullRequest: (token: string, {
240
- needsApproval,
241
- coAuthors
242
- }?: MergeToolOptions) => _$ai.Tool<{
243
- owner: string;
244
- repo: string;
245
- pullNumber: number;
246
- mergeMethod: "merge" | "squash" | "rebase";
247
- commitTitle?: string | undefined;
248
- commitMessage?: string | undefined;
249
- }, {
250
- merged: boolean;
251
- message: string;
252
- sha: string;
253
- }>;
254
- declare const addPullRequestComment: (token: string, {
255
- needsApproval
256
- }?: ToolOptions) => _$ai.Tool<{
257
- owner: string;
258
- repo: string;
259
- pullNumber: number;
260
- body: string;
261
- }, {
262
- id: number;
263
- url: string;
264
- body: string | undefined;
265
- author: string | undefined;
266
- createdAt: string;
267
- }>;
268
- declare const listPullRequestFiles: (token: string) => _$ai.Tool<{
269
- owner: string;
270
- repo: string;
271
- pullNumber: number;
272
- perPage: number;
273
- page: number;
274
- }, {
275
- filename: string;
276
- status: "added" | "removed" | "modified" | "renamed" | "copied" | "changed" | "unchanged";
277
- additions: number;
278
- deletions: number;
279
- changes: number;
280
- patch: string | undefined;
281
- }[]>;
282
- declare const listPullRequestReviews: (token: string) => _$ai.Tool<{
283
- owner: string;
284
- repo: string;
285
- pullNumber: number;
286
- perPage: number;
287
- page: number;
288
- }, {
289
- id: number;
290
- state: string;
291
- body: string;
292
- author: string | undefined;
293
- url: string;
294
- submittedAt: string | undefined;
295
- }[]>;
296
- declare const createPullRequestReview: (token: string, {
297
- needsApproval
298
- }?: ToolOptions) => _$ai.Tool<{
299
- owner: string;
300
- repo: string;
301
- pullNumber: number;
302
- event: "APPROVE" | "REQUEST_CHANGES" | "COMMENT";
303
- body?: string | undefined;
304
- comments?: {
305
- path: string;
306
- body: string;
307
- line?: number | undefined;
308
- side?: "LEFT" | "RIGHT" | undefined;
309
- }[] | undefined;
310
- }, {
311
- id: number;
312
- state: string;
313
- body: string;
314
- url: string;
315
- author: string | undefined;
316
- submittedAt: string | undefined;
317
- }>;
318
- //#endregion
319
- //#region src/tools/issues.d.ts
320
- declare const listIssues: (token: string) => _$ai.Tool<{
321
- owner: string;
322
- repo: string;
323
- state: "open" | "closed" | "all";
324
- perPage: number;
325
- labels?: string | undefined;
326
- }, {
327
- number: number;
328
- title: string;
329
- state: string;
330
- url: string;
331
- author: string | undefined;
332
- labels: (string | undefined)[];
333
- createdAt: string;
334
- updatedAt: string;
335
- }[]>;
336
- declare const getIssue: (token: string) => _$ai.Tool<{
337
- owner: string;
338
- repo: string;
339
- issueNumber: number;
340
- }, {
341
- number: number;
342
- title: string;
343
- body: string | null | undefined;
344
- state: string;
345
- url: string;
346
- author: string | undefined;
347
- assignees: string[] | undefined;
348
- labels: (string | undefined)[];
349
- comments: number;
350
- createdAt: string;
351
- updatedAt: string;
352
- closedAt: string | null;
353
- }>;
354
- declare const createIssue: (token: string, {
355
- needsApproval
356
- }?: ToolOptions) => _$ai.Tool<{
357
- owner: string;
358
- repo: string;
359
- title: string;
360
- body?: string | undefined;
361
- labels?: string[] | undefined;
362
- assignees?: string[] | undefined;
363
- }, {
364
- number: number;
365
- title: string;
366
- url: string;
367
- state: string;
368
- labels: (string | undefined)[];
369
- }>;
370
- declare const addIssueComment: (token: string, {
371
- needsApproval
372
- }?: ToolOptions) => _$ai.Tool<{
373
- owner: string;
374
- repo: string;
375
- issueNumber: number;
376
- body: string;
377
- }, {
378
- id: number;
379
- url: string;
380
- body: string | undefined;
381
- author: string | undefined;
382
- createdAt: string;
383
- }>;
384
- declare const closeIssue: (token: string, {
385
- needsApproval
386
- }?: ToolOptions) => _$ai.Tool<{
387
- owner: string;
388
- repo: string;
389
- issueNumber: number;
390
- stateReason: "completed" | "not_planned";
391
- }, {
392
- number: number;
393
- title: string;
394
- state: string;
395
- url: string;
396
- closedAt: string | null;
397
- }>;
398
- declare const listLabels: (token: string) => _$ai.Tool<{
399
- owner: string;
400
- repo: string;
401
- perPage: number;
402
- page: number;
403
- }, {
404
- name: string;
405
- color: string;
406
- description: string | null;
407
- }[]>;
408
- declare const addLabels: (token: string, {
409
- needsApproval
410
- }?: ToolOptions) => _$ai.Tool<{
411
- owner: string;
412
- repo: string;
413
- issueNumber: number;
414
- labels: string[];
415
- }, {
416
- name: string;
417
- color: string;
418
- description: string | null;
419
- }[]>;
420
- declare const removeLabel: (token: string, {
421
- needsApproval
422
- }?: ToolOptions) => _$ai.Tool<{
423
- owner: string;
424
- repo: string;
425
- issueNumber: number;
426
- label: string;
427
- }, {
428
- removed: boolean;
429
- label: string;
430
- issueNumber: number;
431
- }>;
432
- //#endregion
433
- //#region src/tools/search.d.ts
434
- declare const searchCode: (token: string) => _$ai.Tool<{
435
- query: string;
436
- perPage: number;
437
- }, {
438
- totalCount: number;
439
- items: {
440
- name: string;
441
- path: string;
442
- url: string;
443
- repository: string;
444
- sha: string;
445
- }[];
446
- }>;
447
- declare const searchRepositories: (token: string) => _$ai.Tool<{
448
- query: string;
449
- perPage: number;
450
- order: "asc" | "desc";
451
- sort?: "stars" | "forks" | "help-wanted-issues" | "updated" | undefined;
452
- }, {
453
- totalCount: number;
454
- items: {
455
- name: string;
456
- fullName: string;
457
- description: string | null;
458
- url: string;
459
- stars: number;
460
- forks: number;
461
- language: string | null;
462
- topics: string[] | undefined;
463
- }[];
464
- }>;
465
- //#endregion
466
- //#region src/tools/commits.d.ts
467
- declare const listCommits: (token: string) => _$ai.Tool<{
468
- owner: string;
469
- repo: string;
470
- perPage: number;
471
- path?: string | undefined;
472
- sha?: string | undefined;
473
- author?: string | undefined;
474
- since?: string | undefined;
475
- until?: string | undefined;
476
- }, {
477
- sha: string;
478
- message: string;
479
- author: string | undefined;
480
- authorLogin: string | undefined;
481
- date: string | undefined;
482
- url: string;
483
- }[]>;
484
- declare const getCommit: (token: string) => _$ai.Tool<{
485
- owner: string;
486
- repo: string;
487
- ref: string;
488
- }, {
489
- sha: string;
490
- message: string;
491
- author: string | undefined;
492
- authorLogin: string | undefined;
493
- date: string | undefined;
494
- url: string;
495
- stats: {
496
- additions: number | undefined;
497
- deletions: number | undefined;
498
- total: number | undefined;
499
- } | null;
500
- files: {
501
- filename: string;
502
- status: "added" | "removed" | "modified" | "renamed" | "copied" | "changed" | "unchanged";
503
- additions: number;
504
- deletions: number;
505
- patch: string | undefined;
506
- }[] | undefined;
507
- }>;
508
- declare const getBlame: (token: string) => _$ai.Tool<{
509
- owner: string;
510
- repo: string;
511
- path: string;
512
- ref?: string | undefined;
513
- line?: number | undefined;
514
- lineStart?: number | undefined;
515
- lineEnd?: number | undefined;
516
- }, {
517
- error: string;
518
- ref?: undefined;
519
- tipSha?: undefined;
520
- path?: undefined;
521
- rangeCount?: undefined;
522
- ranges?: undefined;
523
- } | {
524
- ref: string;
525
- tipSha: string;
526
- path: string;
527
- rangeCount: number;
528
- ranges: {
529
- startingLine: number;
530
- endingLine: number;
531
- age: number;
532
- commit: {
533
- sha: string;
534
- abbreviatedSha: string;
535
- messageHeadline: string;
536
- authoredDate: string;
537
- url: string;
538
- authorName: string | null;
539
- authorEmail: string | null;
540
- authorLogin: string | null;
541
- };
542
- }[];
543
- error?: undefined;
544
- }>;
545
- //#endregion
546
- //#region src/tools/gists.d.ts
547
- declare const listGists: (token: string) => _$ai.Tool<{
548
- perPage: number;
549
- page: number;
550
- username?: string | undefined;
551
- }, {
552
- id: string;
553
- description: string | null;
554
- public: boolean;
555
- url: string;
556
- files: string[];
557
- owner: string | undefined;
558
- comments: number;
559
- createdAt: string;
560
- updatedAt: string;
561
- }[]>;
562
- declare const getGist: (token: string) => _$ai.Tool<{
563
- gistId: string;
564
- }, {
565
- id: string | undefined;
566
- description: string | null | undefined;
567
- public: boolean | undefined;
568
- url: string | undefined;
569
- owner: string | undefined;
570
- files: {
571
- filename: string | undefined;
572
- language: string | undefined;
573
- size: number | undefined;
574
- content: string | undefined;
575
- }[];
576
- comments: number | undefined;
577
- createdAt: string | undefined;
578
- updatedAt: string | undefined;
579
- }>;
580
- declare const listGistComments: (token: string) => _$ai.Tool<{
581
- gistId: string;
582
- perPage: number;
583
- page: number;
584
- }, {
585
- id: number;
586
- body: string;
587
- author: string | undefined;
588
- url: string;
589
- createdAt: string;
590
- updatedAt: string;
591
- }[]>;
592
- declare const createGist: (token: string, {
593
- needsApproval
594
- }?: ToolOptions) => _$ai.Tool<{
595
- files: Record<string, {
596
- content: string;
597
- }>;
598
- isPublic: boolean;
599
- description?: string | undefined;
600
- }, {
601
- id: string | undefined;
602
- description: string | null | undefined;
603
- public: boolean | undefined;
604
- url: string | undefined;
605
- files: string[];
606
- owner: string | undefined;
607
- }>;
608
- declare const updateGist: (token: string, {
609
- needsApproval
610
- }?: ToolOptions) => _$ai.Tool<{
611
- gistId: string;
612
- description?: string | undefined;
613
- files?: Record<string, {
614
- content: string;
615
- }> | undefined;
616
- filesToDelete?: string[] | undefined;
617
- }, {
618
- id: string | undefined;
619
- description: string | null | undefined;
620
- url: string | undefined;
621
- files: string[];
622
- }>;
623
- declare const deleteGist: (token: string, {
624
- needsApproval
625
- }?: ToolOptions) => _$ai.Tool<{
626
- gistId: string;
627
- }, {
628
- deleted: boolean;
629
- gistId: string;
630
- }>;
631
- declare const createGistComment: (token: string, {
632
- needsApproval
633
- }?: ToolOptions) => _$ai.Tool<{
634
- gistId: string;
635
- body: string;
636
- }, {
637
- id: number;
638
- url: string;
639
- body: string;
640
- author: string | undefined;
641
- createdAt: string;
642
- }>;
643
- //#endregion
644
- //#region src/tools/workflows.d.ts
645
- declare const listWorkflows: (token: string) => _$ai.Tool<{
646
- owner: string;
647
- repo: string;
648
- perPage: number;
649
- page: number;
650
- }, {
651
- totalCount: number;
652
- workflows: {
653
- id: number;
654
- name: string;
655
- path: string;
656
- state: "active" | "deleted" | "disabled_fork" | "disabled_inactivity" | "disabled_manually";
657
- url: string;
658
- createdAt: string;
659
- updatedAt: string;
660
- }[];
661
- }>;
662
- declare const listWorkflowRuns: (token: string) => _$ai.Tool<{
663
- owner: string;
664
- repo: string;
665
- perPage: number;
666
- page: number;
667
- workflowId?: string | number | undefined;
668
- branch?: string | undefined;
669
- event?: string | undefined;
670
- status?: "success" | "completed" | "action_required" | "cancelled" | "failure" | "neutral" | "skipped" | "stale" | "timed_out" | "in_progress" | "queued" | "requested" | "waiting" | "pending" | undefined;
671
- }, {
672
- totalCount: number;
673
- runs: {
674
- id: number;
675
- name: string | null | undefined;
676
- status: string | null;
677
- conclusion: string | null;
678
- branch: string | null;
679
- event: string;
680
- url: string;
681
- actor: string | undefined;
682
- createdAt: string;
683
- updatedAt: string;
684
- runNumber: number;
685
- runAttempt: number | undefined;
686
- }[];
687
- }>;
688
- declare const getWorkflowRun: (token: string) => _$ai.Tool<{
689
- owner: string;
690
- repo: string;
691
- runId: number;
692
- }, {
693
- id: number;
694
- name: string | null | undefined;
695
- status: string | null;
696
- conclusion: string | null;
697
- branch: string | null;
698
- sha: string;
699
- event: string;
700
- url: string;
701
- actor: string | undefined;
702
- runNumber: number;
703
- runAttempt: number | undefined;
704
- createdAt: string;
705
- updatedAt: string;
706
- runStartedAt: string | undefined;
707
- }>;
708
- declare const listWorkflowJobs: (token: string) => _$ai.Tool<{
709
- owner: string;
710
- repo: string;
711
- runId: number;
712
- filter: "all" | "latest";
713
- perPage: number;
714
- page: number;
715
- }, {
716
- totalCount: number;
717
- jobs: {
718
- id: number;
719
- name: string;
720
- status: "completed" | "in_progress" | "queued" | "requested" | "waiting" | "pending";
721
- conclusion: "success" | "action_required" | "cancelled" | "failure" | "neutral" | "skipped" | "timed_out" | null;
722
- url: string | null;
723
- startedAt: string;
724
- completedAt: string | null;
725
- runnerName: string | null;
726
- steps: {
727
- name: string;
728
- status: "completed" | "in_progress" | "queued";
729
- conclusion: string | null;
730
- number: number;
731
- startedAt: string | null | undefined;
732
- completedAt: string | null | undefined;
733
- }[] | undefined;
734
- }[];
735
- }>;
736
- declare const triggerWorkflow: (token: string, {
737
- needsApproval
738
- }?: ToolOptions) => _$ai.Tool<{
739
- owner: string;
740
- repo: string;
741
- workflowId: string | number;
742
- ref: string;
743
- inputs?: Record<string, string> | undefined;
744
- }, {
745
- triggered: boolean;
746
- workflowId: string | number;
747
- ref: string;
748
- }>;
749
- declare const cancelWorkflowRun: (token: string, {
750
- needsApproval
751
- }?: ToolOptions) => _$ai.Tool<{
752
- owner: string;
753
- repo: string;
754
- runId: number;
755
- }, {
756
- cancelled: boolean;
757
- runId: number;
758
- }>;
759
- declare const rerunWorkflowRun: (token: string, {
760
- needsApproval
761
- }?: ToolOptions) => _$ai.Tool<{
762
- owner: string;
763
- repo: string;
764
- runId: number;
765
- onlyFailedJobs: boolean;
766
- }, {
767
- rerun: boolean;
768
- runId: number;
769
- onlyFailedJobs: boolean;
770
- }>;
771
- //#endregion
772
- //#region src/agents.d.ts
773
- type AgentOptions = Omit<ToolLoopAgentSettings, 'model' | 'tools' | 'instructions'>;
774
- type CreateGithubAgentOptions = AgentOptions & {
775
- model: ToolLoopAgentSettings['model'];
776
- /**
777
- * GitHub personal access token.
778
- * Falls back to `process.env.GITHUB_TOKEN` when omitted.
779
- */
780
- token?: string;
781
- preset?: GithubToolPreset | GithubToolPreset[];
782
- requireApproval?: ApprovalConfig;
783
- instructions?: string;
784
- additionalInstructions?: string;
785
- /**
786
- * Default author for commit-creating tools.
787
- * Falls back to the authenticated user when omitted.
788
- */
789
- author?: CommitIdentity;
790
- /**
791
- * Default committer for commit-creating tools.
792
- * Falls back to the authenticated user when omitted.
793
- */
794
- committer?: CommitIdentity;
795
- /**
796
- * Co-authors to attribute on all commits.
797
- * Added as "Co-authored-by" trailers to commit messages.
798
- */
799
- coAuthors?: CommitIdentity[];
800
- };
801
- /**
802
- * Create a pre-configured GitHub agent powered by the AI SDK's `ToolLoopAgent`.
803
- *
804
- * Returns a `ToolLoopAgent` instance with `.generate()` and `.stream()` methods.
805
- *
806
- * @example
807
- * ```ts
808
- * import { createGithubAgent } from '@github-tools/sdk'
809
- *
810
- * const agent = createGithubAgent({
811
- * model: 'anthropic/claude-sonnet-4.6',
812
- * token: process.env.GITHUB_TOKEN!,
813
- * preset: 'code-review',
814
- * })
815
- *
816
- * const result = await agent.generate({ prompt: 'Review PR #42 on vercel/ai' })
817
- * ```
818
- */
819
- declare function createGithubAgent({
820
- token,
821
- preset,
822
- requireApproval,
823
- instructions,
824
- additionalInstructions,
825
- author,
826
- committer,
827
- coAuthors,
828
- ...agentOptions
829
- }: CreateGithubAgentOptions): ToolLoopAgent;
830
- //#endregion
831
- //#region src/index.d.ts
832
- type GithubWriteToolName = 'createBranch' | 'forkRepository' | 'createRepository' | 'createOrUpdateFile' | 'createPullRequest' | 'mergePullRequest' | 'addPullRequestComment' | 'createPullRequestReview' | 'createIssue' | 'addIssueComment' | 'closeIssue' | 'addLabels' | 'removeLabel' | 'createGist' | 'updateGist' | 'deleteGist' | 'createGistComment' | 'triggerWorkflow' | 'cancelWorkflowRun' | 'rerunWorkflowRun';
833
- /**
834
- * Whether write operations require user approval.
835
- * - `true` — all write tools need approval (default)
836
- * - `false` — no approval needed for any write tool
837
- * - object — per-tool override; unspecified write tools default to `true`
838
- *
839
- * @example
840
- * ```ts
841
- * requireApproval: {
842
- * mergePullRequest: true,
843
- * createOrUpdateFile: true,
844
- * addPullRequestComment: false,
845
- * addIssueComment: false,
846
- * }
847
- * ```
848
- */
849
- type ApprovalConfig = boolean | Partial<Record<GithubWriteToolName, boolean>>;
850
- /**
851
- * Predefined tool presets for common use cases.
852
- *
853
- * - `'code-review'` — Review PRs: read PRs, file content, commits, and post comments
854
- * - `'issue-triage'` — Triage issues: read/create/close issues, search, and comment
855
- * - `'repo-explorer'` — Explore repos: read-only access to repos, branches, code, and search
856
- * - `'ci-ops'` — CI operations: monitor and manage GitHub Actions workflows
857
- * - `'maintainer'` — Full maintenance: all read + create PRs, merge, manage issues
858
- */
859
- type GithubToolPreset = 'code-review' | 'issue-triage' | 'repo-explorer' | 'ci-ops' | 'maintainer';
860
- type GithubToolsOptions = {
861
- /**
862
- * GitHub personal access token.
863
- * Falls back to `process.env.GITHUB_TOKEN` when omitted.
864
- */
865
- token?: string;
866
- requireApproval?: ApprovalConfig;
867
- /**
868
- * Per-tool overrides for customizing tool behavior (description, title, needsApproval, etc.)
869
- * without changing the underlying implementation. `execute`, `inputSchema`, and `outputSchema`
870
- * cannot be overridden.
871
- *
872
- * @example
873
- * ```ts
874
- * createGithubTools({
875
- * overrides: {
876
- * deleteGist: { needsApproval: false },
877
- * listIssues: { description: 'List bugs for the current sprint' },
878
- * }
879
- * })
880
- * ```
881
- */
882
- overrides?: Partial<Record<string, ToolOverrides>>;
883
- /**
884
- * Restrict the returned tools to a predefined preset.
885
- * Omit to get all tools.
886
- *
887
- * @example
888
- * ```ts
889
- * // Only code-review tools
890
- * createGithubTools({ token, preset: 'code-review' })
891
- *
892
- * // Combine presets
893
- * createGithubTools({ token, preset: ['code-review', 'issue-triage'] })
894
- * ```
895
- */
896
- preset?: GithubToolPreset | GithubToolPreset[];
897
- /**
898
- * Default author for commit-creating tools.
899
- * The author is the person who originally wrote the code.
900
- * Falls back to the authenticated user when omitted.
901
- */
902
- author?: CommitIdentity;
903
- /**
904
- * Default committer for commit-creating tools.
905
- * The committer is the person who applied the commit.
906
- * Falls back to the authenticated user when omitted.
907
- */
908
- committer?: CommitIdentity;
909
- /**
910
- * Co-authors to attribute on all commits created by tools.
911
- * Added as "Co-authored-by" trailers to commit messages.
912
- *
913
- * @example
914
- * ```ts
915
- * createGithubTools({
916
- * token,
917
- * coAuthors: [
918
- * { name: 'my-bot[bot]', email: '12345+my-bot[bot]@users.noreply.github.com' }
919
- * ]
920
- * })
921
- * ```
922
- */
923
- coAuthors?: CommitIdentity[];
924
- };
925
- /**
926
- * Create a set of GitHub tools for the Vercel AI SDK.
927
- *
928
- * Write operations require user approval by default.
929
- * Control this globally or per-tool via `requireApproval`.
930
- * Use `preset` to get only the tools you need.
931
- *
932
- * @example
933
- * ```ts
934
- * // All tools (default)
935
- * createGithubTools({ token })
936
- *
937
- * // Code-review agent — only PR & commit tools
938
- * createGithubTools({ token, preset: 'code-review' })
939
- *
940
- * // Combine presets
941
- * createGithubTools({ token, preset: ['code-review', 'issue-triage'] })
942
- *
943
- * // Granular approval
944
- * createGithubTools({
945
- * token,
946
- * preset: 'maintainer',
947
- * requireApproval: {
948
- * mergePullRequest: true,
949
- * createOrUpdateFile: true,
950
- * addPullRequestComment: false,
951
- * }
952
- * })
953
- * ```
954
- */
955
- declare function createGithubTools({
956
- token,
957
- requireApproval,
958
- preset,
959
- overrides,
960
- author,
961
- committer,
962
- coAuthors
963
- }?: GithubToolsOptions): Partial<{
964
- getRepository: _$ai.Tool<{
965
- owner: string;
966
- repo: string;
967
- }, {
968
- name: string;
969
- fullName: string;
970
- description: string | null;
971
- url: string;
972
- defaultBranch: string;
973
- stars: number;
974
- forks: number;
975
- openIssues: number;
976
- language: string | null;
977
- private: boolean;
978
- createdAt: string;
979
- updatedAt: string;
980
- }>;
981
- listBranches: _$ai.Tool<{
982
- owner: string;
983
- repo: string;
984
- perPage: number;
985
- }, {
986
- name: string;
987
- sha: string;
988
- protected: boolean;
989
- }[]>;
990
- getFileContent: _$ai.Tool<{
991
- owner: string;
992
- repo: string;
993
- path: string;
994
- ref?: string | undefined;
995
- }, {
996
- type: string;
997
- entries: {
998
- name: string;
999
- type: "file" | "dir" | "submodule" | "symlink";
1000
- path: string;
1001
- }[];
1002
- path?: undefined;
1003
- sha?: undefined;
1004
- size?: undefined;
1005
- content?: undefined;
1006
- } | {
1007
- type: "submodule" | "symlink";
1008
- path: string;
1009
- entries?: undefined;
1010
- sha?: undefined;
1011
- size?: undefined;
1012
- content?: undefined;
1013
- } | {
1014
- type: string;
1015
- path: string;
1016
- sha: string;
1017
- size: number;
1018
- content: string;
1019
- entries?: undefined;
1020
- }>;
1021
- listPullRequests: _$ai.Tool<{
1022
- owner: string;
1023
- repo: string;
1024
- state: "open" | "closed" | "all";
1025
- perPage: number;
1026
- }, {
1027
- number: number;
1028
- title: string;
1029
- state: string;
1030
- url: string;
1031
- author: string | undefined;
1032
- branch: string;
1033
- base: string;
1034
- draft: boolean | undefined;
1035
- createdAt: string;
1036
- updatedAt: string;
1037
- }[]>;
1038
- getPullRequest: _$ai.Tool<{
1039
- owner: string;
1040
- repo: string;
1041
- pullNumber: number;
1042
- }, {
1043
- number: number;
1044
- title: string;
1045
- body: string | null;
1046
- state: "open" | "closed";
1047
- url: string;
1048
- author: string;
1049
- branch: string;
1050
- base: string;
1051
- draft: boolean | undefined;
1052
- merged: boolean;
1053
- mergeable: boolean | null;
1054
- additions: number;
1055
- deletions: number;
1056
- changedFiles: number;
1057
- createdAt: string;
1058
- updatedAt: string;
1059
- mergedAt: string | null;
1060
- }>;
1061
- listIssues: _$ai.Tool<{
1062
- owner: string;
1063
- repo: string;
1064
- state: "open" | "closed" | "all";
1065
- perPage: number;
1066
- labels?: string | undefined;
1067
- }, {
1068
- number: number;
1069
- title: string;
1070
- state: string;
1071
- url: string;
1072
- author: string | undefined;
1073
- labels: (string | undefined)[];
1074
- createdAt: string;
1075
- updatedAt: string;
1076
- }[]>;
1077
- getIssue: _$ai.Tool<{
1078
- owner: string;
1079
- repo: string;
1080
- issueNumber: number;
1081
- }, {
1082
- number: number;
1083
- title: string;
1084
- body: string | null | undefined;
1085
- state: string;
1086
- url: string;
1087
- author: string | undefined;
1088
- assignees: string[] | undefined;
1089
- labels: (string | undefined)[];
1090
- comments: number;
1091
- createdAt: string;
1092
- updatedAt: string;
1093
- closedAt: string | null;
1094
- }>;
1095
- searchCode: _$ai.Tool<{
1096
- query: string;
1097
- perPage: number;
1098
- }, {
1099
- totalCount: number;
1100
- items: {
1101
- name: string;
1102
- path: string;
1103
- url: string;
1104
- repository: string;
1105
- sha: string;
1106
- }[];
1107
- }>;
1108
- searchRepositories: _$ai.Tool<{
1109
- query: string;
1110
- perPage: number;
1111
- order: "asc" | "desc";
1112
- sort?: "stars" | "forks" | "help-wanted-issues" | "updated" | undefined;
1113
- }, {
1114
- totalCount: number;
1115
- items: {
1116
- name: string;
1117
- fullName: string;
1118
- description: string | null;
1119
- url: string;
1120
- stars: number;
1121
- forks: number;
1122
- language: string | null;
1123
- topics: string[] | undefined;
1124
- }[];
1125
- }>;
1126
- listCommits: _$ai.Tool<{
1127
- owner: string;
1128
- repo: string;
1129
- perPage: number;
1130
- path?: string | undefined;
1131
- sha?: string | undefined;
1132
- author?: string | undefined;
1133
- since?: string | undefined;
1134
- until?: string | undefined;
1135
- }, {
1136
- sha: string;
1137
- message: string;
1138
- author: string | undefined;
1139
- authorLogin: string | undefined;
1140
- date: string | undefined;
1141
- url: string;
1142
- }[]>;
1143
- getCommit: _$ai.Tool<{
1144
- owner: string;
1145
- repo: string;
1146
- ref: string;
1147
- }, {
1148
- sha: string;
1149
- message: string;
1150
- author: string | undefined;
1151
- authorLogin: string | undefined;
1152
- date: string | undefined;
1153
- url: string;
1154
- stats: {
1155
- additions: number | undefined;
1156
- deletions: number | undefined;
1157
- total: number | undefined;
1158
- } | null;
1159
- files: {
1160
- filename: string;
1161
- status: "added" | "removed" | "modified" | "renamed" | "copied" | "changed" | "unchanged";
1162
- additions: number;
1163
- deletions: number;
1164
- patch: string | undefined;
1165
- }[] | undefined;
1166
- }>;
1167
- getBlame: _$ai.Tool<{
1168
- owner: string;
1169
- repo: string;
1170
- path: string;
1171
- ref?: string | undefined;
1172
- line?: number | undefined;
1173
- lineStart?: number | undefined;
1174
- lineEnd?: number | undefined;
1175
- }, {
1176
- error: string;
1177
- ref?: undefined;
1178
- tipSha?: undefined;
1179
- path?: undefined;
1180
- rangeCount?: undefined;
1181
- ranges?: undefined;
1182
- } | {
1183
- ref: string;
1184
- tipSha: string;
1185
- path: string;
1186
- rangeCount: number;
1187
- ranges: {
1188
- startingLine: number;
1189
- endingLine: number;
1190
- age: number;
1191
- commit: {
1192
- sha: string;
1193
- abbreviatedSha: string;
1194
- messageHeadline: string;
1195
- authoredDate: string;
1196
- url: string;
1197
- authorName: string | null;
1198
- authorEmail: string | null;
1199
- authorLogin: string | null;
1200
- };
1201
- }[];
1202
- error?: undefined;
1203
- }>;
1204
- createBranch: _$ai.Tool<{
1205
- owner: string;
1206
- repo: string;
1207
- branch: string;
1208
- from?: string | undefined;
1209
- }, {
1210
- ref: string;
1211
- sha: string;
1212
- url: string;
1213
- }>;
1214
- forkRepository: _$ai.Tool<{
1215
- owner: string;
1216
- repo: string;
1217
- organization?: string | undefined;
1218
- name?: string | undefined;
1219
- }, {
1220
- name: string;
1221
- fullName: string;
1222
- url: string;
1223
- cloneUrl: string;
1224
- sshUrl: string;
1225
- defaultBranch: string;
1226
- private: boolean;
1227
- parent: {
1228
- fullName: string;
1229
- url: string;
1230
- } | null;
1231
- }>;
1232
- createRepository: _$ai.Tool<{
1233
- name: string;
1234
- isPrivate: boolean;
1235
- autoInit: boolean;
1236
- description?: string | undefined;
1237
- gitignoreTemplate?: string | undefined;
1238
- licenseTemplate?: string | undefined;
1239
- org?: string | undefined;
1240
- }, {
1241
- name: string;
1242
- fullName: string;
1243
- description: string | null;
1244
- url: string;
1245
- cloneUrl: string;
1246
- sshUrl: string;
1247
- defaultBranch: string;
1248
- private: boolean;
1249
- createdAt: string;
1250
- }>;
1251
- createOrUpdateFile: _$ai.Tool<{
1252
- owner: string;
1253
- repo: string;
1254
- path: string;
1255
- message: string;
1256
- content: string;
1257
- branch?: string | undefined;
1258
- sha?: string | undefined;
1259
- }, {
1260
- path: string | undefined;
1261
- sha: string | undefined;
1262
- commitSha: string | undefined;
1263
- commitUrl: string | undefined;
1264
- }>;
1265
- createPullRequest: _$ai.Tool<{
1266
- owner: string;
1267
- repo: string;
1268
- title: string;
1269
- head: string;
1270
- base: string;
1271
- draft: boolean;
1272
- body?: string | undefined;
1273
- }, {
1274
- number: number;
1275
- title: string;
1276
- url: string;
1277
- state: "open" | "closed";
1278
- draft: boolean | undefined;
1279
- branch: string;
1280
- base: string;
1281
- }>;
1282
- mergePullRequest: _$ai.Tool<{
1283
- owner: string;
1284
- repo: string;
1285
- pullNumber: number;
1286
- mergeMethod: "merge" | "squash" | "rebase";
1287
- commitTitle?: string | undefined;
1288
- commitMessage?: string | undefined;
1289
- }, {
1290
- merged: boolean;
1291
- message: string;
1292
- sha: string;
1293
- }>;
1294
- addPullRequestComment: _$ai.Tool<{
1295
- owner: string;
1296
- repo: string;
1297
- pullNumber: number;
1298
- body: string;
1299
- }, {
1300
- id: number;
1301
- url: string;
1302
- body: string | undefined;
1303
- author: string | undefined;
1304
- createdAt: string;
1305
- }>;
1306
- listPullRequestFiles: _$ai.Tool<{
1307
- owner: string;
1308
- repo: string;
1309
- pullNumber: number;
1310
- perPage: number;
1311
- page: number;
1312
- }, {
1313
- filename: string;
1314
- status: "added" | "removed" | "modified" | "renamed" | "copied" | "changed" | "unchanged";
1315
- additions: number;
1316
- deletions: number;
1317
- changes: number;
1318
- patch: string | undefined;
1319
- }[]>;
1320
- listPullRequestReviews: _$ai.Tool<{
1321
- owner: string;
1322
- repo: string;
1323
- pullNumber: number;
1324
- perPage: number;
1325
- page: number;
1326
- }, {
1327
- id: number;
1328
- state: string;
1329
- body: string;
1330
- author: string | undefined;
1331
- url: string;
1332
- submittedAt: string | undefined;
1333
- }[]>;
1334
- createPullRequestReview: _$ai.Tool<{
1335
- owner: string;
1336
- repo: string;
1337
- pullNumber: number;
1338
- event: "APPROVE" | "REQUEST_CHANGES" | "COMMENT";
1339
- body?: string | undefined;
1340
- comments?: {
1341
- path: string;
1342
- body: string;
1343
- line?: number | undefined;
1344
- side?: "LEFT" | "RIGHT" | undefined;
1345
- }[] | undefined;
1346
- }, {
1347
- id: number;
1348
- state: string;
1349
- body: string;
1350
- url: string;
1351
- author: string | undefined;
1352
- submittedAt: string | undefined;
1353
- }>;
1354
- createIssue: _$ai.Tool<{
1355
- owner: string;
1356
- repo: string;
1357
- title: string;
1358
- body?: string | undefined;
1359
- labels?: string[] | undefined;
1360
- assignees?: string[] | undefined;
1361
- }, {
1362
- number: number;
1363
- title: string;
1364
- url: string;
1365
- state: string;
1366
- labels: (string | undefined)[];
1367
- }>;
1368
- addIssueComment: _$ai.Tool<{
1369
- owner: string;
1370
- repo: string;
1371
- issueNumber: number;
1372
- body: string;
1373
- }, {
1374
- id: number;
1375
- url: string;
1376
- body: string | undefined;
1377
- author: string | undefined;
1378
- createdAt: string;
1379
- }>;
1380
- closeIssue: _$ai.Tool<{
1381
- owner: string;
1382
- repo: string;
1383
- issueNumber: number;
1384
- stateReason: "completed" | "not_planned";
1385
- }, {
1386
- number: number;
1387
- title: string;
1388
- state: string;
1389
- url: string;
1390
- closedAt: string | null;
1391
- }>;
1392
- listLabels: _$ai.Tool<{
1393
- owner: string;
1394
- repo: string;
1395
- perPage: number;
1396
- page: number;
1397
- }, {
1398
- name: string;
1399
- color: string;
1400
- description: string | null;
1401
- }[]>;
1402
- addLabels: _$ai.Tool<{
1403
- owner: string;
1404
- repo: string;
1405
- issueNumber: number;
1406
- labels: string[];
1407
- }, {
1408
- name: string;
1409
- color: string;
1410
- description: string | null;
1411
- }[]>;
1412
- removeLabel: _$ai.Tool<{
1413
- owner: string;
1414
- repo: string;
1415
- issueNumber: number;
1416
- label: string;
1417
- }, {
1418
- removed: boolean;
1419
- label: string;
1420
- issueNumber: number;
1421
- }>;
1422
- listGists: _$ai.Tool<{
1423
- perPage: number;
1424
- page: number;
1425
- username?: string | undefined;
1426
- }, {
1427
- id: string;
1428
- description: string | null;
1429
- public: boolean;
1430
- url: string;
1431
- files: string[];
1432
- owner: string | undefined;
1433
- comments: number;
1434
- createdAt: string;
1435
- updatedAt: string;
1436
- }[]>;
1437
- getGist: _$ai.Tool<{
1438
- gistId: string;
1439
- }, {
1440
- id: string | undefined;
1441
- description: string | null | undefined;
1442
- public: boolean | undefined;
1443
- url: string | undefined;
1444
- owner: string | undefined;
1445
- files: {
1446
- filename: string | undefined;
1447
- language: string | undefined;
1448
- size: number | undefined;
1449
- content: string | undefined;
1450
- }[];
1451
- comments: number | undefined;
1452
- createdAt: string | undefined;
1453
- updatedAt: string | undefined;
1454
- }>;
1455
- listGistComments: _$ai.Tool<{
1456
- gistId: string;
1457
- perPage: number;
1458
- page: number;
1459
- }, {
1460
- id: number;
1461
- body: string;
1462
- author: string | undefined;
1463
- url: string;
1464
- createdAt: string;
1465
- updatedAt: string;
1466
- }[]>;
1467
- createGist: _$ai.Tool<{
1468
- files: Record<string, {
1469
- content: string;
1470
- }>;
1471
- isPublic: boolean;
1472
- description?: string | undefined;
1473
- }, {
1474
- id: string | undefined;
1475
- description: string | null | undefined;
1476
- public: boolean | undefined;
1477
- url: string | undefined;
1478
- files: string[];
1479
- owner: string | undefined;
1480
- }>;
1481
- updateGist: _$ai.Tool<{
1482
- gistId: string;
1483
- description?: string | undefined;
1484
- files?: Record<string, {
1485
- content: string;
1486
- }> | undefined;
1487
- filesToDelete?: string[] | undefined;
1488
- }, {
1489
- id: string | undefined;
1490
- description: string | null | undefined;
1491
- url: string | undefined;
1492
- files: string[];
1493
- }>;
1494
- deleteGist: _$ai.Tool<{
1495
- gistId: string;
1496
- }, {
1497
- deleted: boolean;
1498
- gistId: string;
1499
- }>;
1500
- createGistComment: _$ai.Tool<{
1501
- gistId: string;
1502
- body: string;
1503
- }, {
1504
- id: number;
1505
- url: string;
1506
- body: string;
1507
- author: string | undefined;
1508
- createdAt: string;
1509
- }>;
1510
- listWorkflows: _$ai.Tool<{
1511
- owner: string;
1512
- repo: string;
1513
- perPage: number;
1514
- page: number;
1515
- }, {
1516
- totalCount: number;
1517
- workflows: {
1518
- id: number;
1519
- name: string;
1520
- path: string;
1521
- state: "active" | "deleted" | "disabled_fork" | "disabled_inactivity" | "disabled_manually";
1522
- url: string;
1523
- createdAt: string;
1524
- updatedAt: string;
1525
- }[];
1526
- }>;
1527
- listWorkflowRuns: _$ai.Tool<{
1528
- owner: string;
1529
- repo: string;
1530
- perPage: number;
1531
- page: number;
1532
- workflowId?: string | number | undefined;
1533
- branch?: string | undefined;
1534
- event?: string | undefined;
1535
- status?: "success" | "completed" | "action_required" | "cancelled" | "failure" | "neutral" | "skipped" | "stale" | "timed_out" | "in_progress" | "queued" | "requested" | "waiting" | "pending" | undefined;
1536
- }, {
1537
- totalCount: number;
1538
- runs: {
1539
- id: number;
1540
- name: string | null | undefined;
1541
- status: string | null;
1542
- conclusion: string | null;
1543
- branch: string | null;
1544
- event: string;
1545
- url: string;
1546
- actor: string | undefined;
1547
- createdAt: string;
1548
- updatedAt: string;
1549
- runNumber: number;
1550
- runAttempt: number | undefined;
1551
- }[];
1552
- }>;
1553
- getWorkflowRun: _$ai.Tool<{
1554
- owner: string;
1555
- repo: string;
1556
- runId: number;
1557
- }, {
1558
- id: number;
1559
- name: string | null | undefined;
1560
- status: string | null;
1561
- conclusion: string | null;
1562
- branch: string | null;
1563
- sha: string;
1564
- event: string;
1565
- url: string;
1566
- actor: string | undefined;
1567
- runNumber: number;
1568
- runAttempt: number | undefined;
1569
- createdAt: string;
1570
- updatedAt: string;
1571
- runStartedAt: string | undefined;
1572
- }>;
1573
- listWorkflowJobs: _$ai.Tool<{
1574
- owner: string;
1575
- repo: string;
1576
- runId: number;
1577
- filter: "all" | "latest";
1578
- perPage: number;
1579
- page: number;
1580
- }, {
1581
- totalCount: number;
1582
- jobs: {
1583
- id: number;
1584
- name: string;
1585
- status: "completed" | "in_progress" | "queued" | "requested" | "waiting" | "pending";
1586
- conclusion: "success" | "action_required" | "cancelled" | "failure" | "neutral" | "skipped" | "timed_out" | null;
1587
- url: string | null;
1588
- startedAt: string;
1589
- completedAt: string | null;
1590
- runnerName: string | null;
1591
- steps: {
1592
- name: string;
1593
- status: "completed" | "in_progress" | "queued";
1594
- conclusion: string | null;
1595
- number: number;
1596
- startedAt: string | null | undefined;
1597
- completedAt: string | null | undefined;
1598
- }[] | undefined;
1599
- }[];
1600
- }>;
1601
- triggerWorkflow: _$ai.Tool<{
1602
- owner: string;
1603
- repo: string;
1604
- workflowId: string | number;
1605
- ref: string;
1606
- inputs?: Record<string, string> | undefined;
1607
- }, {
1608
- triggered: boolean;
1609
- workflowId: string | number;
1610
- ref: string;
1611
- }>;
1612
- cancelWorkflowRun: _$ai.Tool<{
1613
- owner: string;
1614
- repo: string;
1615
- runId: number;
1616
- }, {
1617
- cancelled: boolean;
1618
- runId: number;
1619
- }>;
1620
- rerunWorkflowRun: _$ai.Tool<{
1621
- owner: string;
1622
- repo: string;
1623
- runId: number;
1624
- onlyFailedJobs: boolean;
1625
- }, {
1626
- rerun: boolean;
1627
- runId: number;
1628
- onlyFailedJobs: boolean;
1629
- }>;
1630
- }>;
1631
- type GithubTools = ReturnType<typeof createGithubTools>;
1632
- //#endregion
1633
- export { CommitToolOptions as $, closeIssue as A, listPullRequestFiles as B, getBlame as C, searchRepositories as D, searchCode as E, removeLabel as F, createOrUpdateFile as G, listPullRequests as H, addPullRequestComment as I, getFileContent as J, createRepository as K, createPullRequest as L, getIssue as M, listIssues as N, addIssueComment as O, listLabels as P, CommitIdentity as Q, createPullRequestReview as R, updateGist as S, listCommits as T, mergePullRequest as U, listPullRequestReviews as V, createBranch as W, listBranches as X, getRepository as Y, createOctokit as Z, createGistComment as _, GithubWriteToolName as a, listGistComments as b, createGithubAgent as c, listWorkflowJobs as d, Octokit$1 as et, listWorkflowRuns as f, createGist as g, triggerWorkflow as h, GithubToolsOptions as i, createIssue as j, addLabels as k, cancelWorkflowRun as l, rerunWorkflowRun as m, GithubToolPreset as n, ToolOverrides as nt, createGithubTools as o, listWorkflows as p, forkRepository as q, GithubTools as r, CreateGithubAgentOptions as s, ApprovalConfig as t, ToolOptions as tt, getWorkflowRun as u, deleteGist as v, getCommit as w, listGists as x, getGist as y, getPullRequest as z };
1634
- //# sourceMappingURL=index-ikP-LT-3.d.mts.map