@github-tools/sdk 1.19.0 → 1.21.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/README.md +97 -30
- package/dist/approval-policy-CEMMPq92.mjs +17 -0
- package/dist/approval-policy-CEMMPq92.mjs.map +1 -0
- package/dist/connect/eve.d.mts +2 -2
- package/dist/connect/eve.d.mts.map +1 -1
- package/dist/connect/eve.mjs +1 -1
- package/dist/connect.d.mts +15 -24
- package/dist/connect.d.mts.map +1 -1
- package/dist/connect.mjs +2 -2
- package/dist/{cores-BeLZwcde.mjs → cores-meFAMt2D.mjs} +41 -2
- package/dist/cores-meFAMt2D.mjs.map +1 -0
- package/dist/{tool-types-CrC80SIL.d.mts → dry-run-DXckOam2.d.mts} +437 -54
- package/dist/dry-run-DXckOam2.d.mts.map +1 -0
- package/dist/evaluation-DJHINyAu.mjs +311 -0
- package/dist/evaluation-DJHINyAu.mjs.map +1 -0
- package/dist/{eve-runtime-DRh2QJI7.d.mts → eve-runtime-B_CJE9JV.d.mts} +21 -7
- package/dist/eve-runtime-B_CJE9JV.d.mts.map +1 -0
- package/dist/{eve-runtime-YTxfrWP-.mjs → eve-runtime-DPzMPCLt.mjs} +49 -15
- package/dist/eve-runtime-DPzMPCLt.mjs.map +1 -0
- package/dist/eve-runtime.d.mts +5 -5
- package/dist/eve-runtime.mjs +4 -4
- package/dist/eve.d.mts +95 -4
- package/dist/eve.d.mts.map +1 -1
- package/dist/eve.mjs +94 -3
- package/dist/eve.mjs.map +1 -1
- package/dist/{index-DkZvveZP.d.mts → index-CzzrtCVj.d.mts} +119 -348
- package/dist/index-CzzrtCVj.d.mts.map +1 -0
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +4 -3
- package/dist/{interrupts-C_lUXMdd.d.mts → interrupts-BSDPwdJ2.d.mts} +2 -2
- package/dist/interrupts-BSDPwdJ2.d.mts.map +1 -0
- package/dist/{src-Bx5p1Unc.mjs → src-BlhrSieS.mjs} +491 -23
- package/dist/src-BlhrSieS.mjs.map +1 -0
- package/dist/tanstack/interrupts.d.mts +1 -1
- package/dist/tanstack.d.mts +1705 -204
- package/dist/tanstack.d.mts.map +1 -1
- package/dist/tanstack.mjs +53 -19
- package/dist/tanstack.mjs.map +1 -1
- package/dist/{token-Bh8nPj66.mjs → token-BLps09gm.mjs} +36 -116
- package/dist/token-BLps09gm.mjs.map +1 -0
- package/dist/{types-BmwOpI5-.d.mts → types-Bln8U42J.d.mts} +3 -3
- package/dist/{types-BmwOpI5-.d.mts.map → types-Bln8U42J.d.mts.map} +1 -1
- package/dist/{types-CPAsEMzx.d.mts → types-C7O2lwwz.d.mts} +14 -2
- package/dist/{types-CPAsEMzx.d.mts.map → types-C7O2lwwz.d.mts.map} +1 -1
- package/dist/workflow.d.mts +41 -40
- package/dist/workflow.d.mts.map +1 -1
- package/dist/workflow.mjs +20 -47
- package/dist/workflow.mjs.map +1 -1
- package/dist/{write-tools-BaoTUCg7.mjs → write-tools-w-8tjnDQ.mjs} +1360 -124
- package/dist/write-tools-w-8tjnDQ.mjs.map +1 -0
- package/package.json +4 -6
- package/dist/cores-BeLZwcde.mjs.map +0 -1
- package/dist/evaluation-f-2QwBid.mjs +0 -210
- package/dist/evaluation-f-2QwBid.mjs.map +0 -1
- package/dist/eve-runtime-DRh2QJI7.d.mts.map +0 -1
- package/dist/eve-runtime-YTxfrWP-.mjs.map +0 -1
- package/dist/index-DkZvveZP.d.mts.map +0 -1
- package/dist/instructions-BuypoY0x.mjs +0 -148
- package/dist/instructions-BuypoY0x.mjs.map +0 -1
- package/dist/interrupts-C_lUXMdd.d.mts.map +0 -1
- package/dist/src-Bx5p1Unc.mjs.map +0 -1
- package/dist/token-Bh8nPj66.mjs.map +0 -1
- package/dist/tool-types-CrC80SIL.d.mts.map +0 -1
- package/dist/write-tools-BaoTUCg7.mjs.map +0 -1
|
@@ -1,311 +1,66 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { I as GithubGuardrails, N as GithubTokenInput, R as CombinedPresetToolNames, V as PresetToolName, W as GithubToolName, c as CommitIdentity, f as ToolOptions, i as GithubToolsBaseOptions, l as CommitToolOptions, r as AllGithubTools, s as GithubToolsContext, u as GithubTool, z as GithubToolPreset } from "./dry-run-DXckOam2.mjs";
|
|
2
2
|
import { ToolLoopAgent, ToolLoopAgentSettings, ToolSet } from "ai";
|
|
3
|
-
import { z } from "zod";
|
|
4
3
|
import { Octokit } from "octokit";
|
|
5
4
|
import "evlog";
|
|
5
|
+
//#region src/core/instructions.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Guidance for using the GitHub tools, for an agent that has its own system prompt, such as an eve
|
|
8
|
+
* agent mounting the GitHub extension. Unlike {@link resolveInstructions}, it leaves out the
|
|
9
|
+
* "You are …" opener: the preset's tool rules (or, without a preset, the rule to prefer the
|
|
10
|
+
* combined read tools), the shared rules, and the working context.
|
|
11
|
+
*/
|
|
12
|
+
declare function resolveToolGuidance(options: {
|
|
13
|
+
preset?: GithubToolPreset | GithubToolPreset[];
|
|
14
|
+
context?: GithubToolsContext;
|
|
15
|
+
}): string;
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/agents.d.ts
|
|
18
|
+
/** Name of the tool `preset: 'auto'` adds so the model can call GitHub tools that were not picked. */
|
|
19
|
+
declare const CALL_GITHUB_TOOL = "callGithubTool";
|
|
20
|
+
type AgentOptions = Omit<ToolLoopAgentSettings<ToolSet>, 'model' | 'tools' | 'instructions'>;
|
|
21
|
+
type CreateGithubAgentOptions = AgentOptions & GithubToolsBaseOptions & {
|
|
22
|
+
model: ToolLoopAgentSettings<ToolSet>['model'];
|
|
23
|
+
/**
|
|
24
|
+
* Restrict tools and system prompt to a predefined preset.
|
|
25
|
+
*
|
|
26
|
+
* Selects a subset of tools and sets the preset's system prompt. Combine presets with an array
|
|
27
|
+
* to merge their tool sets and system prompts.
|
|
28
|
+
*
|
|
29
|
+
* `'auto'` asks an evaluation model (Jev by default, see `evaluation`) which tools the
|
|
30
|
+
* conversation's first request needs, and narrows `activeTools` to those and the core read
|
|
31
|
+
* tools for the whole conversation. A `callGithubTool` tool lets the model call any other
|
|
32
|
+
* GitHub tool without changing the tool list, so the provider's prompt cache holds. With `evaluation.selection: 'presets'`, it routes each request to at most two
|
|
33
|
+
* presets instead and uses their system prompts. Needs `ai` 7.0.105 or later, checked when the
|
|
34
|
+
* agent is created.
|
|
35
|
+
*
|
|
36
|
+
* @see {@link GithubToolPreset} for available presets and included tools.
|
|
37
|
+
*/
|
|
38
|
+
preset?: GithubToolPreset | GithubToolPreset[] | 'auto';
|
|
39
|
+
/**
|
|
40
|
+
* Fully replace the default system prompt.
|
|
41
|
+
* When set, `preset` system prompts and `additionalInstructions` are ignored.
|
|
42
|
+
* `context` is still appended when provided.
|
|
43
|
+
*/
|
|
44
|
+
instructions?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Append text to the preset-specific (or default) system prompt.
|
|
47
|
+
* Ignored when `instructions` is set.
|
|
48
|
+
*/
|
|
49
|
+
additionalInstructions?: string;
|
|
50
|
+
};
|
|
51
|
+
declare function createGithubAgent(options: CreateGithubAgentOptions & {
|
|
52
|
+
preset?: undefined | 'auto';
|
|
53
|
+
}): ToolLoopAgent<never, AllGithubTools>;
|
|
54
|
+
declare function createGithubAgent<P extends GithubToolPreset>(options: CreateGithubAgentOptions & {
|
|
55
|
+
preset: P;
|
|
56
|
+
}): ToolLoopAgent<never, Pick<AllGithubTools, PresetToolName<P>>>;
|
|
57
|
+
declare function createGithubAgent<P extends readonly GithubToolPreset[]>(options: CreateGithubAgentOptions & {
|
|
58
|
+
preset: P;
|
|
59
|
+
}): ToolLoopAgent<never, Pick<AllGithubTools, CombinedPresetToolNames<P>>>;
|
|
6
60
|
//#endregion
|
|
7
61
|
//#region src/client.d.ts
|
|
8
62
|
declare function createOctokit(token: string): Octokit;
|
|
9
63
|
//#endregion
|
|
10
|
-
//#region src/core/pagination.d.ts
|
|
11
|
-
type PagingFields = {
|
|
12
|
-
hasMore: boolean;
|
|
13
|
-
page: number;
|
|
14
|
-
perPage: number;
|
|
15
|
-
nextPage?: number;
|
|
16
|
-
};
|
|
17
|
-
type PagedList<T> = {
|
|
18
|
-
items: T[];
|
|
19
|
-
} & PagingFields;
|
|
20
|
-
declare namespace repository_d_exports {
|
|
21
|
-
export { composeCommitMessage, createBranchCore, createBranchDescription, createBranchInputSchema, createCommitOnBranch, createOrUpdateFileCore, createOrUpdateFileDescription, createOrUpdateFileInputSchema, createRepositoryCore, createRepositoryDescription, createRepositoryInputSchema, deleteBranchCore, deleteBranchDescription, deleteBranchInputSchema, forkRepositoryCore, forkRepositoryDescription, forkRepositoryInputSchema, getFileContentCore, getFileContentDescription, getFileContentInputSchema, getRepositoryCore, getRepositoryDescription, getRepositoryInputSchema, getRepositoryTreeCore, getRepositoryTreeDescription, getRepositoryTreeInputSchema, listBranchesCore, listBranchesDescription, listBranchesInputSchema };
|
|
22
|
-
}
|
|
23
|
-
declare function createCommitOnBranch(octokit: Octokit$1, input: {
|
|
24
|
-
owner: string;
|
|
25
|
-
repo: string;
|
|
26
|
-
branch: string;
|
|
27
|
-
expectedHeadOid: string;
|
|
28
|
-
headline: string;
|
|
29
|
-
body?: string;
|
|
30
|
-
additions?: Array<{
|
|
31
|
-
path: string;
|
|
32
|
-
contents: string;
|
|
33
|
-
}>;
|
|
34
|
-
deletions?: Array<{
|
|
35
|
-
path: string;
|
|
36
|
-
}>;
|
|
37
|
-
}): Promise<{
|
|
38
|
-
commitSha: string;
|
|
39
|
-
commitUrl: string;
|
|
40
|
-
}>;
|
|
41
|
-
declare function composeCommitMessage(message: string, coAuthors?: CommitIdentity[]): string;
|
|
42
|
-
declare const getRepositoryInputSchema: z.ZodObject<{
|
|
43
|
-
owner: z.ZodString;
|
|
44
|
-
repo: z.ZodString;
|
|
45
|
-
}, z.core.$strip>;
|
|
46
|
-
declare const getRepositoryDescription = "Get information about a GitHub repository including description, stars, forks, language, and default branch";
|
|
47
|
-
declare function getRepositoryCore({ token, owner, repo }: {
|
|
48
|
-
token: string;
|
|
49
|
-
owner: string;
|
|
50
|
-
repo: string;
|
|
51
|
-
}): Promise<{
|
|
52
|
-
name: string;
|
|
53
|
-
fullName: string;
|
|
54
|
-
description: string | null;
|
|
55
|
-
url: string;
|
|
56
|
-
defaultBranch: string;
|
|
57
|
-
stars: number;
|
|
58
|
-
forks: number;
|
|
59
|
-
openIssues: number;
|
|
60
|
-
language: string | null;
|
|
61
|
-
private: boolean;
|
|
62
|
-
createdAt: string;
|
|
63
|
-
updatedAt: string;
|
|
64
|
-
}>;
|
|
65
|
-
declare const listBranchesInputSchema: z.ZodObject<{
|
|
66
|
-
owner: z.ZodString;
|
|
67
|
-
repo: z.ZodString;
|
|
68
|
-
perPage: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
69
|
-
page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
70
|
-
}, z.core.$strip>;
|
|
71
|
-
declare const listBranchesDescription = "List branches in a GitHub repository. When hasMore, pass nextPage — do not repeat the same call.";
|
|
72
|
-
declare function listBranchesCore({ token, owner, repo, perPage, page }: {
|
|
73
|
-
token: string;
|
|
74
|
-
owner: string;
|
|
75
|
-
repo: string;
|
|
76
|
-
perPage: number;
|
|
77
|
-
page?: number;
|
|
78
|
-
}): Promise<PagedList<{
|
|
79
|
-
name: string;
|
|
80
|
-
sha: string;
|
|
81
|
-
protected: boolean;
|
|
82
|
-
}>>;
|
|
83
|
-
declare const getFileContentInputSchema: z.ZodObject<{
|
|
84
|
-
owner: z.ZodString;
|
|
85
|
-
repo: z.ZodString;
|
|
86
|
-
path: z.ZodString;
|
|
87
|
-
ref: z.ZodOptional<z.ZodString>;
|
|
88
|
-
startLine: z.ZodOptional<z.ZodNumber>;
|
|
89
|
-
endLine: z.ZodOptional<z.ZodNumber>;
|
|
90
|
-
maxLines: z.ZodOptional<z.ZodNumber>;
|
|
91
|
-
}, z.core.$strip>;
|
|
92
|
-
declare const getFileContentDescription = "Get the content of a file from a GitHub repository. Prefer startLine/endLine or maxLines to read only the lines you need";
|
|
93
|
-
declare function getFileContentCore({ token, owner, repo, path, ref, startLine, endLine, maxLines }: {
|
|
94
|
-
token: string;
|
|
95
|
-
owner: string;
|
|
96
|
-
repo: string;
|
|
97
|
-
path: string;
|
|
98
|
-
ref?: string;
|
|
99
|
-
startLine?: number;
|
|
100
|
-
endLine?: number;
|
|
101
|
-
maxLines?: number;
|
|
102
|
-
}): Promise<{
|
|
103
|
-
type: "directory";
|
|
104
|
-
entries: {
|
|
105
|
-
name: string;
|
|
106
|
-
type: "file" | "dir" | "submodule" | "symlink";
|
|
107
|
-
path: string;
|
|
108
|
-
}[];
|
|
109
|
-
path?: undefined;
|
|
110
|
-
sha?: undefined;
|
|
111
|
-
size?: undefined;
|
|
112
|
-
totalLines?: undefined;
|
|
113
|
-
content?: undefined;
|
|
114
|
-
startLine?: undefined;
|
|
115
|
-
endLine?: undefined;
|
|
116
|
-
truncated?: undefined;
|
|
117
|
-
} | {
|
|
118
|
-
type: "submodule" | "symlink";
|
|
119
|
-
path: string;
|
|
120
|
-
entries?: undefined;
|
|
121
|
-
sha?: undefined;
|
|
122
|
-
size?: undefined;
|
|
123
|
-
totalLines?: undefined;
|
|
124
|
-
content?: undefined;
|
|
125
|
-
startLine?: undefined;
|
|
126
|
-
endLine?: undefined;
|
|
127
|
-
truncated?: undefined;
|
|
128
|
-
} | {
|
|
129
|
-
type: "file";
|
|
130
|
-
path: string;
|
|
131
|
-
sha: string;
|
|
132
|
-
size: number;
|
|
133
|
-
totalLines: number;
|
|
134
|
-
content: string;
|
|
135
|
-
entries?: undefined;
|
|
136
|
-
startLine?: undefined;
|
|
137
|
-
endLine?: undefined;
|
|
138
|
-
truncated?: undefined;
|
|
139
|
-
} | {
|
|
140
|
-
type: "file";
|
|
141
|
-
path: string;
|
|
142
|
-
sha: string;
|
|
143
|
-
size: number;
|
|
144
|
-
totalLines: number;
|
|
145
|
-
startLine: number;
|
|
146
|
-
endLine: number;
|
|
147
|
-
truncated: boolean;
|
|
148
|
-
content: string;
|
|
149
|
-
entries?: undefined;
|
|
150
|
-
}>;
|
|
151
|
-
declare const getRepositoryTreeInputSchema: z.ZodObject<{
|
|
152
|
-
owner: z.ZodString;
|
|
153
|
-
repo: z.ZodString;
|
|
154
|
-
ref: z.ZodOptional<z.ZodString>;
|
|
155
|
-
path: z.ZodOptional<z.ZodString>;
|
|
156
|
-
recursive: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
157
|
-
}, z.core.$strip>;
|
|
158
|
-
declare const getRepositoryTreeDescription = "List the file and directory structure of a repository at a given ref. Prefer a path prefix over recursive true. If truncated, narrow path instead of recalling the full tree.";
|
|
159
|
-
declare function getRepositoryTreeCore({ token, owner, repo, ref, path, recursive }: {
|
|
160
|
-
token: string;
|
|
161
|
-
owner: string;
|
|
162
|
-
repo: string;
|
|
163
|
-
ref?: string;
|
|
164
|
-
path?: string;
|
|
165
|
-
recursive: boolean;
|
|
166
|
-
}): Promise<{
|
|
167
|
-
sha: string;
|
|
168
|
-
truncated: boolean;
|
|
169
|
-
path: string | undefined;
|
|
170
|
-
entries: {
|
|
171
|
-
path: string;
|
|
172
|
-
type: string;
|
|
173
|
-
size: number | undefined;
|
|
174
|
-
sha: string;
|
|
175
|
-
}[];
|
|
176
|
-
}>;
|
|
177
|
-
declare const createBranchInputSchema: z.ZodObject<{
|
|
178
|
-
owner: z.ZodString;
|
|
179
|
-
repo: z.ZodString;
|
|
180
|
-
branch: z.ZodString;
|
|
181
|
-
from: z.ZodOptional<z.ZodString>;
|
|
182
|
-
}, z.core.$strip>;
|
|
183
|
-
declare const createBranchDescription = "Create a new branch in a GitHub repository from an existing branch or commit SHA";
|
|
184
|
-
/** Idempotent when the branch already exists at the target SHA. Not idempotent otherwise. */
|
|
185
|
-
declare function createBranchCore({ token, owner, repo, branch, from }: {
|
|
186
|
-
token: string;
|
|
187
|
-
owner: string;
|
|
188
|
-
repo: string;
|
|
189
|
-
branch: string;
|
|
190
|
-
from?: string;
|
|
191
|
-
}): Promise<{
|
|
192
|
-
ref: string;
|
|
193
|
-
sha: string;
|
|
194
|
-
url: string;
|
|
195
|
-
}>;
|
|
196
|
-
declare const deleteBranchInputSchema: z.ZodObject<{
|
|
197
|
-
owner: z.ZodString;
|
|
198
|
-
repo: z.ZodString;
|
|
199
|
-
branch: z.ZodString;
|
|
200
|
-
}, z.core.$strip>;
|
|
201
|
-
declare const deleteBranchDescription = "Delete a branch from a GitHub repository permanently";
|
|
202
|
-
/** Not idempotent — deleting a branch that no longer exists fails with a 422. */
|
|
203
|
-
declare function deleteBranchCore({ token, owner, repo, branch }: {
|
|
204
|
-
token: string;
|
|
205
|
-
owner: string;
|
|
206
|
-
repo: string;
|
|
207
|
-
branch: string;
|
|
208
|
-
}): Promise<{
|
|
209
|
-
deleted: boolean;
|
|
210
|
-
branch: string;
|
|
211
|
-
}>;
|
|
212
|
-
declare const forkRepositoryInputSchema: z.ZodObject<{
|
|
213
|
-
owner: z.ZodString;
|
|
214
|
-
repo: z.ZodString;
|
|
215
|
-
organization: z.ZodOptional<z.ZodString>;
|
|
216
|
-
name: z.ZodOptional<z.ZodString>;
|
|
217
|
-
}, z.core.$strip>;
|
|
218
|
-
declare const forkRepositoryDescription = "Fork a GitHub repository to the authenticated user account or a specified organization";
|
|
219
|
-
/** Not idempotent — each call may create another fork attempt. */
|
|
220
|
-
declare function forkRepositoryCore({ token, owner, repo, organization, name }: {
|
|
221
|
-
token: string;
|
|
222
|
-
owner: string;
|
|
223
|
-
repo: string;
|
|
224
|
-
organization?: string;
|
|
225
|
-
name?: string;
|
|
226
|
-
}): Promise<{
|
|
227
|
-
name: string;
|
|
228
|
-
fullName: string;
|
|
229
|
-
url: string;
|
|
230
|
-
cloneUrl: string;
|
|
231
|
-
sshUrl: string;
|
|
232
|
-
defaultBranch: string;
|
|
233
|
-
private: boolean;
|
|
234
|
-
parent: {
|
|
235
|
-
fullName: string;
|
|
236
|
-
url: string;
|
|
237
|
-
} | null;
|
|
238
|
-
}>;
|
|
239
|
-
declare const createRepositoryInputSchema: z.ZodObject<{
|
|
240
|
-
name: z.ZodString;
|
|
241
|
-
description: z.ZodOptional<z.ZodString>;
|
|
242
|
-
isPrivate: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
243
|
-
autoInit: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
244
|
-
gitignoreTemplate: z.ZodOptional<z.ZodString>;
|
|
245
|
-
licenseTemplate: z.ZodOptional<z.ZodString>;
|
|
246
|
-
org: z.ZodOptional<z.ZodString>;
|
|
247
|
-
}, z.core.$strip>;
|
|
248
|
-
declare const createRepositoryDescription = "Create a new GitHub repository for the authenticated user or a specified organization";
|
|
249
|
-
/** Not idempotent — each call creates a new repository. */
|
|
250
|
-
declare function createRepositoryCore({ token, name, description, isPrivate, autoInit, gitignoreTemplate, licenseTemplate, org }: {
|
|
251
|
-
token: string;
|
|
252
|
-
name: string;
|
|
253
|
-
description?: string;
|
|
254
|
-
isPrivate: boolean;
|
|
255
|
-
autoInit: boolean;
|
|
256
|
-
gitignoreTemplate?: string;
|
|
257
|
-
licenseTemplate?: string;
|
|
258
|
-
org?: string;
|
|
259
|
-
}): Promise<{
|
|
260
|
-
name: string;
|
|
261
|
-
fullName: string;
|
|
262
|
-
description: string | null;
|
|
263
|
-
url: string;
|
|
264
|
-
cloneUrl: string;
|
|
265
|
-
sshUrl: string;
|
|
266
|
-
defaultBranch: string;
|
|
267
|
-
private: boolean;
|
|
268
|
-
createdAt: string;
|
|
269
|
-
}>;
|
|
270
|
-
declare const createOrUpdateFileInputSchema: z.ZodObject<{
|
|
271
|
-
owner: z.ZodString;
|
|
272
|
-
repo: z.ZodString;
|
|
273
|
-
path: z.ZodString;
|
|
274
|
-
message: z.ZodString;
|
|
275
|
-
content: z.ZodString;
|
|
276
|
-
branch: z.ZodOptional<z.ZodString>;
|
|
277
|
-
sha: z.ZodOptional<z.ZodString>;
|
|
278
|
-
}, z.core.$strip>;
|
|
279
|
-
declare const createOrUpdateFileDescription = "Create or update a file in a GitHub repository. Provide the SHA when updating an existing file.";
|
|
280
|
-
/** Idempotent when updating with sha and content is unchanged. Not idempotent for new commits. */
|
|
281
|
-
declare function createOrUpdateFileCore({ token, owner, repo, path, message, content, branch, sha, author, committer, coAuthors }: {
|
|
282
|
-
token: string;
|
|
283
|
-
owner: string;
|
|
284
|
-
repo: string;
|
|
285
|
-
path: string;
|
|
286
|
-
message: string;
|
|
287
|
-
content: string;
|
|
288
|
-
branch?: string;
|
|
289
|
-
sha?: string;
|
|
290
|
-
author?: CommitIdentity;
|
|
291
|
-
committer?: CommitIdentity;
|
|
292
|
-
coAuthors?: CommitIdentity[];
|
|
293
|
-
}): Promise<{
|
|
294
|
-
path: string;
|
|
295
|
-
sha: string;
|
|
296
|
-
skipped: true;
|
|
297
|
-
message: string;
|
|
298
|
-
commitSha?: undefined;
|
|
299
|
-
commitUrl?: undefined;
|
|
300
|
-
} | {
|
|
301
|
-
path: string | undefined;
|
|
302
|
-
sha: string | undefined;
|
|
303
|
-
commitSha: string | undefined;
|
|
304
|
-
commitUrl: string | undefined;
|
|
305
|
-
skipped?: undefined;
|
|
306
|
-
message?: undefined;
|
|
307
|
-
}>;
|
|
308
|
-
//#endregion
|
|
309
64
|
//#region src/tools/repository.d.ts
|
|
310
65
|
/** Get information about a GitHub repository including description, stars, forks, language, and default branch. */
|
|
311
66
|
declare const getRepository: (token: GithubTokenInput) => GithubTool;
|
|
@@ -325,10 +80,22 @@ declare const forkRepository: (token: GithubTokenInput, { needsApproval }?: Tool
|
|
|
325
80
|
declare const createRepository: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
326
81
|
/** Create or update a file in a GitHub repository. Provide the SHA when updating an existing file. Requires approval by default. */
|
|
327
82
|
declare const createOrUpdateFile: (token: GithubTokenInput, { needsApproval, author, committer, coAuthors }?: CommitToolOptions) => GithubTool;
|
|
83
|
+
/** Edit files in one commit, by exact text replacement or whole contents, on a new or existing branch, and optionally open a pull request. Requires approval by default. */
|
|
84
|
+
declare const editFiles: (token: GithubTokenInput, { needsApproval, author, committer, coAuthors }?: CommitToolOptions) => GithubTool;
|
|
85
|
+
/** List the required checks, required reviews and other rules that protect a branch. */
|
|
86
|
+
declare const getBranchRules: (token: GithubTokenInput) => GithubTool;
|
|
87
|
+
/** Get a user's permission and role on a repository. */
|
|
88
|
+
declare const getCollaboratorPermission: (token: GithubTokenInput) => GithubTool;
|
|
328
89
|
//#endregion
|
|
329
90
|
//#region src/tools/pull-requests.d.ts
|
|
330
91
|
type MergeToolOptions = ToolOptions & {
|
|
331
92
|
coAuthors?: CommitIdentity[];
|
|
93
|
+
/** Base branches the pull request may be merged into, as in `guardrails.branches`. */
|
|
94
|
+
branches?: string[];
|
|
95
|
+
};
|
|
96
|
+
type UpdateBranchToolOptions = ToolOptions & {
|
|
97
|
+
/** Repositories and branches the pull request's head must match, as in `guardrails`. */
|
|
98
|
+
guardrails?: Pick<GithubGuardrails, 'repositories' | 'branches'>;
|
|
332
99
|
};
|
|
333
100
|
/** List pull requests for a GitHub repository. */
|
|
334
101
|
declare const listPullRequests: (token: GithubTokenInput) => GithubTool;
|
|
@@ -337,7 +104,7 @@ declare const getPullRequest: (token: GithubTokenInput) => GithubTool;
|
|
|
337
104
|
/** Create a new pull request in a GitHub repository. Requires approval by default. */
|
|
338
105
|
declare const createPullRequest: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
339
106
|
/** Merge a pull request. Requires approval by default. */
|
|
340
|
-
declare const mergePullRequest: (token: GithubTokenInput, { needsApproval, coAuthors }?: MergeToolOptions) => GithubTool;
|
|
107
|
+
declare const mergePullRequest: (token: GithubTokenInput, { needsApproval, coAuthors, branches }?: MergeToolOptions) => GithubTool;
|
|
341
108
|
/** Update a pull request — title, body, state, base branch, or draft status. Requires approval by default. */
|
|
342
109
|
declare const updatePullRequest: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
343
110
|
/** Add a comment to a pull request. Requires approval by default. */
|
|
@@ -360,6 +127,12 @@ declare const replyToReviewComment: (token: GithubTokenInput, { needsApproval }?
|
|
|
360
127
|
declare const resolveReviewThread: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
361
128
|
/** Request reviews from users or teams on a pull request. Requires approval by default. */
|
|
362
129
|
declare const requestReviewers: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
130
|
+
/** Merge a pull request automatically once its required checks and reviews pass. Requires approval by default. */
|
|
131
|
+
declare const enablePullRequestAutoMerge: (token: GithubTokenInput, { needsApproval, coAuthors, branches }?: MergeToolOptions) => GithubTool;
|
|
132
|
+
/** Cancel a pending auto-merge. Requires approval by default. */
|
|
133
|
+
declare const disablePullRequestAutoMerge: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
134
|
+
/** Merge a pull request's base branch into its head branch. Requires approval by default. */
|
|
135
|
+
declare const updatePullRequestBranch: (token: GithubTokenInput, { needsApproval, guardrails }?: UpdateBranchToolOptions) => GithubTool;
|
|
363
136
|
//#endregion
|
|
364
137
|
//#region src/tools/issues.d.ts
|
|
365
138
|
/** List issues for a GitHub repository (excludes pull requests). */
|
|
@@ -396,6 +169,12 @@ declare const deleteLabel: (token: GithubTokenInput, { needsApproval }?: ToolOpt
|
|
|
396
169
|
declare const addAssignees: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
397
170
|
/** Remove assignees from an issue or pull request. Requires approval by default. */
|
|
398
171
|
declare const removeAssignees: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
172
|
+
/** List milestones in a GitHub repository with their due dates and issue counts. */
|
|
173
|
+
declare const listMilestones: (token: GithubTokenInput) => GithubTool;
|
|
174
|
+
/** List the sub-issues of an issue. */
|
|
175
|
+
declare const listSubIssues: (token: GithubTokenInput) => GithubTool;
|
|
176
|
+
/** Add an existing issue as a sub-issue of another issue. Requires approval by default. */
|
|
177
|
+
declare const addSubIssue: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
399
178
|
//#endregion
|
|
400
179
|
//#region src/tools/reactions.d.ts
|
|
401
180
|
/** List reactions on an issue or pull request conversation. */
|
|
@@ -478,6 +257,16 @@ declare const rerunWorkflowRun: (token: GithubTokenInput, { needsApproval }?: To
|
|
|
478
257
|
declare const listCheckRuns: (token: GithubTokenInput) => GithubTool;
|
|
479
258
|
/** Get the combined commit status (Statuses API — legacy CI integrations) for a commit, branch, or tag. */
|
|
480
259
|
declare const getCombinedStatus: (token: GithubTokenInput) => GithubTool;
|
|
260
|
+
/** Report a result on a commit as a commit status. Requires approval by default. */
|
|
261
|
+
declare const createCommitStatus: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
262
|
+
//#endregion
|
|
263
|
+
//#region src/tools/security.d.ts
|
|
264
|
+
/** List code scanning alerts for a repository, with the rule, severity and location. */
|
|
265
|
+
declare const listCodeScanningAlerts: (token: GithubTokenInput) => GithubTool;
|
|
266
|
+
/** List Dependabot alerts for vulnerable dependencies, with the advisory and the first patched version. */
|
|
267
|
+
declare const listDependabotAlerts: (token: GithubTokenInput) => GithubTool;
|
|
268
|
+
/** List secret scanning alerts for a repository. The secret itself is never returned. */
|
|
269
|
+
declare const listSecretScanningAlerts: (token: GithubTokenInput) => GithubTool;
|
|
481
270
|
//#endregion
|
|
482
271
|
//#region src/tools/releases.d.ts
|
|
483
272
|
/** List releases for a GitHub repository, newest first (includes drafts and prereleases). */
|
|
@@ -576,10 +365,33 @@ declare const githubToolsErrors: import("evlog").ErrorCatalog<"github_tools", {
|
|
|
576
365
|
readonly fix: "Keep Connect resolver calls on the tool execute path; use static `connect` params when no execution context is available.";
|
|
577
366
|
readonly link: "https://github-tools.com/frameworks/eve-extension#per-user-tokens";
|
|
578
367
|
};
|
|
368
|
+
readonly SESSION_SCOPE_NEEDS_TOOL_SELECTION: {
|
|
369
|
+
readonly status: 500;
|
|
370
|
+
readonly message: "`evaluation.scope: 'session'` on `createGithubAgent` does not work with `evaluation.selection: 'presets'`.";
|
|
371
|
+
readonly why: "With presets, a request later in the conversation could need a tool outside the presets picked for the first request, and the agent would have no way to reach it. Tool selection adds `callGithubTool` for that.";
|
|
372
|
+
readonly fix: "Remove `selection: 'presets'` to pick single tools, the default, or remove `scope: 'session'` to route presets for each request. The eve extension accepts both together, because it defers unlisted tools.";
|
|
373
|
+
readonly link: "https://github-tools.com/guide/presets#keep-the-prompt-cache-across-requests";
|
|
374
|
+
};
|
|
375
|
+
readonly DURABLE_GENERATE_UNAVAILABLE: {
|
|
376
|
+
readonly status: 500;
|
|
377
|
+
readonly message: "`createDurableGithubAgent(...).generate()` needs `WorkflowAgent.generate()` from `@ai-sdk/workflow` 2.0.59 or later.";
|
|
378
|
+
readonly why: "The installed `@ai-sdk/workflow` has no non-streaming `WorkflowAgent.generate()`.";
|
|
379
|
+
readonly fix: "Upgrade `@ai-sdk/workflow` to 2.0.59 or later, or call `.stream()` instead.";
|
|
380
|
+
readonly link: "https://github-tools.com/frameworks/vercel-workflow#non-streaming-bot-background-job";
|
|
381
|
+
};
|
|
382
|
+
readonly GUARDRAIL_BLOCKED: {
|
|
383
|
+
readonly status: 403;
|
|
384
|
+
readonly message: ({ reason }: {
|
|
385
|
+
reason: string;
|
|
386
|
+
}) => string;
|
|
387
|
+
readonly why: "The call targets a repository or branch outside the `guardrails` these tools were created with. Guardrails apply whoever approves the call.";
|
|
388
|
+
readonly fix: "Act on a repository and branch the guardrails allow, such as a branch matching the allowed patterns, or ask the user to change `guardrails`.";
|
|
389
|
+
readonly link: "https://github-tools.com/guide/approval-control#guardrails";
|
|
390
|
+
};
|
|
579
391
|
readonly EVALUATION_UNAVAILABLE: {
|
|
580
392
|
readonly status: 500;
|
|
581
|
-
readonly message: "`requireApproval: 'auto'` and `preset: 'auto'` need `experimental_evaluate` from `ai` 7.0.105 or later.";
|
|
582
|
-
readonly why: "The installed `ai` package
|
|
393
|
+
readonly message: "`requireApproval: 'auto'` and `preset: 'auto'` need `experimental_decide` (or `experimental_evaluate`) from `ai` 7.0.105 or later.";
|
|
394
|
+
readonly why: "The installed `ai` package exports neither `experimental_decide` nor `experimental_evaluate`, which run the decision model behind the `'auto'` options.";
|
|
583
395
|
readonly fix: "Upgrade `ai` to 7.0.105 or later, or replace `'auto'` with `true` / `false` or an explicit preset.";
|
|
584
396
|
readonly link: "https://github-tools.com/guide/approval-control#auto-approval";
|
|
585
397
|
};
|
|
@@ -590,7 +402,7 @@ declare const githubToolsErrors: import("evlog").ErrorCatalog<"github_tools", {
|
|
|
590
402
|
fallback: string;
|
|
591
403
|
detail: string;
|
|
592
404
|
}) => string;
|
|
593
|
-
readonly why: "The `
|
|
405
|
+
readonly why: "The `experimental_decide` call behind `requireApproval: 'auto'` or `preset: 'auto'` threw — typically the model is not enabled for the AI Gateway project, the team has no credits, or the gateway is rate limiting or unavailable.";
|
|
594
406
|
readonly fix: "Check the evaluation model is available to the project on AI Gateway and has credits, or set `evaluation.model` to one that is. The agent keeps running on the fallback until then.";
|
|
595
407
|
readonly link: "https://github-tools.com/guide/approval-control#auto-approval";
|
|
596
408
|
};
|
|
@@ -646,47 +458,6 @@ declare module 'evlog' {
|
|
|
646
458
|
}
|
|
647
459
|
}
|
|
648
460
|
//#endregion
|
|
649
|
-
//#region src/agents.d.ts
|
|
650
|
-
type AgentOptions = Omit<ToolLoopAgentSettings<ToolSet>, 'model' | 'tools' | 'instructions'>;
|
|
651
|
-
type CreateGithubAgentOptions = AgentOptions & GithubToolsBaseOptions & {
|
|
652
|
-
model: ToolLoopAgentSettings<ToolSet>['model'];
|
|
653
|
-
/**
|
|
654
|
-
* Restrict tools and system prompt to a predefined preset.
|
|
655
|
-
*
|
|
656
|
-
* Selects a subset of tools and, when a single preset is passed,
|
|
657
|
-
* sets a matching system prompt. Combine presets with an array to merge tool sets.
|
|
658
|
-
*
|
|
659
|
-
* `'auto'` picks presets per call from the latest user message with an evaluation model
|
|
660
|
-
* (Jev by default, see `evaluation`), then narrows `activeTools` and uses the matching
|
|
661
|
-
* system prompt. Combines at most two presets (`evaluation.maxPresets`), and only uses
|
|
662
|
-
* read-only `repo-explorer` when no other preset qualifies; when none clears the threshold,
|
|
663
|
-
* uses the most likely one. Never exposes the full catalog. Needs `ai` 7.0.105 or later.
|
|
664
|
-
*
|
|
665
|
-
* @see {@link GithubToolPreset} for available presets and included tools.
|
|
666
|
-
*/
|
|
667
|
-
preset?: GithubToolPreset | GithubToolPreset[] | 'auto';
|
|
668
|
-
/**
|
|
669
|
-
* Fully replace the default system prompt.
|
|
670
|
-
* When set, `preset` system prompts and `additionalInstructions` are ignored.
|
|
671
|
-
* `context` is still appended when provided.
|
|
672
|
-
*/
|
|
673
|
-
instructions?: string;
|
|
674
|
-
/**
|
|
675
|
-
* Append text to the preset-specific (or default) system prompt.
|
|
676
|
-
* Ignored when `instructions` is set.
|
|
677
|
-
*/
|
|
678
|
-
additionalInstructions?: string;
|
|
679
|
-
};
|
|
680
|
-
declare function createGithubAgent(options: CreateGithubAgentOptions & {
|
|
681
|
-
preset?: undefined | 'auto';
|
|
682
|
-
}): ToolLoopAgent<never, AllGithubTools>;
|
|
683
|
-
declare function createGithubAgent<P extends GithubToolPreset>(options: CreateGithubAgentOptions & {
|
|
684
|
-
preset: P;
|
|
685
|
-
}): ToolLoopAgent<never, Pick<AllGithubTools, PresetToolName<P>>>;
|
|
686
|
-
declare function createGithubAgent<P extends readonly GithubToolPreset[]>(options: CreateGithubAgentOptions & {
|
|
687
|
-
preset: P;
|
|
688
|
-
}): ToolLoopAgent<never, Pick<AllGithubTools, CombinedPresetToolNames<P>>>;
|
|
689
|
-
//#endregion
|
|
690
461
|
//#region src/index.d.ts
|
|
691
462
|
type GithubToolsOptions = GithubToolsBaseOptions & {
|
|
692
463
|
/**
|
|
@@ -721,5 +492,5 @@ declare function createGithubTools<P extends readonly GithubToolPreset[]>(option
|
|
|
721
492
|
declare function createGithubTools(options?: GithubToolsOptions): AllGithubTools | Pick<AllGithubTools, GithubToolName>;
|
|
722
493
|
type GithubTools = AllGithubTools & ToolSet;
|
|
723
494
|
//#endregion
|
|
724
|
-
export {
|
|
725
|
-
//# sourceMappingURL=index-
|
|
495
|
+
export { addAssignees as $, resolveToolGuidance as $t, createGist as A, mergePullRequest as At, listCommits as B, deleteBranch as Bt, getWorkflowJobLogs as C, disablePullRequestAutoMerge as Ct, listWorkflows as D, listPullRequestReviewThreads as Dt, listWorkflowRuns as E, listPullRequestFiles as Et, listGists as F, updatePullRequestBranch as Ft, markNotificationRead as G, getFileContent as Gt, searchIssues as H, forkRepository as Ht, updateGist as I, updatePullRequestComment as It, listDiscussions as J, listBranches as Jt, addDiscussionComment as K, getRepository as Kt, compareCommits as L, createBranch as Lt, deleteGist as M, requestReviewers as Mt, getGist as N, resolveReviewThread as Nt, rerunWorkflowRun as O, listPullRequestReviews as Ot, listGistComments as P, updatePullRequest as Pt, listIssueReactions as Q, createGithubAgent as Qt, getBlame as R, createOrUpdateFile as Rt, cancelWorkflowRun as S, deletePullRequestComment as St, listWorkflowJobs as T, getPullRequest as Tt, searchRepositories as U, getBranchRules as Ut, searchCode as V, editFiles as Vt, listNotifications as W, getCollaboratorPermission as Wt, addIssueReaction as X, CALL_GITHUB_TOOL as Xt, addCommentReaction as Y, createOctokit as Yt, listCommentReactions as Z, CreateGithubAgentOptions as Zt, listDependabotAlerts as _, updateIssueComment as _t, GithubRateLimit as a, createLabel as at, getCombinedStatus as b, createPullRequest as bt, getPullRequestContext as c, getIssue as ct, deleteRelease as d, listLabels as dt, addIssueComment as et, getLatestRelease as f, listMilestones as ft, listCodeScanningAlerts as g, updateIssue as gt, updateRelease as h, removeLabel as ht, githubToolsErrors as i, createIssue as it, createGistComment as j, replyToReviewComment as jt, triggerWorkflow as k, listPullRequests as kt, getReleaseContext as l, listIssueComments as lt, listReleases as m, removeAssignees as mt, GithubToolsOptions as n, addSubIssue as nt, getCiFailureContext as o, deleteIssueComment as ot, getRelease as p, listSubIssues as pt, getDiscussion as q, getRepositoryTree as qt, createGithubTools as r, closeIssue as rt, getIssueContext as s, deleteLabel as st, GithubTools as t, addLabels as tt, createRelease as u, listIssues as ut, listSecretScanningAlerts as v, updateLabel as vt, getWorkflowRun as w, enablePullRequestAutoMerge as wt, listCheckRuns as x, createPullRequestReview as xt, createCommitStatus as y, addPullRequestComment as yt, getCommit as z, createRepository as zt };
|
|
496
|
+
//# sourceMappingURL=index-CzzrtCVj.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-CzzrtCVj.d.mts","names":[],"sources":["../src/core/instructions.ts","../src/agents.ts","../src/client.ts","../src/tools/repository.ts","../src/tools/pull-requests.ts","../src/tools/issues.ts","../src/tools/reactions.ts","../src/tools/discussions.ts","../src/tools/notifications.ts","../src/tools/search.ts","../src/tools/commits.ts","../src/tools/gists.ts","../src/tools/workflows.ts","../src/tools/checks.ts","../src/tools/security.ts","../src/tools/releases.ts","../src/tools/bundles.ts","../src/core/rate-limit.ts","../src/core/errors.ts","../src/index.ts"],"mappings":";;;;;;;;;;;iBAmKgB,oBAAoB;EAClC,SAAS,mBAAmB;EAC5B,UAAU;;;;;cCjJC;KA+FR,eAAe,KAAK,sBAAsB;KAEnC,2BAA2B,eAAe;EACpD,OAAO,sBAAsB;;;;;;;;;;;;;;;;EAgB7B,SAAS,mBAAmB;;;;;;EAM5B;;;;;EAKA;;iBA2Dc,kBAAkB,SAAS;EAA6B;IAAgC,qBAAqB;iBAC7G,kBAAkB,UAAU,kBAC1C,SAAS;EAA6B,QAAQ;IAC7C,qBAAqB,KAAK,gBAAgB,eAAe;iBAC5C,kBAAkB,mBAAmB,oBACnD,SAAS;EAA6B,QAAQ;IAC7C,qBAAqB,KAAK,gBAAgB,wBAAwB;;;iBCjMrD,cAAc,gBAAgB;;;;cCiCjC,gBAAiB,OAAO,qBAAmB;;cAa3C,eAAgB,OAAO,qBAAmB;;cAa1C,i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B,kBAA0B,gBAAmB;;;;cCxEvF,wBAAyB,OAAO,qBAAmB;;cAcnD,kBAAmB,OAAO,qBAAmB;;cAa7C,oBAAqB,OAAO,qBAAmB;;cAa/C,sBAAuB,OAAO,qBAAmB;;;;;;;KC7DlD;EACV;EACA;EACA;EACA;EACA;;;;;;;;;;;cCCW,mCAAiB;;;;;;;;;;aAUD,YAAA;MAAE;;;;;;;;aAQL,YAAA;MAAE;;;;;;;;aAQC,YAAA;MAAE;;;;;;;;aAQE,YAAA,QAAA;MAAE;MAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aA+BzB,YAAA;MAAE;;;;;;;;;;;;;;;aAce,YAAA,OAAA,UAAA;MAAE;MAAe;MAAkB;;;;;;;;aAQpD,YAAA;MAAE;;;;;;;;aAOF,YAAA;MAAE;;;;;;;;aAOF,YAAA;MAAE;;;;;;;;aAOF,YAAA;MAAE;;;;;;;;aAOF,YAAA;MAAE;;;;;;;;YAQhB;IACR,qBAAqB;;;;;KCzFb,qBAAqB;;;;;;;;;;;;;;;;;;;EAmB/B,SAAS,mBAAmB;;iBAGd,kBAAkB,UAAU;EAA2B;IAAuB;iBAC9E,kBAAkB,UAAU,kBAC1C,SAAS;EAA2B,QAAQ;IAC3C,KAAK,gBAAgB,eAAe;iBACvB,kBAAkB,mBAAmB,oBACnD,SAAS;EAA2B,QAAQ;IAC3C,KAAK,gBAAgB,wBAAwB;iBAChC,kBAAkB,UAAU,qBAAqB,iBAAiB,KAAK,gBAAgB;KAgO3F,cAAc,iBAAiB"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { C as
|
|
3
|
-
export { AUTO_APPROVAL_TOOLS, type AllGithubTools, type ApprovalConfig, type CombinedPresetToolNames, type CommitIdentity, type CommitToolOptions, type CreateGithubAgentOptions, DEFAULT_EVALUATION_MODEL, GITHUB_TOOL_NAMES, GITHUB_WRITE_TOOLS, type GithubEvaluationOptions, type GithubRateLimit, type GithubTokenCall, type GithubTokenInput, type GithubTool, type GithubToolName, type GithubToolPreset, GithubTools, type GithubToolsContext, type GithubToolsForPreset, GithubToolsOptions, type GithubWriteToolName, type Octokit, PRESET_TOOLS, type PickGithubTools, type PresetToolName, type StaticApprovalConfig, type ToolApprovalMode, type ToolOptions, type ToolOverrides, addAssignees, addCommentReaction, addDiscussionComment, addIssueComment, addIssueReaction, addLabels, addPullRequestComment, cancelWorkflowRun, closeIssue, compareCommits, createBranch, createGist, createGistComment, createGithubAgent, createGithubTools, createIssue, createLabel, createOctokit, createOrUpdateFile, createPullRequest, createPullRequestReview, createRelease, createRepository, deleteBranch, deleteGist, deleteIssueComment, deleteLabel, deletePullRequestComment, deleteRelease, forkRepository, getBlame, getCiFailureContext, getCombinedStatus, getCommit, getDiscussion, getFileContent, getGist, getIssue, getIssueContext, getLatestRelease, getPullRequest, getPullRequestContext, getRelease, getReleaseContext, getRepository, getRepositoryTree, getWorkflowJobLogs, getWorkflowRun, githubToolsErrors, listBranches, listCheckRuns, listCommentReactions, listCommits, listDiscussions, listGistComments, listGists, listIssueComments, listIssueReactions, listIssues, listLabels, listNotifications, listPullRequestFiles, listPullRequestReviewThreads, listPullRequestReviews, listPullRequests, listReleases, listWorkflowJobs, listWorkflowRuns, listWorkflows, markNotificationRead, mergePullRequest, removeAssignees, removeLabel, replyToReviewComment, requestReviewers, rerunWorkflowRun, resolveGithubToken, resolveReviewThread, searchCode, searchIssues, searchRepositories, triggerWorkflow, updateGist, updateIssue, updateIssueComment, updateLabel, updatePullRequest, updatePullRequestComment, updateRelease };
|
|
1
|
+
import { A as DEFAULT_EVALUATION_MODEL, B as PRESET_TOOLS, D as selectTools, E as selectPresets, F as withGithubGuardrails, G as GithubWriteToolName, H as GITHUB_TOOL_NAMES, I as GithubGuardrails, L as CORE_READ_TOOLS, M as GithubTokenCall, N as GithubTokenInput, O as GITHUB_WRITE_TOOLS, P as resolveGithubToken, R as CombinedPresetToolNames, V as PresetToolName, W as GithubToolName, a as GithubToolsForPreset, c as CommitIdentity, d as Octokit, f as ToolOptions, g as ToolApprovalMode, h as StaticApprovalConfig, k as AUTO_APPROVAL_TOOLS, l as CommitToolOptions, m as ApprovalConfig, n as GithubDryRunResult, o as PickGithubTools, p as ToolOverrides, r as AllGithubTools, s as GithubToolsContext, t as GithubDryRunApproval, u as GithubTool, v as GithubEvaluationOptions, z as GithubToolPreset } from "./dry-run-DXckOam2.mjs";
|
|
2
|
+
import { $ as addAssignees, A as createGist, At as mergePullRequest, B as listCommits, Bt as deleteBranch, C as getWorkflowJobLogs, Ct as disablePullRequestAutoMerge, D as listWorkflows, Dt as listPullRequestReviewThreads, E as listWorkflowRuns, Et as listPullRequestFiles, F as listGists, Ft as updatePullRequestBranch, G as markNotificationRead, Gt as getFileContent, H as searchIssues, Ht as forkRepository, I as updateGist, It as updatePullRequestComment, J as listDiscussions, Jt as listBranches, K as addDiscussionComment, Kt as getRepository, L as compareCommits, Lt as createBranch, M as deleteGist, Mt as requestReviewers, N as getGist, Nt as resolveReviewThread, O as rerunWorkflowRun, Ot as listPullRequestReviews, P as listGistComments, Pt as updatePullRequest, Q as listIssueReactions, Qt as createGithubAgent, R as getBlame, Rt as createOrUpdateFile, S as cancelWorkflowRun, St as deletePullRequestComment, T as listWorkflowJobs, Tt as getPullRequest, U as searchRepositories, Ut as getBranchRules, V as searchCode, Vt as editFiles, W as listNotifications, Wt as getCollaboratorPermission, X as addIssueReaction, Xt as CALL_GITHUB_TOOL, Y as addCommentReaction, Yt as createOctokit, Z as listCommentReactions, Zt as CreateGithubAgentOptions, _ as listDependabotAlerts, _t as updateIssueComment, a as GithubRateLimit, at as createLabel, b as getCombinedStatus, bt as createPullRequest, c as getPullRequestContext, ct as getIssue, d as deleteRelease, dt as listLabels, et as addIssueComment, f as getLatestRelease, ft as listMilestones, g as listCodeScanningAlerts, gt as updateIssue, h as updateRelease, ht as removeLabel, i as githubToolsErrors, it as createIssue, j as createGistComment, jt as replyToReviewComment, k as triggerWorkflow, kt as listPullRequests, l as getReleaseContext, lt as listIssueComments, m as listReleases, mt as removeAssignees, n as GithubToolsOptions, nt as addSubIssue, o as getCiFailureContext, ot as deleteIssueComment, p as getRelease, pt as listSubIssues, q as getDiscussion, qt as getRepositoryTree, r as createGithubTools, rt as closeIssue, s as getIssueContext, st as deleteLabel, t as GithubTools, tt as addLabels, u as createRelease, ut as listIssues, v as listSecretScanningAlerts, vt as updateLabel, w as getWorkflowRun, wt as enablePullRequestAutoMerge, x as listCheckRuns, xt as createPullRequestReview, y as createCommitStatus, yt as addPullRequestComment, z as getCommit, zt as createRepository } from "./index-CzzrtCVj.mjs";
|
|
3
|
+
export { AUTO_APPROVAL_TOOLS, type AllGithubTools, type ApprovalConfig, CALL_GITHUB_TOOL, CORE_READ_TOOLS, type CombinedPresetToolNames, type CommitIdentity, type CommitToolOptions, type CreateGithubAgentOptions, DEFAULT_EVALUATION_MODEL, GITHUB_TOOL_NAMES, GITHUB_WRITE_TOOLS, type GithubDryRunApproval, type GithubDryRunResult, type GithubEvaluationOptions, type GithubGuardrails, type GithubRateLimit, type GithubTokenCall, type GithubTokenInput, type GithubTool, type GithubToolName, type GithubToolPreset, GithubTools, type GithubToolsContext, type GithubToolsForPreset, GithubToolsOptions, type GithubWriteToolName, type Octokit, PRESET_TOOLS, type PickGithubTools, type PresetToolName, type StaticApprovalConfig, type ToolApprovalMode, type ToolOptions, type ToolOverrides, addAssignees, addCommentReaction, addDiscussionComment, addIssueComment, addIssueReaction, addLabels, addPullRequestComment, addSubIssue, cancelWorkflowRun, closeIssue, compareCommits, createBranch, createCommitStatus, createGist, createGistComment, createGithubAgent, createGithubTools, createIssue, createLabel, createOctokit, createOrUpdateFile, createPullRequest, createPullRequestReview, createRelease, createRepository, deleteBranch, deleteGist, deleteIssueComment, deleteLabel, deletePullRequestComment, deleteRelease, disablePullRequestAutoMerge, editFiles, enablePullRequestAutoMerge, forkRepository, getBlame, getBranchRules, getCiFailureContext, getCollaboratorPermission, getCombinedStatus, getCommit, getDiscussion, getFileContent, getGist, getIssue, getIssueContext, getLatestRelease, getPullRequest, getPullRequestContext, getRelease, getReleaseContext, getRepository, getRepositoryTree, getWorkflowJobLogs, getWorkflowRun, githubToolsErrors, listBranches, listCheckRuns, listCodeScanningAlerts, listCommentReactions, listCommits, listDependabotAlerts, listDiscussions, listGistComments, listGists, listIssueComments, listIssueReactions, listIssues, listLabels, listMilestones, listNotifications, listPullRequestFiles, listPullRequestReviewThreads, listPullRequestReviews, listPullRequests, listReleases, listSecretScanningAlerts, listSubIssues, listWorkflowJobs, listWorkflowRuns, listWorkflows, markNotificationRead, mergePullRequest, removeAssignees, removeLabel, replyToReviewComment, requestReviewers, rerunWorkflowRun, resolveGithubToken, resolveReviewThread, searchCode, searchIssues, searchRepositories, selectPresets, selectTools, triggerWorkflow, updateGist, updateIssue, updateIssueComment, updateLabel, updatePullRequest, updatePullRequestBranch, updatePullRequestComment, updateRelease, withGithubGuardrails };
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { C as withGithubGuardrails, S as resolveGithubToken, Ya as createOctokit, Za as githubToolsErrors, _ as CORE_READ_TOOLS, c as AUTO_APPROVAL_TOOLS, g as GITHUB_TOOL_NAMES, l as DEFAULT_EVALUATION_MODEL, t as GITHUB_WRITE_TOOLS, v as PRESET_TOOLS } from "./write-tools-w-8tjnDQ.mjs";
|
|
2
|
+
import { d as selectTools, u as selectPresets } from "./evaluation-DJHINyAu.mjs";
|
|
3
|
+
import { $ as addLabels, A as deleteGist, At as requestReviewers, B as searchIssues, Bt as forkRepository, C as listWorkflowJobs, Ct as getPullRequest, D as triggerWorkflow, Dt as listPullRequests, E as rerunWorkflowRun, Et as listPullRequestReviews, F as compareCommits, Ft as createBranch, G as getDiscussion, Gt as getRepositoryTree, H as listNotifications, Ht as getCollaboratorPermission, I as getBlame, It as createOrUpdateFile, J as addIssueReaction, K as listDiscussions, Kt as listBranches, L as getCommit, Lt as createRepository, M as listGistComments, Mt as updatePullRequest, N as listGists, Nt as updatePullRequestBranch, O as createGist, Ot as mergePullRequest, P as updateGist, Pt as updatePullRequestComment, Q as addIssueComment, R as listCommits, Rt as deleteBranch, S as getWorkflowRun, St as enablePullRequestAutoMerge, T as listWorkflows, Tt as listPullRequestReviewThreads, U as markNotificationRead, Ut as getFileContent, V as searchRepositories, Vt as getBranchRules, W as addDiscussionComment, Wt as getRepository, X as listIssueReactions, Y as listCommentReactions, Z as addAssignees, _ as createCommitStatus, _t as addPullRequestComment, a as getIssueContext, at as deleteLabel, b as cancelWorkflowRun, bt as deletePullRequestComment, c as createRelease, ct as listIssues, d as getRelease, dt as listSubIssues, et as addSubIssue, f as listReleases, ft as removeAssignees, g as listSecretScanningAlerts, gt as updateLabel, h as listDependabotAlerts, ht as updateIssueComment, i as getCiFailureContext, it as deleteIssueComment, j as getGist, jt as resolveReviewThread, k as createGistComment, kt as replyToReviewComment, l as deleteRelease, lt as listLabels, m as listCodeScanningAlerts, mt as updateIssue, n as CALL_GITHUB_TOOL, nt as createIssue, o as getPullRequestContext, ot as getIssue, p as updateRelease, pt as removeLabel, q as addCommentReaction, r as createGithubAgent, rt as createLabel, s as getReleaseContext, st as listIssueComments, t as createGithubTools, tt as closeIssue, u as getLatestRelease, ut as listMilestones, v as getCombinedStatus, vt as createPullRequest, w as listWorkflowRuns, wt as listPullRequestFiles, x as getWorkflowJobLogs, xt as disablePullRequestAutoMerge, y as listCheckRuns, yt as createPullRequestReview, z as searchCode, zt as editFiles } from "./src-BlhrSieS.mjs";
|
|
4
|
+
export { AUTO_APPROVAL_TOOLS, CALL_GITHUB_TOOL, CORE_READ_TOOLS, DEFAULT_EVALUATION_MODEL, GITHUB_TOOL_NAMES, GITHUB_WRITE_TOOLS, PRESET_TOOLS, addAssignees, addCommentReaction, addDiscussionComment, addIssueComment, addIssueReaction, addLabels, addPullRequestComment, addSubIssue, cancelWorkflowRun, closeIssue, compareCommits, createBranch, createCommitStatus, createGist, createGistComment, createGithubAgent, createGithubTools, createIssue, createLabel, createOctokit, createOrUpdateFile, createPullRequest, createPullRequestReview, createRelease, createRepository, deleteBranch, deleteGist, deleteIssueComment, deleteLabel, deletePullRequestComment, deleteRelease, disablePullRequestAutoMerge, editFiles, enablePullRequestAutoMerge, forkRepository, getBlame, getBranchRules, getCiFailureContext, getCollaboratorPermission, getCombinedStatus, getCommit, getDiscussion, getFileContent, getGist, getIssue, getIssueContext, getLatestRelease, getPullRequest, getPullRequestContext, getRelease, getReleaseContext, getRepository, getRepositoryTree, getWorkflowJobLogs, getWorkflowRun, githubToolsErrors, listBranches, listCheckRuns, listCodeScanningAlerts, listCommentReactions, listCommits, listDependabotAlerts, listDiscussions, listGistComments, listGists, listIssueComments, listIssueReactions, listIssues, listLabels, listMilestones, listNotifications, listPullRequestFiles, listPullRequestReviewThreads, listPullRequestReviews, listPullRequests, listReleases, listSecretScanningAlerts, listSubIssues, listWorkflowJobs, listWorkflowRuns, listWorkflows, markNotificationRead, mergePullRequest, removeAssignees, removeLabel, replyToReviewComment, requestReviewers, rerunWorkflowRun, resolveGithubToken, resolveReviewThread, searchCode, searchIssues, searchRepositories, selectPresets, selectTools, triggerWorkflow, updateGist, updateIssue, updateIssueComment, updateLabel, updatePullRequest, updatePullRequestBranch, updatePullRequestComment, updateRelease, withGithubGuardrails };
|
|
@@ -27,7 +27,7 @@ declare const githubToolApproval: Omit<import("@tanstack/ai").InterruptDefinitio
|
|
|
27
27
|
toolName: string;
|
|
28
28
|
input: Record<string, unknown>;
|
|
29
29
|
} | undefined;
|
|
30
|
-
} ? Exclude<keyof TInput, "
|
|
30
|
+
} ? Exclude<keyof TInput, "message" | "key" | "reason" | "expiresAt" | "payload"> extends never ? unknown : { [K in Exclude<keyof TInput, "message" | "key" | "reason" | "expiresAt" | "payload">]: never; } : never)) => {
|
|
31
31
|
readonly definition: import("@tanstack/ai").InterruptDefinition<"github-tools.approval", z.ZodObject<{
|
|
32
32
|
toolCallId: z.ZodString;
|
|
33
33
|
toolName: z.ZodString;
|
|
@@ -57,4 +57,4 @@ declare const githubToolApproval: Omit<import("@tanstack/ai").InterruptDefinitio
|
|
|
57
57
|
};
|
|
58
58
|
//#endregion
|
|
59
59
|
export { githubToolApproval as t };
|
|
60
|
-
//# sourceMappingURL=interrupts-
|
|
60
|
+
//# sourceMappingURL=interrupts-BSDPwdJ2.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interrupts-BSDPwdJ2.d.mts","names":[],"sources":["../src/tanstack/interrupts.ts"],"mappings":";;;cAIa,oBAAkB,4BAAA,6CAAA,EAAA"}
|