@github-tools/sdk 1.6.0 → 1.7.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 +75 -8
- package/dist/eve.d.mts +167 -0
- package/dist/eve.d.mts.map +1 -0
- package/dist/eve.mjs +522 -0
- package/dist/eve.mjs.map +1 -0
- package/dist/index-BRUYe5q0.d.mts +220 -0
- package/dist/index-BRUYe5q0.d.mts.map +1 -0
- package/dist/index.d.mts +3 -2
- package/dist/index.mjs +3 -2
- package/dist/src-BgnkKMD7.mjs +812 -0
- package/dist/src-BgnkKMD7.mjs.map +1 -0
- package/dist/tool-types-CuirBEc8.d.mts +244 -0
- package/dist/tool-types-CuirBEc8.d.mts.map +1 -0
- package/dist/workflow.d.mts +51 -728
- package/dist/workflow.d.mts.map +1 -1
- package/dist/workflow.mjs +14 -74
- package/dist/workflow.mjs.map +1 -1
- package/dist/write-tools-vzlewWo5.mjs +1823 -0
- package/dist/write-tools-vzlewWo5.mjs.map +1 -0
- package/package.json +25 -6
- package/dist/index-ikP-LT-3.d.mts +0 -1634
- package/dist/index-ikP-LT-3.d.mts.map +0 -1
- package/dist/src--pAdGYqY.mjs +0 -1961
- package/dist/src--pAdGYqY.mjs.map +0 -1
package/dist/workflow.d.mts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import { FinishReason, LanguageModelResponseMetadata, LanguageModelUsage, ModelMessage, StepResult, StopCondition, ToolSet } from "ai";
|
|
4
|
-
import {
|
|
1
|
+
import { _ as PresetToolName, a as ApprovalConfig, d as ToolOverrides, f as GITHUB_WRITE_TOOLS, g as PRESET_TOOLS, h as GithubToolPreset, i as PickGithubTools, m as CombinedPresetToolNames, o as CommitIdentity, p as GithubWriteToolName, r as GithubToolsForPreset, s as CommitToolOptions, t as AllGithubTools, v as GITHUB_TOOL_NAMES, y as GithubToolName } from "./tool-types-CuirBEc8.mjs";
|
|
2
|
+
import { a as createGithubAgent, i as CreateGithubAgentOptions, n as GithubToolsOptions, r as createGithubTools, t as GithubTools } from "./index-BRUYe5q0.mjs";
|
|
3
|
+
import { FinishReason, LanguageModel, LanguageModelResponseMetadata, LanguageModelUsage, ModelMessage, StepResult, StopCondition, ToolSet } from "ai";
|
|
4
|
+
import { WorkflowAgentOptions, WorkflowAgentStreamOptions, WorkflowAgentStreamResult } from "@ai-sdk/workflow";
|
|
5
|
+
import { Context } from "@ai-sdk/provider-utils";
|
|
5
6
|
|
|
6
7
|
//#region src/workflow.d.ts
|
|
7
8
|
/**
|
|
@@ -17,11 +18,11 @@ interface DurableGithubAgentGenerateResult<TTools extends ToolSet = ToolSet> {
|
|
|
17
18
|
};
|
|
18
19
|
}
|
|
19
20
|
/**
|
|
20
|
-
* A wrapper around
|
|
21
|
+
* A wrapper around {@link WorkflowAgent} that adds a non-streaming
|
|
21
22
|
* `.generate()` method alongside the existing `.stream()`.
|
|
22
23
|
*
|
|
23
|
-
* - `.stream()` — delegates to `
|
|
24
|
-
* an individually retriable workflow step.
|
|
24
|
+
* - `.stream()` — delegates to `WorkflowAgent.stream()`. Each tool call is
|
|
25
|
+
* an individually retriable workflow step. Supports `needsApproval` on tools.
|
|
25
26
|
* - `.generate()` — uses `generateText` from the AI SDK for non-streaming
|
|
26
27
|
* execution. Must be called from within a `"use step"` function in
|
|
27
28
|
* workflow context (the Workflow runtime blocks raw I/O in workflow scope).
|
|
@@ -32,33 +33,20 @@ declare class DurableGithubAgent<TTools extends ToolSet = ToolSet> {
|
|
|
32
33
|
private _instructions?;
|
|
33
34
|
private _telemetry?;
|
|
34
35
|
private _tools;
|
|
35
|
-
constructor(options:
|
|
36
|
+
constructor(options: WorkflowAgentOptions<TTools>);
|
|
36
37
|
/** The tool set configured for this agent. */
|
|
37
38
|
get tools(): TTools;
|
|
38
39
|
/**
|
|
39
|
-
* Stream the agent's response. Delegates directly to `
|
|
40
|
+
* Stream the agent's response. Delegates directly to `WorkflowAgent.stream()`.
|
|
40
41
|
* Works in workflow context — each tool call is a durable step.
|
|
41
42
|
*/
|
|
42
|
-
stream<TStreamTools extends TTools = TTools, OUTPUT = never, PARTIAL_OUTPUT = never>(options:
|
|
43
|
+
stream<TStreamTools extends TTools = TTools, OUTPUT = never, PARTIAL_OUTPUT = never>(options: WorkflowAgentStreamOptions<TStreamTools, Context, OUTPUT, PARTIAL_OUTPUT>): Promise<WorkflowAgentStreamResult<TStreamTools, OUTPUT>>;
|
|
43
44
|
/**
|
|
44
45
|
* Generate a non-streaming response using `generateText` from the AI SDK.
|
|
45
46
|
*
|
|
46
47
|
* In workflow context this **must** be called from within a `"use step"`
|
|
47
48
|
* function, because the Workflow runtime blocks direct I/O (HTTP calls)
|
|
48
49
|
* at the workflow scope level.
|
|
49
|
-
*
|
|
50
|
-
* @example
|
|
51
|
-
* ```ts
|
|
52
|
-
* async function agentTurn(prompt: string) {
|
|
53
|
-
* "use step"
|
|
54
|
-
* const agent = createDurableGithubAgent({
|
|
55
|
-
* model: 'anthropic/claude-sonnet-4.6',
|
|
56
|
-
* preset: 'code-review',
|
|
57
|
-
* })
|
|
58
|
-
* const { text } = await agent.generate({ prompt })
|
|
59
|
-
* return text
|
|
60
|
-
* }
|
|
61
|
-
* ```
|
|
62
50
|
*/
|
|
63
51
|
generate({
|
|
64
52
|
prompt,
|
|
@@ -71,19 +59,40 @@ declare class DurableGithubAgent<TTools extends ToolSet = ToolSet> {
|
|
|
71
59
|
/**
|
|
72
60
|
* Options for creating a durable GitHub agent via {@link createDurableGithubAgent}.
|
|
73
61
|
*
|
|
74
|
-
* Extends all `
|
|
62
|
+
* Extends all `WorkflowAgentOptions` (temperature, telemetry, callbacks, etc.)
|
|
75
63
|
* and adds GitHub-specific fields (token, preset, approval config).
|
|
76
64
|
*/
|
|
77
|
-
type CreateDurableGithubAgentOptions = Omit<
|
|
78
|
-
model: string |
|
|
65
|
+
type CreateDurableGithubAgentOptions = Omit<WorkflowAgentOptions, 'model' | 'tools' | 'instructions'> & {
|
|
66
|
+
model: string | LanguageModel;
|
|
79
67
|
/**
|
|
80
68
|
* GitHub personal access token.
|
|
81
69
|
* Falls back to `process.env.GITHUB_TOKEN` when omitted.
|
|
82
70
|
*/
|
|
83
71
|
token?: string;
|
|
72
|
+
/**
|
|
73
|
+
* Restrict tools and system prompt to a predefined preset.
|
|
74
|
+
*
|
|
75
|
+
* Selects a subset of tools and, when a single preset is passed,
|
|
76
|
+
* sets a matching system prompt. Combine presets with an array to merge tool sets.
|
|
77
|
+
*
|
|
78
|
+
* @see {@link GithubToolPreset} for available presets and included tools.
|
|
79
|
+
*/
|
|
84
80
|
preset?: GithubToolPreset | GithubToolPreset[];
|
|
81
|
+
/**
|
|
82
|
+
* Control whether write operations require user approval before execution.
|
|
83
|
+
*
|
|
84
|
+
* @see {@link ApprovalConfig} for global and per-tool options.
|
|
85
|
+
*/
|
|
85
86
|
requireApproval?: ApprovalConfig;
|
|
87
|
+
/**
|
|
88
|
+
* Fully replace the default system prompt.
|
|
89
|
+
* When set, `preset` system prompts and `additionalInstructions` are ignored.
|
|
90
|
+
*/
|
|
86
91
|
instructions?: string;
|
|
92
|
+
/**
|
|
93
|
+
* Append text to the preset-specific (or default) system prompt.
|
|
94
|
+
* Ignored when `instructions` is set.
|
|
95
|
+
*/
|
|
87
96
|
additionalInstructions?: string;
|
|
88
97
|
/**
|
|
89
98
|
* Default author for commit-creating tools.
|
|
@@ -102,23 +111,22 @@ type CreateDurableGithubAgentOptions = Omit<DurableAgentOptions, 'model' | 'tool
|
|
|
102
111
|
coAuthors?: CommitIdentity[];
|
|
103
112
|
};
|
|
104
113
|
/**
|
|
105
|
-
* Create a pre-configured durable GitHub agent powered by
|
|
114
|
+
* Create a pre-configured durable GitHub agent powered by `WorkflowAgent`
|
|
115
|
+
* from `@ai-sdk/workflow`.
|
|
106
116
|
*
|
|
107
117
|
* Returns a {@link DurableGithubAgent} with two interaction modes:
|
|
108
118
|
*
|
|
109
119
|
* - `.stream()` — works directly in workflow scope; each tool call is a durable step.
|
|
120
|
+
* Write tools honor `requireApproval` via `needsApproval` and pause the workflow
|
|
121
|
+
* until the user approves or denies.
|
|
110
122
|
* - `.generate()` — uses `generateText` from the AI SDK; must be called from
|
|
111
123
|
* within a `"use step"` function when running inside a workflow.
|
|
112
124
|
*
|
|
113
|
-
* **Note:** `requireApproval` is accepted for forward-compatibility but is currently
|
|
114
|
-
* ignored by `DurableAgent` — the Workflow SDK does not yet support interactive tool
|
|
115
|
-
* approval. All tools execute immediately without user confirmation.
|
|
116
|
-
*
|
|
117
125
|
* @example Streaming (chat UI — works in workflow scope)
|
|
118
126
|
* ```ts
|
|
119
127
|
* import { createDurableGithubAgent } from '@github-tools/sdk/workflow'
|
|
120
128
|
* import { getWritable } from 'workflow'
|
|
121
|
-
* import type { ModelMessage,
|
|
129
|
+
* import type { ModelMessage, ModelCallStreamPart } from 'ai'
|
|
122
130
|
*
|
|
123
131
|
* async function chatWorkflow(messages: ModelMessage[], token: string) {
|
|
124
132
|
* "use workflow"
|
|
@@ -127,705 +135,20 @@ type CreateDurableGithubAgentOptions = Omit<DurableAgentOptions, 'model' | 'tool
|
|
|
127
135
|
* token,
|
|
128
136
|
* preset: 'code-review',
|
|
129
137
|
* })
|
|
130
|
-
* const writable = getWritable<
|
|
138
|
+
* const writable = getWritable<ModelCallStreamPart>()
|
|
131
139
|
* await agent.stream({ messages, writable })
|
|
132
140
|
* }
|
|
133
141
|
* ```
|
|
134
|
-
*
|
|
135
|
-
* @example Non-streaming (bot / background job — needs "use step")
|
|
136
|
-
* ```ts
|
|
137
|
-
* import { createDurableGithubAgent } from '@github-tools/sdk/workflow'
|
|
138
|
-
*
|
|
139
|
-
* async function agentTurn(prompt: string) {
|
|
140
|
-
* "use step"
|
|
141
|
-
* const agent = createDurableGithubAgent({
|
|
142
|
-
* model: 'anthropic/claude-sonnet-4.6',
|
|
143
|
-
* preset: 'code-review',
|
|
144
|
-
* })
|
|
145
|
-
* const { text } = await agent.generate({ prompt })
|
|
146
|
-
* return text
|
|
147
|
-
* }
|
|
148
|
-
* ```
|
|
149
142
|
*/
|
|
150
|
-
declare function createDurableGithubAgent({
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
coAuthors,
|
|
160
|
-
...agentOptions
|
|
161
|
-
}: CreateDurableGithubAgentOptions): DurableGithubAgent<Partial<{
|
|
162
|
-
getRepository: _$ai.Tool<{
|
|
163
|
-
owner: string;
|
|
164
|
-
repo: string;
|
|
165
|
-
}, {
|
|
166
|
-
name: string;
|
|
167
|
-
fullName: string;
|
|
168
|
-
description: string | null;
|
|
169
|
-
url: string;
|
|
170
|
-
defaultBranch: string;
|
|
171
|
-
stars: number;
|
|
172
|
-
forks: number;
|
|
173
|
-
openIssues: number;
|
|
174
|
-
language: string | null;
|
|
175
|
-
private: boolean;
|
|
176
|
-
createdAt: string;
|
|
177
|
-
updatedAt: string;
|
|
178
|
-
}>;
|
|
179
|
-
listBranches: _$ai.Tool<{
|
|
180
|
-
owner: string;
|
|
181
|
-
repo: string;
|
|
182
|
-
perPage: number;
|
|
183
|
-
}, {
|
|
184
|
-
name: string;
|
|
185
|
-
sha: string;
|
|
186
|
-
protected: boolean;
|
|
187
|
-
}[]>;
|
|
188
|
-
getFileContent: _$ai.Tool<{
|
|
189
|
-
owner: string;
|
|
190
|
-
repo: string;
|
|
191
|
-
path: string;
|
|
192
|
-
ref?: string | undefined;
|
|
193
|
-
}, {
|
|
194
|
-
type: string;
|
|
195
|
-
entries: {
|
|
196
|
-
name: string;
|
|
197
|
-
type: "file" | "dir" | "submodule" | "symlink";
|
|
198
|
-
path: string;
|
|
199
|
-
}[];
|
|
200
|
-
path?: undefined;
|
|
201
|
-
sha?: undefined;
|
|
202
|
-
size?: undefined;
|
|
203
|
-
content?: undefined;
|
|
204
|
-
} | {
|
|
205
|
-
type: "submodule" | "symlink";
|
|
206
|
-
path: string;
|
|
207
|
-
entries?: undefined;
|
|
208
|
-
sha?: undefined;
|
|
209
|
-
size?: undefined;
|
|
210
|
-
content?: undefined;
|
|
211
|
-
} | {
|
|
212
|
-
type: string;
|
|
213
|
-
path: string;
|
|
214
|
-
sha: string;
|
|
215
|
-
size: number;
|
|
216
|
-
content: string;
|
|
217
|
-
entries?: undefined;
|
|
218
|
-
}>;
|
|
219
|
-
listPullRequests: _$ai.Tool<{
|
|
220
|
-
owner: string;
|
|
221
|
-
repo: string;
|
|
222
|
-
state: "open" | "closed" | "all";
|
|
223
|
-
perPage: number;
|
|
224
|
-
}, {
|
|
225
|
-
number: number;
|
|
226
|
-
title: string;
|
|
227
|
-
state: string;
|
|
228
|
-
url: string;
|
|
229
|
-
author: string | undefined;
|
|
230
|
-
branch: string;
|
|
231
|
-
base: string;
|
|
232
|
-
draft: boolean | undefined;
|
|
233
|
-
createdAt: string;
|
|
234
|
-
updatedAt: string;
|
|
235
|
-
}[]>;
|
|
236
|
-
getPullRequest: _$ai.Tool<{
|
|
237
|
-
owner: string;
|
|
238
|
-
repo: string;
|
|
239
|
-
pullNumber: number;
|
|
240
|
-
}, {
|
|
241
|
-
number: number;
|
|
242
|
-
title: string;
|
|
243
|
-
body: string | null;
|
|
244
|
-
state: "open" | "closed";
|
|
245
|
-
url: string;
|
|
246
|
-
author: string;
|
|
247
|
-
branch: string;
|
|
248
|
-
base: string;
|
|
249
|
-
draft: boolean | undefined;
|
|
250
|
-
merged: boolean;
|
|
251
|
-
mergeable: boolean | null;
|
|
252
|
-
additions: number;
|
|
253
|
-
deletions: number;
|
|
254
|
-
changedFiles: number;
|
|
255
|
-
createdAt: string;
|
|
256
|
-
updatedAt: string;
|
|
257
|
-
mergedAt: string | null;
|
|
258
|
-
}>;
|
|
259
|
-
listIssues: _$ai.Tool<{
|
|
260
|
-
owner: string;
|
|
261
|
-
repo: string;
|
|
262
|
-
state: "open" | "closed" | "all";
|
|
263
|
-
perPage: number;
|
|
264
|
-
labels?: string | undefined;
|
|
265
|
-
}, {
|
|
266
|
-
number: number;
|
|
267
|
-
title: string;
|
|
268
|
-
state: string;
|
|
269
|
-
url: string;
|
|
270
|
-
author: string | undefined;
|
|
271
|
-
labels: (string | undefined)[];
|
|
272
|
-
createdAt: string;
|
|
273
|
-
updatedAt: string;
|
|
274
|
-
}[]>;
|
|
275
|
-
getIssue: _$ai.Tool<{
|
|
276
|
-
owner: string;
|
|
277
|
-
repo: string;
|
|
278
|
-
issueNumber: number;
|
|
279
|
-
}, {
|
|
280
|
-
number: number;
|
|
281
|
-
title: string;
|
|
282
|
-
body: string | null | undefined;
|
|
283
|
-
state: string;
|
|
284
|
-
url: string;
|
|
285
|
-
author: string | undefined;
|
|
286
|
-
assignees: string[] | undefined;
|
|
287
|
-
labels: (string | undefined)[];
|
|
288
|
-
comments: number;
|
|
289
|
-
createdAt: string;
|
|
290
|
-
updatedAt: string;
|
|
291
|
-
closedAt: string | null;
|
|
292
|
-
}>;
|
|
293
|
-
searchCode: _$ai.Tool<{
|
|
294
|
-
query: string;
|
|
295
|
-
perPage: number;
|
|
296
|
-
}, {
|
|
297
|
-
totalCount: number;
|
|
298
|
-
items: {
|
|
299
|
-
name: string;
|
|
300
|
-
path: string;
|
|
301
|
-
url: string;
|
|
302
|
-
repository: string;
|
|
303
|
-
sha: string;
|
|
304
|
-
}[];
|
|
305
|
-
}>;
|
|
306
|
-
searchRepositories: _$ai.Tool<{
|
|
307
|
-
query: string;
|
|
308
|
-
perPage: number;
|
|
309
|
-
order: "asc" | "desc";
|
|
310
|
-
sort?: "stars" | "forks" | "help-wanted-issues" | "updated" | undefined;
|
|
311
|
-
}, {
|
|
312
|
-
totalCount: number;
|
|
313
|
-
items: {
|
|
314
|
-
name: string;
|
|
315
|
-
fullName: string;
|
|
316
|
-
description: string | null;
|
|
317
|
-
url: string;
|
|
318
|
-
stars: number;
|
|
319
|
-
forks: number;
|
|
320
|
-
language: string | null;
|
|
321
|
-
topics: string[] | undefined;
|
|
322
|
-
}[];
|
|
323
|
-
}>;
|
|
324
|
-
listCommits: _$ai.Tool<{
|
|
325
|
-
owner: string;
|
|
326
|
-
repo: string;
|
|
327
|
-
perPage: number;
|
|
328
|
-
path?: string | undefined;
|
|
329
|
-
sha?: string | undefined;
|
|
330
|
-
author?: string | undefined;
|
|
331
|
-
since?: string | undefined;
|
|
332
|
-
until?: string | undefined;
|
|
333
|
-
}, {
|
|
334
|
-
sha: string;
|
|
335
|
-
message: string;
|
|
336
|
-
author: string | undefined;
|
|
337
|
-
authorLogin: string | undefined;
|
|
338
|
-
date: string | undefined;
|
|
339
|
-
url: string;
|
|
340
|
-
}[]>;
|
|
341
|
-
getCommit: _$ai.Tool<{
|
|
342
|
-
owner: string;
|
|
343
|
-
repo: string;
|
|
344
|
-
ref: string;
|
|
345
|
-
}, {
|
|
346
|
-
sha: string;
|
|
347
|
-
message: string;
|
|
348
|
-
author: string | undefined;
|
|
349
|
-
authorLogin: string | undefined;
|
|
350
|
-
date: string | undefined;
|
|
351
|
-
url: string;
|
|
352
|
-
stats: {
|
|
353
|
-
additions: number | undefined;
|
|
354
|
-
deletions: number | undefined;
|
|
355
|
-
total: number | undefined;
|
|
356
|
-
} | null;
|
|
357
|
-
files: {
|
|
358
|
-
filename: string;
|
|
359
|
-
status: "added" | "removed" | "modified" | "renamed" | "copied" | "changed" | "unchanged";
|
|
360
|
-
additions: number;
|
|
361
|
-
deletions: number;
|
|
362
|
-
patch: string | undefined;
|
|
363
|
-
}[] | undefined;
|
|
364
|
-
}>;
|
|
365
|
-
getBlame: _$ai.Tool<{
|
|
366
|
-
owner: string;
|
|
367
|
-
repo: string;
|
|
368
|
-
path: string;
|
|
369
|
-
ref?: string | undefined;
|
|
370
|
-
line?: number | undefined;
|
|
371
|
-
lineStart?: number | undefined;
|
|
372
|
-
lineEnd?: number | undefined;
|
|
373
|
-
}, {
|
|
374
|
-
error: string;
|
|
375
|
-
ref?: undefined;
|
|
376
|
-
tipSha?: undefined;
|
|
377
|
-
path?: undefined;
|
|
378
|
-
rangeCount?: undefined;
|
|
379
|
-
ranges?: undefined;
|
|
380
|
-
} | {
|
|
381
|
-
ref: string;
|
|
382
|
-
tipSha: string;
|
|
383
|
-
path: string;
|
|
384
|
-
rangeCount: number;
|
|
385
|
-
ranges: {
|
|
386
|
-
startingLine: number;
|
|
387
|
-
endingLine: number;
|
|
388
|
-
age: number;
|
|
389
|
-
commit: {
|
|
390
|
-
sha: string;
|
|
391
|
-
abbreviatedSha: string;
|
|
392
|
-
messageHeadline: string;
|
|
393
|
-
authoredDate: string;
|
|
394
|
-
url: string;
|
|
395
|
-
authorName: string | null;
|
|
396
|
-
authorEmail: string | null;
|
|
397
|
-
authorLogin: string | null;
|
|
398
|
-
};
|
|
399
|
-
}[];
|
|
400
|
-
error?: undefined;
|
|
401
|
-
}>;
|
|
402
|
-
createBranch: _$ai.Tool<{
|
|
403
|
-
owner: string;
|
|
404
|
-
repo: string;
|
|
405
|
-
branch: string;
|
|
406
|
-
from?: string | undefined;
|
|
407
|
-
}, {
|
|
408
|
-
ref: string;
|
|
409
|
-
sha: string;
|
|
410
|
-
url: string;
|
|
411
|
-
}>;
|
|
412
|
-
forkRepository: _$ai.Tool<{
|
|
413
|
-
owner: string;
|
|
414
|
-
repo: string;
|
|
415
|
-
organization?: string | undefined;
|
|
416
|
-
name?: string | undefined;
|
|
417
|
-
}, {
|
|
418
|
-
name: string;
|
|
419
|
-
fullName: string;
|
|
420
|
-
url: string;
|
|
421
|
-
cloneUrl: string;
|
|
422
|
-
sshUrl: string;
|
|
423
|
-
defaultBranch: string;
|
|
424
|
-
private: boolean;
|
|
425
|
-
parent: {
|
|
426
|
-
fullName: string;
|
|
427
|
-
url: string;
|
|
428
|
-
} | null;
|
|
429
|
-
}>;
|
|
430
|
-
createRepository: _$ai.Tool<{
|
|
431
|
-
name: string;
|
|
432
|
-
isPrivate: boolean;
|
|
433
|
-
autoInit: boolean;
|
|
434
|
-
description?: string | undefined;
|
|
435
|
-
gitignoreTemplate?: string | undefined;
|
|
436
|
-
licenseTemplate?: string | undefined;
|
|
437
|
-
org?: string | undefined;
|
|
438
|
-
}, {
|
|
439
|
-
name: string;
|
|
440
|
-
fullName: string;
|
|
441
|
-
description: string | null;
|
|
442
|
-
url: string;
|
|
443
|
-
cloneUrl: string;
|
|
444
|
-
sshUrl: string;
|
|
445
|
-
defaultBranch: string;
|
|
446
|
-
private: boolean;
|
|
447
|
-
createdAt: string;
|
|
448
|
-
}>;
|
|
449
|
-
createOrUpdateFile: _$ai.Tool<{
|
|
450
|
-
owner: string;
|
|
451
|
-
repo: string;
|
|
452
|
-
path: string;
|
|
453
|
-
message: string;
|
|
454
|
-
content: string;
|
|
455
|
-
branch?: string | undefined;
|
|
456
|
-
sha?: string | undefined;
|
|
457
|
-
}, {
|
|
458
|
-
path: string | undefined;
|
|
459
|
-
sha: string | undefined;
|
|
460
|
-
commitSha: string | undefined;
|
|
461
|
-
commitUrl: string | undefined;
|
|
462
|
-
}>;
|
|
463
|
-
createPullRequest: _$ai.Tool<{
|
|
464
|
-
owner: string;
|
|
465
|
-
repo: string;
|
|
466
|
-
title: string;
|
|
467
|
-
head: string;
|
|
468
|
-
base: string;
|
|
469
|
-
draft: boolean;
|
|
470
|
-
body?: string | undefined;
|
|
471
|
-
}, {
|
|
472
|
-
number: number;
|
|
473
|
-
title: string;
|
|
474
|
-
url: string;
|
|
475
|
-
state: "open" | "closed";
|
|
476
|
-
draft: boolean | undefined;
|
|
477
|
-
branch: string;
|
|
478
|
-
base: string;
|
|
479
|
-
}>;
|
|
480
|
-
mergePullRequest: _$ai.Tool<{
|
|
481
|
-
owner: string;
|
|
482
|
-
repo: string;
|
|
483
|
-
pullNumber: number;
|
|
484
|
-
mergeMethod: "merge" | "squash" | "rebase";
|
|
485
|
-
commitTitle?: string | undefined;
|
|
486
|
-
commitMessage?: string | undefined;
|
|
487
|
-
}, {
|
|
488
|
-
merged: boolean;
|
|
489
|
-
message: string;
|
|
490
|
-
sha: string;
|
|
491
|
-
}>;
|
|
492
|
-
addPullRequestComment: _$ai.Tool<{
|
|
493
|
-
owner: string;
|
|
494
|
-
repo: string;
|
|
495
|
-
pullNumber: number;
|
|
496
|
-
body: string;
|
|
497
|
-
}, {
|
|
498
|
-
id: number;
|
|
499
|
-
url: string;
|
|
500
|
-
body: string | undefined;
|
|
501
|
-
author: string | undefined;
|
|
502
|
-
createdAt: string;
|
|
503
|
-
}>;
|
|
504
|
-
listPullRequestFiles: _$ai.Tool<{
|
|
505
|
-
owner: string;
|
|
506
|
-
repo: string;
|
|
507
|
-
pullNumber: number;
|
|
508
|
-
perPage: number;
|
|
509
|
-
page: number;
|
|
510
|
-
}, {
|
|
511
|
-
filename: string;
|
|
512
|
-
status: "added" | "removed" | "modified" | "renamed" | "copied" | "changed" | "unchanged";
|
|
513
|
-
additions: number;
|
|
514
|
-
deletions: number;
|
|
515
|
-
changes: number;
|
|
516
|
-
patch: string | undefined;
|
|
517
|
-
}[]>;
|
|
518
|
-
listPullRequestReviews: _$ai.Tool<{
|
|
519
|
-
owner: string;
|
|
520
|
-
repo: string;
|
|
521
|
-
pullNumber: number;
|
|
522
|
-
perPage: number;
|
|
523
|
-
page: number;
|
|
524
|
-
}, {
|
|
525
|
-
id: number;
|
|
526
|
-
state: string;
|
|
527
|
-
body: string;
|
|
528
|
-
author: string | undefined;
|
|
529
|
-
url: string;
|
|
530
|
-
submittedAt: string | undefined;
|
|
531
|
-
}[]>;
|
|
532
|
-
createPullRequestReview: _$ai.Tool<{
|
|
533
|
-
owner: string;
|
|
534
|
-
repo: string;
|
|
535
|
-
pullNumber: number;
|
|
536
|
-
event: "APPROVE" | "REQUEST_CHANGES" | "COMMENT";
|
|
537
|
-
body?: string | undefined;
|
|
538
|
-
comments?: {
|
|
539
|
-
path: string;
|
|
540
|
-
body: string;
|
|
541
|
-
line?: number | undefined;
|
|
542
|
-
side?: "LEFT" | "RIGHT" | undefined;
|
|
543
|
-
}[] | undefined;
|
|
544
|
-
}, {
|
|
545
|
-
id: number;
|
|
546
|
-
state: string;
|
|
547
|
-
body: string;
|
|
548
|
-
url: string;
|
|
549
|
-
author: string | undefined;
|
|
550
|
-
submittedAt: string | undefined;
|
|
551
|
-
}>;
|
|
552
|
-
createIssue: _$ai.Tool<{
|
|
553
|
-
owner: string;
|
|
554
|
-
repo: string;
|
|
555
|
-
title: string;
|
|
556
|
-
body?: string | undefined;
|
|
557
|
-
labels?: string[] | undefined;
|
|
558
|
-
assignees?: string[] | undefined;
|
|
559
|
-
}, {
|
|
560
|
-
number: number;
|
|
561
|
-
title: string;
|
|
562
|
-
url: string;
|
|
563
|
-
state: string;
|
|
564
|
-
labels: (string | undefined)[];
|
|
565
|
-
}>;
|
|
566
|
-
addIssueComment: _$ai.Tool<{
|
|
567
|
-
owner: string;
|
|
568
|
-
repo: string;
|
|
569
|
-
issueNumber: number;
|
|
570
|
-
body: string;
|
|
571
|
-
}, {
|
|
572
|
-
id: number;
|
|
573
|
-
url: string;
|
|
574
|
-
body: string | undefined;
|
|
575
|
-
author: string | undefined;
|
|
576
|
-
createdAt: string;
|
|
577
|
-
}>;
|
|
578
|
-
closeIssue: _$ai.Tool<{
|
|
579
|
-
owner: string;
|
|
580
|
-
repo: string;
|
|
581
|
-
issueNumber: number;
|
|
582
|
-
stateReason: "completed" | "not_planned";
|
|
583
|
-
}, {
|
|
584
|
-
number: number;
|
|
585
|
-
title: string;
|
|
586
|
-
state: string;
|
|
587
|
-
url: string;
|
|
588
|
-
closedAt: string | null;
|
|
589
|
-
}>;
|
|
590
|
-
listLabels: _$ai.Tool<{
|
|
591
|
-
owner: string;
|
|
592
|
-
repo: string;
|
|
593
|
-
perPage: number;
|
|
594
|
-
page: number;
|
|
595
|
-
}, {
|
|
596
|
-
name: string;
|
|
597
|
-
color: string;
|
|
598
|
-
description: string | null;
|
|
599
|
-
}[]>;
|
|
600
|
-
addLabels: _$ai.Tool<{
|
|
601
|
-
owner: string;
|
|
602
|
-
repo: string;
|
|
603
|
-
issueNumber: number;
|
|
604
|
-
labels: string[];
|
|
605
|
-
}, {
|
|
606
|
-
name: string;
|
|
607
|
-
color: string;
|
|
608
|
-
description: string | null;
|
|
609
|
-
}[]>;
|
|
610
|
-
removeLabel: _$ai.Tool<{
|
|
611
|
-
owner: string;
|
|
612
|
-
repo: string;
|
|
613
|
-
issueNumber: number;
|
|
614
|
-
label: string;
|
|
615
|
-
}, {
|
|
616
|
-
removed: boolean;
|
|
617
|
-
label: string;
|
|
618
|
-
issueNumber: number;
|
|
619
|
-
}>;
|
|
620
|
-
listGists: _$ai.Tool<{
|
|
621
|
-
perPage: number;
|
|
622
|
-
page: number;
|
|
623
|
-
username?: string | undefined;
|
|
624
|
-
}, {
|
|
625
|
-
id: string;
|
|
626
|
-
description: string | null;
|
|
627
|
-
public: boolean;
|
|
628
|
-
url: string;
|
|
629
|
-
files: string[];
|
|
630
|
-
owner: string | undefined;
|
|
631
|
-
comments: number;
|
|
632
|
-
createdAt: string;
|
|
633
|
-
updatedAt: string;
|
|
634
|
-
}[]>;
|
|
635
|
-
getGist: _$ai.Tool<{
|
|
636
|
-
gistId: string;
|
|
637
|
-
}, {
|
|
638
|
-
id: string | undefined;
|
|
639
|
-
description: string | null | undefined;
|
|
640
|
-
public: boolean | undefined;
|
|
641
|
-
url: string | undefined;
|
|
642
|
-
owner: string | undefined;
|
|
643
|
-
files: {
|
|
644
|
-
filename: string | undefined;
|
|
645
|
-
language: string | undefined;
|
|
646
|
-
size: number | undefined;
|
|
647
|
-
content: string | undefined;
|
|
648
|
-
}[];
|
|
649
|
-
comments: number | undefined;
|
|
650
|
-
createdAt: string | undefined;
|
|
651
|
-
updatedAt: string | undefined;
|
|
652
|
-
}>;
|
|
653
|
-
listGistComments: _$ai.Tool<{
|
|
654
|
-
gistId: string;
|
|
655
|
-
perPage: number;
|
|
656
|
-
page: number;
|
|
657
|
-
}, {
|
|
658
|
-
id: number;
|
|
659
|
-
body: string;
|
|
660
|
-
author: string | undefined;
|
|
661
|
-
url: string;
|
|
662
|
-
createdAt: string;
|
|
663
|
-
updatedAt: string;
|
|
664
|
-
}[]>;
|
|
665
|
-
createGist: _$ai.Tool<{
|
|
666
|
-
files: Record<string, {
|
|
667
|
-
content: string;
|
|
668
|
-
}>;
|
|
669
|
-
isPublic: boolean;
|
|
670
|
-
description?: string | undefined;
|
|
671
|
-
}, {
|
|
672
|
-
id: string | undefined;
|
|
673
|
-
description: string | null | undefined;
|
|
674
|
-
public: boolean | undefined;
|
|
675
|
-
url: string | undefined;
|
|
676
|
-
files: string[];
|
|
677
|
-
owner: string | undefined;
|
|
678
|
-
}>;
|
|
679
|
-
updateGist: _$ai.Tool<{
|
|
680
|
-
gistId: string;
|
|
681
|
-
description?: string | undefined;
|
|
682
|
-
files?: Record<string, {
|
|
683
|
-
content: string;
|
|
684
|
-
}> | undefined;
|
|
685
|
-
filesToDelete?: string[] | undefined;
|
|
686
|
-
}, {
|
|
687
|
-
id: string | undefined;
|
|
688
|
-
description: string | null | undefined;
|
|
689
|
-
url: string | undefined;
|
|
690
|
-
files: string[];
|
|
691
|
-
}>;
|
|
692
|
-
deleteGist: _$ai.Tool<{
|
|
693
|
-
gistId: string;
|
|
694
|
-
}, {
|
|
695
|
-
deleted: boolean;
|
|
696
|
-
gistId: string;
|
|
697
|
-
}>;
|
|
698
|
-
createGistComment: _$ai.Tool<{
|
|
699
|
-
gistId: string;
|
|
700
|
-
body: string;
|
|
701
|
-
}, {
|
|
702
|
-
id: number;
|
|
703
|
-
url: string;
|
|
704
|
-
body: string;
|
|
705
|
-
author: string | undefined;
|
|
706
|
-
createdAt: string;
|
|
707
|
-
}>;
|
|
708
|
-
listWorkflows: _$ai.Tool<{
|
|
709
|
-
owner: string;
|
|
710
|
-
repo: string;
|
|
711
|
-
perPage: number;
|
|
712
|
-
page: number;
|
|
713
|
-
}, {
|
|
714
|
-
totalCount: number;
|
|
715
|
-
workflows: {
|
|
716
|
-
id: number;
|
|
717
|
-
name: string;
|
|
718
|
-
path: string;
|
|
719
|
-
state: "active" | "deleted" | "disabled_fork" | "disabled_inactivity" | "disabled_manually";
|
|
720
|
-
url: string;
|
|
721
|
-
createdAt: string;
|
|
722
|
-
updatedAt: string;
|
|
723
|
-
}[];
|
|
724
|
-
}>;
|
|
725
|
-
listWorkflowRuns: _$ai.Tool<{
|
|
726
|
-
owner: string;
|
|
727
|
-
repo: string;
|
|
728
|
-
perPage: number;
|
|
729
|
-
page: number;
|
|
730
|
-
workflowId?: string | number | undefined;
|
|
731
|
-
branch?: string | undefined;
|
|
732
|
-
event?: string | undefined;
|
|
733
|
-
status?: "success" | "completed" | "action_required" | "cancelled" | "failure" | "neutral" | "skipped" | "stale" | "timed_out" | "in_progress" | "queued" | "requested" | "waiting" | "pending" | undefined;
|
|
734
|
-
}, {
|
|
735
|
-
totalCount: number;
|
|
736
|
-
runs: {
|
|
737
|
-
id: number;
|
|
738
|
-
name: string | null | undefined;
|
|
739
|
-
status: string | null;
|
|
740
|
-
conclusion: string | null;
|
|
741
|
-
branch: string | null;
|
|
742
|
-
event: string;
|
|
743
|
-
url: string;
|
|
744
|
-
actor: string | undefined;
|
|
745
|
-
createdAt: string;
|
|
746
|
-
updatedAt: string;
|
|
747
|
-
runNumber: number;
|
|
748
|
-
runAttempt: number | undefined;
|
|
749
|
-
}[];
|
|
750
|
-
}>;
|
|
751
|
-
getWorkflowRun: _$ai.Tool<{
|
|
752
|
-
owner: string;
|
|
753
|
-
repo: string;
|
|
754
|
-
runId: number;
|
|
755
|
-
}, {
|
|
756
|
-
id: number;
|
|
757
|
-
name: string | null | undefined;
|
|
758
|
-
status: string | null;
|
|
759
|
-
conclusion: string | null;
|
|
760
|
-
branch: string | null;
|
|
761
|
-
sha: string;
|
|
762
|
-
event: string;
|
|
763
|
-
url: string;
|
|
764
|
-
actor: string | undefined;
|
|
765
|
-
runNumber: number;
|
|
766
|
-
runAttempt: number | undefined;
|
|
767
|
-
createdAt: string;
|
|
768
|
-
updatedAt: string;
|
|
769
|
-
runStartedAt: string | undefined;
|
|
770
|
-
}>;
|
|
771
|
-
listWorkflowJobs: _$ai.Tool<{
|
|
772
|
-
owner: string;
|
|
773
|
-
repo: string;
|
|
774
|
-
runId: number;
|
|
775
|
-
filter: "all" | "latest";
|
|
776
|
-
perPage: number;
|
|
777
|
-
page: number;
|
|
778
|
-
}, {
|
|
779
|
-
totalCount: number;
|
|
780
|
-
jobs: {
|
|
781
|
-
id: number;
|
|
782
|
-
name: string;
|
|
783
|
-
status: "completed" | "in_progress" | "queued" | "requested" | "waiting" | "pending";
|
|
784
|
-
conclusion: "success" | "action_required" | "cancelled" | "failure" | "neutral" | "skipped" | "timed_out" | null;
|
|
785
|
-
url: string | null;
|
|
786
|
-
startedAt: string;
|
|
787
|
-
completedAt: string | null;
|
|
788
|
-
runnerName: string | null;
|
|
789
|
-
steps: {
|
|
790
|
-
name: string;
|
|
791
|
-
status: "completed" | "in_progress" | "queued";
|
|
792
|
-
conclusion: string | null;
|
|
793
|
-
number: number;
|
|
794
|
-
startedAt: string | null | undefined;
|
|
795
|
-
completedAt: string | null | undefined;
|
|
796
|
-
}[] | undefined;
|
|
797
|
-
}[];
|
|
798
|
-
}>;
|
|
799
|
-
triggerWorkflow: _$ai.Tool<{
|
|
800
|
-
owner: string;
|
|
801
|
-
repo: string;
|
|
802
|
-
workflowId: string | number;
|
|
803
|
-
ref: string;
|
|
804
|
-
inputs?: Record<string, string> | undefined;
|
|
805
|
-
}, {
|
|
806
|
-
triggered: boolean;
|
|
807
|
-
workflowId: string | number;
|
|
808
|
-
ref: string;
|
|
809
|
-
}>;
|
|
810
|
-
cancelWorkflowRun: _$ai.Tool<{
|
|
811
|
-
owner: string;
|
|
812
|
-
repo: string;
|
|
813
|
-
runId: number;
|
|
814
|
-
}, {
|
|
815
|
-
cancelled: boolean;
|
|
816
|
-
runId: number;
|
|
817
|
-
}>;
|
|
818
|
-
rerunWorkflowRun: _$ai.Tool<{
|
|
819
|
-
owner: string;
|
|
820
|
-
repo: string;
|
|
821
|
-
runId: number;
|
|
822
|
-
onlyFailedJobs: boolean;
|
|
823
|
-
}, {
|
|
824
|
-
rerun: boolean;
|
|
825
|
-
runId: number;
|
|
826
|
-
onlyFailedJobs: boolean;
|
|
827
|
-
}>;
|
|
828
|
-
}>>;
|
|
143
|
+
declare function createDurableGithubAgent(options: CreateDurableGithubAgentOptions & {
|
|
144
|
+
preset?: undefined;
|
|
145
|
+
}): DurableGithubAgent<AllGithubTools>;
|
|
146
|
+
declare function createDurableGithubAgent<P extends GithubToolPreset>(options: CreateDurableGithubAgentOptions & {
|
|
147
|
+
preset: P;
|
|
148
|
+
}): DurableGithubAgent<Pick<AllGithubTools, PresetToolName<P>>>;
|
|
149
|
+
declare function createDurableGithubAgent<P extends readonly GithubToolPreset[]>(options: CreateDurableGithubAgentOptions & {
|
|
150
|
+
preset: P;
|
|
151
|
+
}): DurableGithubAgent<Pick<AllGithubTools, CombinedPresetToolNames<P>>>;
|
|
829
152
|
//#endregion
|
|
830
|
-
export { type ApprovalConfig, type CommitIdentity, type CommitToolOptions, CreateDurableGithubAgentOptions, type CreateGithubAgentOptions, DurableGithubAgent, DurableGithubAgentGenerateResult, type GithubToolPreset, type GithubTools, type GithubToolsOptions, type GithubWriteToolName, type ToolOverrides, createDurableGithubAgent, createGithubAgent, createGithubTools };
|
|
153
|
+
export { type AllGithubTools, type ApprovalConfig, type CombinedPresetToolNames, type CommitIdentity, type CommitToolOptions, CreateDurableGithubAgentOptions, type CreateGithubAgentOptions, DurableGithubAgent, DurableGithubAgentGenerateResult, GITHUB_TOOL_NAMES, GITHUB_WRITE_TOOLS, type GithubToolName, type GithubToolPreset, type GithubTools, type GithubToolsForPreset, type GithubToolsOptions, type GithubWriteToolName, PRESET_TOOLS, type PickGithubTools, type PresetToolName, type ToolOverrides, createDurableGithubAgent, createGithubAgent, createGithubTools };
|
|
831
154
|
//# sourceMappingURL=workflow.d.mts.map
|