@github-tools/sdk 1.16.1 → 1.18.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 +51 -15
- 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 +12 -4
- package/dist/connect.d.mts.map +1 -1
- package/dist/connect.mjs +2 -2
- package/dist/cores-BeLZwcde.mjs +269 -0
- package/dist/cores-BeLZwcde.mjs.map +1 -0
- package/dist/evaluation-f-2QwBid.mjs +210 -0
- package/dist/evaluation-f-2QwBid.mjs.map +1 -0
- package/dist/{eve-runtime-BnWUzXdV.d.mts → eve-runtime-DNQrQZ36.d.mts} +5 -5
- package/dist/{eve-runtime-BnWUzXdV.d.mts.map → eve-runtime-DNQrQZ36.d.mts.map} +1 -1
- package/dist/{eve-runtime-Cfyy1tzp.mjs → eve-runtime-DnhM9Vog.mjs} +14 -11
- package/dist/eve-runtime-DnhM9Vog.mjs.map +1 -0
- package/dist/eve-runtime.d.mts +5 -5
- package/dist/eve-runtime.mjs +4 -3
- package/dist/eve.d.mts +4 -4
- package/dist/eve.d.mts.map +1 -1
- package/dist/eve.mjs +2 -2
- package/dist/{index-JH3DVh1R.d.mts → index-DkZvveZP.d.mts} +337 -11
- package/dist/index-DkZvveZP.d.mts.map +1 -0
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +3 -3
- package/dist/instructions-BuypoY0x.mjs +148 -0
- package/dist/instructions-BuypoY0x.mjs.map +1 -0
- package/dist/interrupts-BSDPwdJ2.d.mts +60 -0
- package/dist/interrupts-BSDPwdJ2.d.mts.map +1 -0
- package/dist/{src-C54blWpT.mjs → src-Bx5p1Unc.mjs} +130 -232
- package/dist/src-Bx5p1Unc.mjs.map +1 -0
- package/dist/tanstack/interrupts.d.mts +2 -0
- package/dist/tanstack/interrupts.mjs +17 -0
- package/dist/tanstack/interrupts.mjs.map +1 -0
- package/dist/tanstack.d.mts +4971 -0
- package/dist/tanstack.d.mts.map +1 -0
- package/dist/tanstack.mjs +465 -0
- package/dist/tanstack.mjs.map +1 -0
- package/dist/{token-Iop2lapd.mjs → token-BOLrrbTS.mjs} +65 -10
- package/dist/token-BOLrrbTS.mjs.map +1 -0
- package/dist/tool-types-CrC80SIL.d.mts +1573 -0
- package/dist/tool-types-CrC80SIL.d.mts.map +1 -0
- package/dist/{types-ve9shBaf.d.mts → types-BmwOpI5-.d.mts} +19 -8
- package/dist/types-BmwOpI5-.d.mts.map +1 -0
- package/dist/{types-BKXTeCqT.d.mts → types-CPAsEMzx.d.mts} +2 -2
- package/dist/{types-BKXTeCqT.d.mts.map → types-CPAsEMzx.d.mts.map} +1 -1
- package/dist/workflow.d.mts +7 -5
- package/dist/workflow.d.mts.map +1 -1
- package/dist/workflow.mjs +3 -2
- package/dist/workflow.mjs.map +1 -1
- package/dist/{write-tools-BvuWAzwo.mjs → write-tools-BaoTUCg7.mjs} +2293 -2558
- package/dist/write-tools-BaoTUCg7.mjs.map +1 -0
- package/package.json +32 -16
- package/dist/eve-runtime-Cfyy1tzp.mjs.map +0 -1
- package/dist/index-JH3DVh1R.d.mts.map +0 -1
- package/dist/src-C54blWpT.mjs.map +0 -1
- package/dist/token-Iop2lapd.mjs.map +0 -1
- package/dist/tool-types-BsfalcyC.d.mts +0 -4163
- package/dist/tool-types-BsfalcyC.d.mts.map +0 -1
- package/dist/types-ve9shBaf.d.mts.map +0 -1
- package/dist/write-tools-BvuWAzwo.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tanstack.d.mts","names":[],"sources":["../src/core/detail.ts","../src/core/bundles.ts","../src/core/checks.ts","../src/core/commits.ts","../src/core/discussions.ts","../src/core/gists.ts","../src/core/issues.ts","../src/core/notifications.ts","../src/core/pull-requests.ts","../src/core/reactions.ts","../src/core/releases.ts","../src/core/search.ts","../src/core/workflows.ts","../src/core/cores.ts","../src/tanstack/tools.ts","../src/tanstack/evaluation.ts","../src/tanstack/agent.ts","../src/tanstack/approval.ts","../src/tanstack/factories.ts"],"mappings":";;;;;;KAeY;;;;cCGC,kCAAgC,EAAA;;;;;;;;;;;;;GAU3C,EAAA,KAAA;cAEW;iBAES,4BACpB,OACA,OACA,MACA,YACA,cACA,gBACA,eACA,cACA,cACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,SAAS;IACV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAkCY,4BAA0B,EAAA;;;;;;;;;;;GAarC,EAAA,KAAA;cAEW;iBAES,sBACpB,OACA,OACA,MACA,aACA,eACA,iBACA,aACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,SAAS;IACV;;;;;;;;;;;;;;;;;;;;;;;;;;cA2BY,8BAA4B,EAAA;;;;;;;;;;GAOvC,EAAA,KAAA;cAEW;iBAES,wBACpB,OACA,OACA,MACA,WACA,iBACA,gBACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA,SAAS;IACV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAqCY,gCAA8B,EAAA;;;;;;GAMzC,EAAA,KAAA;cAEW;iBAIS,0BACpB,OACA,OACA,MACA,KACA,eACA;EAEA;EACA;EACA;EACA;EACA;EACA;IACD;;;;;;;;;;;;;;;;IAwBa,MAAA;MACJ;MACA;MACA;MACA;MACA;MACA;MACA;MACA,QAAQ;QACN;QACA;QACA;QACA;QACA;QACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cClRC,0BAAwB,EAAA;;;;;;;GAOnC,EAAA,KAAA;cAEW;iBAES,oBAAoB,OAAO,OAAO,MAAM,KAAK,SAAS,MAAU;EAAc;EAAe;EAAe;EAAc;EAAa;EAAiB;EAAe;IAAmB;;;;;;;;;;;;;;;;cAwBnM,8BAA4B,EAAA;;;;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AA,4BAAA,yBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAGV,oBAAiB,OAAjB,kBAAiB,UAAA,wBAAA,4BAAA,yBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAGjB,gBAAa,OAAb,kBAAa,UAAA,wBAAA,4BAAA,yBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAGb,gBAAa,OAAb,kBAAa,UAAA,wBAAA,4BAAA,yBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAGb,gBAAa,OAAb,kBAAa,UAAA,wBAAA,4BAAA,yBAAA"}
|
|
@@ -0,0 +1,465 @@
|
|
|
1
|
+
import { _ as githubTokenCall, a as mergeContextArgs, b as GITHUB_TOOL_CATALOG, c as DEFAULT_EVALUATION_MODEL, ca as stripRateLimit, d as RISK_QUESTION, f as rankPresets, g as createGithubTokenResolver, h as resolvePresetTools, l as INTENT_QUESTION, m as PRESET_TOOLS, n as GITHUB_TOOL_NAMES, o as softenContextSchema, oa as githubToolsErrors, p as requiresApproval, s as AUTO_APPROVAL_TOOLS, t as GITHUB_WRITE_TOOLS, u as PRESET_PURPOSES, x as isGithubWriteToolName, y as ALL_GITHUB_TOOL_NAMES } from "./write-tools-BaoTUCg7.mjs";
|
|
2
|
+
import { n as resolveApprovalMode, t as resolveInstructions } from "./instructions-BuypoY0x.mjs";
|
|
3
|
+
import { t as GITHUB_TOOL_CORES } from "./cores-BeLZwcde.mjs";
|
|
4
|
+
import { githubToolApproval } from "./tanstack/interrupts.mjs";
|
|
5
|
+
import { boolean, chat, convertMessagesToModelMessages, decide, score, toolDefinition } from "@tanstack/ai";
|
|
6
|
+
import { isDeepStrictEqual } from "node:util";
|
|
7
|
+
//#region src/tanstack/tools.ts
|
|
8
|
+
const autoTools = /* @__PURE__ */ new WeakMap();
|
|
9
|
+
function buildTool(name, token, options) {
|
|
10
|
+
const descriptor = GITHUB_TOOL_CATALOG[name];
|
|
11
|
+
const resolveToken = createGithubTokenResolver(token);
|
|
12
|
+
const inputSchema = options.context ? softenContextSchema(descriptor.inputSchema, options.context) : descriptor.inputSchema;
|
|
13
|
+
const resolveInput = (input) => {
|
|
14
|
+
const args = inputSchema.parse(input);
|
|
15
|
+
return options.context ? mergeContextArgs(args, options.context) : args;
|
|
16
|
+
};
|
|
17
|
+
const mode = options.needsApproval ?? (isGithubWriteToolName(name) ? true : false);
|
|
18
|
+
const core = GITHUB_TOOL_CORES[name];
|
|
19
|
+
const built = toolDefinition({
|
|
20
|
+
name,
|
|
21
|
+
description: options.description ?? descriptor.description,
|
|
22
|
+
inputSchema,
|
|
23
|
+
needsApproval: mode !== false
|
|
24
|
+
}).server(async (input) => {
|
|
25
|
+
const resolved = resolveInput(input);
|
|
26
|
+
const attribution = name === "createOrUpdateFile" ? {
|
|
27
|
+
author: options.author,
|
|
28
|
+
committer: options.committer,
|
|
29
|
+
coAuthors: options.coAuthors
|
|
30
|
+
} : name === "mergePullRequest" ? { coAuthors: options.coAuthors } : {};
|
|
31
|
+
return stripRateLimit(await core({
|
|
32
|
+
...resolved,
|
|
33
|
+
...attribution,
|
|
34
|
+
token: await resolveToken(githubTokenCall(name, resolved))
|
|
35
|
+
}));
|
|
36
|
+
});
|
|
37
|
+
if (mode === "auto") autoTools.set(built, {
|
|
38
|
+
name,
|
|
39
|
+
resolveInput
|
|
40
|
+
});
|
|
41
|
+
return built;
|
|
42
|
+
}
|
|
43
|
+
function toolFactory(name) {
|
|
44
|
+
return (token, options = {}) => buildTool(name, token, options);
|
|
45
|
+
}
|
|
46
|
+
/** Create TanStack server tools, optionally restricted to one or more presets. */
|
|
47
|
+
function createGithubTools(options = {}) {
|
|
48
|
+
const allowed = options.preset ? resolvePresetTools(typeof options.preset === "string" ? options.preset : [...options.preset]) : null;
|
|
49
|
+
return ALL_GITHUB_TOOL_NAMES.filter((name) => !allowed || allowed.has(name)).map((name) => buildTool(name, options.token, {
|
|
50
|
+
context: options.context,
|
|
51
|
+
author: options.author,
|
|
52
|
+
committer: options.committer,
|
|
53
|
+
coAuthors: options.coAuthors,
|
|
54
|
+
needsApproval: isGithubWriteToolName(name) ? resolveApprovalMode(name, options.requireApproval ?? true) : false,
|
|
55
|
+
...options.overrides?.[name]
|
|
56
|
+
}));
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
59
|
+
//#region src/tanstack/evaluation.ts
|
|
60
|
+
async function evaluationAdapter(options) {
|
|
61
|
+
if (options.adapter) return options.adapter;
|
|
62
|
+
const { vercelGatewayDecider } = await import("@tanstack/ai-vercel-gateway");
|
|
63
|
+
return vercelGatewayDecider(DEFAULT_EVALUATION_MODEL);
|
|
64
|
+
}
|
|
65
|
+
function latestUserText(messages) {
|
|
66
|
+
const message = messages.findLast((message) => message.role === "user");
|
|
67
|
+
if (!message) return "";
|
|
68
|
+
if (typeof message.content === "string") return message.content;
|
|
69
|
+
return message.content?.flatMap((part) => part.type === "text" ? [part.content] : []).join("\n") ?? "";
|
|
70
|
+
}
|
|
71
|
+
function evaluationFailed(error, options, fallback, signal) {
|
|
72
|
+
signal?.throwIfAborted();
|
|
73
|
+
if (error instanceof Error && error.name === "AbortError") throw error;
|
|
74
|
+
const cause = error instanceof Error ? error : new Error(String(error));
|
|
75
|
+
console.warn("[github-tools]", githubToolsErrors.EVALUATION_FAILED({
|
|
76
|
+
model: options.adapter?.model ?? "typesafe-ai/jev",
|
|
77
|
+
fallback,
|
|
78
|
+
detail: cause.message,
|
|
79
|
+
cause
|
|
80
|
+
}));
|
|
81
|
+
}
|
|
82
|
+
async function needsAutoApproval(name, input, messages, options = {}, signal) {
|
|
83
|
+
signal?.throwIfAborted();
|
|
84
|
+
try {
|
|
85
|
+
const result = await decide({
|
|
86
|
+
adapter: await evaluationAdapter(options),
|
|
87
|
+
state: {
|
|
88
|
+
request: latestUserText(messages),
|
|
89
|
+
toolCall: {
|
|
90
|
+
tool: name,
|
|
91
|
+
description: GITHUB_TOOL_CATALOG[name].description,
|
|
92
|
+
input
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
questions: {
|
|
96
|
+
risk: score({
|
|
97
|
+
instructions: RISK_QUESTION.instructions,
|
|
98
|
+
levels: RISK_QUESTION.criteria
|
|
99
|
+
}),
|
|
100
|
+
intent: boolean(INTENT_QUESTION)
|
|
101
|
+
},
|
|
102
|
+
abortSignal: signal
|
|
103
|
+
});
|
|
104
|
+
signal?.throwIfAborted();
|
|
105
|
+
return requiresApproval(result.risk.score, result.intent.probability, options);
|
|
106
|
+
} catch (error) {
|
|
107
|
+
evaluationFailed(error, options, `asking approval for ${name}`, signal);
|
|
108
|
+
return true;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
async function selectPresets(messages, options = {}, signal) {
|
|
112
|
+
signal?.throwIfAborted();
|
|
113
|
+
try {
|
|
114
|
+
const presets = Object.keys(PRESET_PURPOSES);
|
|
115
|
+
const result = await decide({
|
|
116
|
+
adapter: await evaluationAdapter(options),
|
|
117
|
+
state: { request: latestUserText(messages) },
|
|
118
|
+
questions: Object.fromEntries(presets.map((preset) => [preset, boolean({
|
|
119
|
+
instructions: "Does handling this GitHub request need the tools of this preset?",
|
|
120
|
+
criteria: { true: JSON.stringify({
|
|
121
|
+
purpose: PRESET_PURPOSES[preset],
|
|
122
|
+
tools: [...PRESET_TOOLS[preset]]
|
|
123
|
+
}) }
|
|
124
|
+
})])),
|
|
125
|
+
abortSignal: signal
|
|
126
|
+
});
|
|
127
|
+
signal?.throwIfAborted();
|
|
128
|
+
return rankPresets(Object.fromEntries(presets.map((preset) => [preset, result[preset].probability])), options);
|
|
129
|
+
} catch (error) {
|
|
130
|
+
evaluationFailed(error, options, "using the repo-explorer preset", signal);
|
|
131
|
+
return ["repo-explorer"];
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
//#endregion
|
|
135
|
+
//#region src/tanstack/approval.ts
|
|
136
|
+
/** Evaluate automatic GitHub writes before execution and request review through githubToolApproval. */
|
|
137
|
+
function createGithubApprovalMiddleware({ tools, evaluation }) {
|
|
138
|
+
const managed = new Map(tools.flatMap((tool) => {
|
|
139
|
+
const info = autoTools.get(tool);
|
|
140
|
+
return info ? [[tool.name, {
|
|
141
|
+
tool,
|
|
142
|
+
...info
|
|
143
|
+
}]] : [];
|
|
144
|
+
}));
|
|
145
|
+
const runs = /* @__PURE__ */ new WeakMap();
|
|
146
|
+
const state = (ctx) => runs.get(ctx);
|
|
147
|
+
const decisionFor = (ctx, toolCallId, toolName, input) => state(ctx).decisions.find((decision) => decision.toolCallId === toolCallId && decision.toolName === toolName && isDeepStrictEqual(decision.input, input));
|
|
148
|
+
return {
|
|
149
|
+
name: "github-tools.approval",
|
|
150
|
+
onConfig(ctx, config) {
|
|
151
|
+
if (ctx.phase === "init") runs.set(ctx, { decisions: [] });
|
|
152
|
+
return { tools: config.tools?.map((tool) => {
|
|
153
|
+
const info = managed.get(tool.name);
|
|
154
|
+
if (!info || tool !== info.tool) return tool;
|
|
155
|
+
return {
|
|
156
|
+
...tool,
|
|
157
|
+
needsApproval: false,
|
|
158
|
+
execute: async (input, execution) => {
|
|
159
|
+
const resolved = info.resolveInput(input);
|
|
160
|
+
if (!decisionFor(ctx, execution?.toolCallId, tool.name, resolved)?.approved) throw new Error(`GitHub tool ${tool.name} has no approval for this input.`);
|
|
161
|
+
return tool.execute(resolved, execution);
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
}) };
|
|
165
|
+
},
|
|
166
|
+
onInterruptResolution(ctx, resolutions) {
|
|
167
|
+
for (const resolution of resolutions.for(githubToolApproval)) {
|
|
168
|
+
const payload = resolution.request.payload;
|
|
169
|
+
if (!payload || !managed.has(payload.toolName)) continue;
|
|
170
|
+
state(ctx).decisions.push({
|
|
171
|
+
...payload,
|
|
172
|
+
approved: resolution.status === "resolved" && resolution.response.approved
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
async onInterruptBoundary(ctx) {
|
|
177
|
+
if (ctx.phase !== "beforeTools") return;
|
|
178
|
+
const completed = new Set(ctx.messages.filter((message) => message.role === "tool").map((message) => message.toolCallId));
|
|
179
|
+
const calls = ctx.messages.flatMap((message) => message.role === "assistant" ? message.toolCalls ?? [] : []).filter((call) => !completed.has(call.id));
|
|
180
|
+
const interrupts = [];
|
|
181
|
+
for (const call of calls) {
|
|
182
|
+
const info = managed.get(call.function.name);
|
|
183
|
+
if (!info) continue;
|
|
184
|
+
const input = info.resolveInput(JSON.parse(call.function.arguments));
|
|
185
|
+
if (decisionFor(ctx, call.id, info.name, input)) continue;
|
|
186
|
+
if (await needsAutoApproval(info.name, input, ctx.messages, evaluation, ctx.signal)) interrupts.push(githubToolApproval.interrupt({
|
|
187
|
+
key: call.id,
|
|
188
|
+
reason: "github-tool-approval",
|
|
189
|
+
message: `Approve ${info.name}?`,
|
|
190
|
+
payload: {
|
|
191
|
+
toolCallId: call.id,
|
|
192
|
+
toolName: info.name,
|
|
193
|
+
input
|
|
194
|
+
}
|
|
195
|
+
}));
|
|
196
|
+
else state(ctx).decisions.push({
|
|
197
|
+
toolCallId: call.id,
|
|
198
|
+
toolName: info.name,
|
|
199
|
+
input,
|
|
200
|
+
approved: true
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
if (interrupts.length) return { interrupts };
|
|
204
|
+
},
|
|
205
|
+
onBeforeToolCall(ctx, call) {
|
|
206
|
+
const info = managed.get(call.toolName);
|
|
207
|
+
if (!info) return;
|
|
208
|
+
const decision = decisionFor(ctx, call.toolCallId, call.toolName, info.resolveInput(call.args));
|
|
209
|
+
if (!decision) return {
|
|
210
|
+
type: "skip",
|
|
211
|
+
result: { error: "No approval recorded for this GitHub tool call and input." }
|
|
212
|
+
};
|
|
213
|
+
if (!decision.approved) return {
|
|
214
|
+
type: "skip",
|
|
215
|
+
result: { error: "User denied this GitHub tool call." }
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
//#endregion
|
|
221
|
+
//#region src/tanstack/agent.ts
|
|
222
|
+
/** Create a GitHub agent with preset instructions, tools, and automatic approval middleware. */
|
|
223
|
+
function createGithubAgent({ token, preset, requireApproval, overrides, context, author, committer, coAuthors, instructions, additionalInstructions, evaluation, middleware = [], ...settings }) {
|
|
224
|
+
async function prepare(call) {
|
|
225
|
+
const { prompt, messages: suppliedMessages, ...callSettings } = call;
|
|
226
|
+
const messages = suppliedMessages ?? [{
|
|
227
|
+
role: "user",
|
|
228
|
+
content: prompt
|
|
229
|
+
}];
|
|
230
|
+
const modelMessages = convertMessagesToModelMessages(messages);
|
|
231
|
+
const continuingAuto = preset === "auto" && Boolean((callSettings.resume ?? settings.resume)?.length);
|
|
232
|
+
const selected = preset === "auto" ? continuingAuto ? "repo-explorer" : await selectPresets(modelMessages, evaluation, (callSettings.abortController ?? settings.abortController)?.signal) : preset;
|
|
233
|
+
const availableTools = createGithubTools({
|
|
234
|
+
token,
|
|
235
|
+
preset: continuingAuto ? void 0 : selected,
|
|
236
|
+
requireApproval,
|
|
237
|
+
overrides,
|
|
238
|
+
context,
|
|
239
|
+
author,
|
|
240
|
+
committer,
|
|
241
|
+
coAuthors
|
|
242
|
+
});
|
|
243
|
+
const completed = new Set(modelMessages.filter((message) => message.role === "tool").map((message) => message.toolCallId));
|
|
244
|
+
const pendingNames = new Set(modelMessages.flatMap((message) => message.role === "assistant" ? message.toolCalls ?? [] : []).filter((call) => !completed.has(call.id)).map((call) => call.function.name));
|
|
245
|
+
const continuationNames = /* @__PURE__ */ new Set([...PRESET_TOOLS["repo-explorer"], ...pendingNames]);
|
|
246
|
+
const tools = continuingAuto ? availableTools.filter((tool) => continuationNames.has(tool.name)) : availableTools;
|
|
247
|
+
const promptPreset = typeof selected === "string" || selected === void 0 ? selected : selected.length === 1 ? selected[0] : [...selected];
|
|
248
|
+
return {
|
|
249
|
+
...settings,
|
|
250
|
+
...callSettings,
|
|
251
|
+
messages,
|
|
252
|
+
tools,
|
|
253
|
+
systemPrompts: [resolveInstructions({
|
|
254
|
+
preset: continuingAuto ? void 0 : promptPreset,
|
|
255
|
+
instructions,
|
|
256
|
+
additionalInstructions,
|
|
257
|
+
context
|
|
258
|
+
})],
|
|
259
|
+
middleware: [createGithubApprovalMiddleware({
|
|
260
|
+
tools,
|
|
261
|
+
evaluation
|
|
262
|
+
}), ...middleware],
|
|
263
|
+
interrupts: [githubToolApproval]
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
return {
|
|
267
|
+
async generate(call) {
|
|
268
|
+
const prepared = await prepare(call);
|
|
269
|
+
let interrupted = false;
|
|
270
|
+
const observeInterrupt = {
|
|
271
|
+
name: "github-tools.generate",
|
|
272
|
+
onChunk(_ctx, chunk) {
|
|
273
|
+
if (chunk.type === "RUN_FINISHED" && chunk.outcome?.type === "interrupt") interrupted = true;
|
|
274
|
+
}
|
|
275
|
+
};
|
|
276
|
+
const text = await chat({
|
|
277
|
+
...prepared,
|
|
278
|
+
middleware: [observeInterrupt, ...prepared.middleware],
|
|
279
|
+
stream: false
|
|
280
|
+
});
|
|
281
|
+
if (interrupted) throw new Error("GitHub agent requires review. Use stream() to handle approval interrupts and continuation.");
|
|
282
|
+
return text;
|
|
283
|
+
},
|
|
284
|
+
async *stream(call) {
|
|
285
|
+
yield* chat({
|
|
286
|
+
...await prepare(call),
|
|
287
|
+
stream: true
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
};
|
|
291
|
+
}
|
|
292
|
+
//#endregion
|
|
293
|
+
//#region src/tanstack/factories.ts
|
|
294
|
+
/** Create the TanStack `getRepository` server tool. */
|
|
295
|
+
const getRepository = toolFactory("getRepository");
|
|
296
|
+
/** Create the TanStack `listBranches` server tool. */
|
|
297
|
+
const listBranches = toolFactory("listBranches");
|
|
298
|
+
/** Create the TanStack `getFileContent` server tool. */
|
|
299
|
+
const getFileContent = toolFactory("getFileContent");
|
|
300
|
+
/** Create the TanStack `getRepositoryTree` server tool. */
|
|
301
|
+
const getRepositoryTree = toolFactory("getRepositoryTree");
|
|
302
|
+
/** Create the TanStack `createBranch` server tool. */
|
|
303
|
+
const createBranch = toolFactory("createBranch");
|
|
304
|
+
/** Create the TanStack `deleteBranch` server tool. */
|
|
305
|
+
const deleteBranch = toolFactory("deleteBranch");
|
|
306
|
+
/** Create the TanStack `forkRepository` server tool. */
|
|
307
|
+
const forkRepository = toolFactory("forkRepository");
|
|
308
|
+
/** Create the TanStack `createRepository` server tool. */
|
|
309
|
+
const createRepository = toolFactory("createRepository");
|
|
310
|
+
/** Create the TanStack `createOrUpdateFile` server tool. */
|
|
311
|
+
const createOrUpdateFile = toolFactory("createOrUpdateFile");
|
|
312
|
+
/** Create the TanStack `listPullRequests` server tool. */
|
|
313
|
+
const listPullRequests = toolFactory("listPullRequests");
|
|
314
|
+
/** Create the TanStack `getPullRequest` server tool. */
|
|
315
|
+
const getPullRequest = toolFactory("getPullRequest");
|
|
316
|
+
/** Create the TanStack `createPullRequest` server tool. */
|
|
317
|
+
const createPullRequest = toolFactory("createPullRequest");
|
|
318
|
+
/** Create the TanStack `mergePullRequest` server tool. */
|
|
319
|
+
const mergePullRequest = toolFactory("mergePullRequest");
|
|
320
|
+
/** Create the TanStack `updatePullRequest` server tool. */
|
|
321
|
+
const updatePullRequest = toolFactory("updatePullRequest");
|
|
322
|
+
/** Create the TanStack `addPullRequestComment` server tool. */
|
|
323
|
+
const addPullRequestComment = toolFactory("addPullRequestComment");
|
|
324
|
+
/** Create the TanStack `updatePullRequestComment` server tool. */
|
|
325
|
+
const updatePullRequestComment = toolFactory("updatePullRequestComment");
|
|
326
|
+
/** Create the TanStack `deletePullRequestComment` server tool. */
|
|
327
|
+
const deletePullRequestComment = toolFactory("deletePullRequestComment");
|
|
328
|
+
/** Create the TanStack `listPullRequestFiles` server tool. */
|
|
329
|
+
const listPullRequestFiles = toolFactory("listPullRequestFiles");
|
|
330
|
+
/** Create the TanStack `listPullRequestReviews` server tool. */
|
|
331
|
+
const listPullRequestReviews = toolFactory("listPullRequestReviews");
|
|
332
|
+
/** Create the TanStack `createPullRequestReview` server tool. */
|
|
333
|
+
const createPullRequestReview = toolFactory("createPullRequestReview");
|
|
334
|
+
/** Create the TanStack `listPullRequestReviewThreads` server tool. */
|
|
335
|
+
const listPullRequestReviewThreads = toolFactory("listPullRequestReviewThreads");
|
|
336
|
+
/** Create the TanStack `replyToReviewComment` server tool. */
|
|
337
|
+
const replyToReviewComment = toolFactory("replyToReviewComment");
|
|
338
|
+
/** Create the TanStack `resolveReviewThread` server tool. */
|
|
339
|
+
const resolveReviewThread = toolFactory("resolveReviewThread");
|
|
340
|
+
/** Create the TanStack `requestReviewers` server tool. */
|
|
341
|
+
const requestReviewers = toolFactory("requestReviewers");
|
|
342
|
+
/** Create the TanStack `getPullRequestContext` server tool. */
|
|
343
|
+
const getPullRequestContext = toolFactory("getPullRequestContext");
|
|
344
|
+
/** Create the TanStack `getIssueContext` server tool. */
|
|
345
|
+
const getIssueContext = toolFactory("getIssueContext");
|
|
346
|
+
/** Create the TanStack `listIssues` server tool. */
|
|
347
|
+
const listIssues = toolFactory("listIssues");
|
|
348
|
+
/** Create the TanStack `getIssue` server tool. */
|
|
349
|
+
const getIssue = toolFactory("getIssue");
|
|
350
|
+
/** Create the TanStack `listIssueComments` server tool. */
|
|
351
|
+
const listIssueComments = toolFactory("listIssueComments");
|
|
352
|
+
/** Create the TanStack `createIssue` server tool. */
|
|
353
|
+
const createIssue = toolFactory("createIssue");
|
|
354
|
+
/** Create the TanStack `addIssueComment` server tool. */
|
|
355
|
+
const addIssueComment = toolFactory("addIssueComment");
|
|
356
|
+
/** Create the TanStack `updateIssueComment` server tool. */
|
|
357
|
+
const updateIssueComment = toolFactory("updateIssueComment");
|
|
358
|
+
/** Create the TanStack `deleteIssueComment` server tool. */
|
|
359
|
+
const deleteIssueComment = toolFactory("deleteIssueComment");
|
|
360
|
+
/** Create the TanStack `closeIssue` server tool. */
|
|
361
|
+
const closeIssue = toolFactory("closeIssue");
|
|
362
|
+
/** Create the TanStack `updateIssue` server tool. */
|
|
363
|
+
const updateIssue = toolFactory("updateIssue");
|
|
364
|
+
/** Create the TanStack `listLabels` server tool. */
|
|
365
|
+
const listLabels = toolFactory("listLabels");
|
|
366
|
+
/** Create the TanStack `addLabels` server tool. */
|
|
367
|
+
const addLabels = toolFactory("addLabels");
|
|
368
|
+
/** Create the TanStack `removeLabel` server tool. */
|
|
369
|
+
const removeLabel = toolFactory("removeLabel");
|
|
370
|
+
/** Create the TanStack `createLabel` server tool. */
|
|
371
|
+
const createLabel = toolFactory("createLabel");
|
|
372
|
+
/** Create the TanStack `updateLabel` server tool. */
|
|
373
|
+
const updateLabel = toolFactory("updateLabel");
|
|
374
|
+
/** Create the TanStack `deleteLabel` server tool. */
|
|
375
|
+
const deleteLabel = toolFactory("deleteLabel");
|
|
376
|
+
/** Create the TanStack `addAssignees` server tool. */
|
|
377
|
+
const addAssignees = toolFactory("addAssignees");
|
|
378
|
+
/** Create the TanStack `removeAssignees` server tool. */
|
|
379
|
+
const removeAssignees = toolFactory("removeAssignees");
|
|
380
|
+
/** Create the TanStack `listIssueReactions` server tool. */
|
|
381
|
+
const listIssueReactions = toolFactory("listIssueReactions");
|
|
382
|
+
/** Create the TanStack `addIssueReaction` server tool. */
|
|
383
|
+
const addIssueReaction = toolFactory("addIssueReaction");
|
|
384
|
+
/** Create the TanStack `listCommentReactions` server tool. */
|
|
385
|
+
const listCommentReactions = toolFactory("listCommentReactions");
|
|
386
|
+
/** Create the TanStack `addCommentReaction` server tool. */
|
|
387
|
+
const addCommentReaction = toolFactory("addCommentReaction");
|
|
388
|
+
/** Create the TanStack `listDiscussions` server tool. */
|
|
389
|
+
const listDiscussions = toolFactory("listDiscussions");
|
|
390
|
+
/** Create the TanStack `getDiscussion` server tool. */
|
|
391
|
+
const getDiscussion = toolFactory("getDiscussion");
|
|
392
|
+
/** Create the TanStack `addDiscussionComment` server tool. */
|
|
393
|
+
const addDiscussionComment = toolFactory("addDiscussionComment");
|
|
394
|
+
/** Create the TanStack `listNotifications` server tool. */
|
|
395
|
+
const listNotifications = toolFactory("listNotifications");
|
|
396
|
+
/** Create the TanStack `markNotificationRead` server tool. */
|
|
397
|
+
const markNotificationRead = toolFactory("markNotificationRead");
|
|
398
|
+
/** Create the TanStack `searchCode` server tool. */
|
|
399
|
+
const searchCode = toolFactory("searchCode");
|
|
400
|
+
/** Create the TanStack `searchRepositories` server tool. */
|
|
401
|
+
const searchRepositories = toolFactory("searchRepositories");
|
|
402
|
+
/** Create the TanStack `searchIssues` server tool. */
|
|
403
|
+
const searchIssues = toolFactory("searchIssues");
|
|
404
|
+
/** Create the TanStack `listCommits` server tool. */
|
|
405
|
+
const listCommits = toolFactory("listCommits");
|
|
406
|
+
/** Create the TanStack `getCommit` server tool. */
|
|
407
|
+
const getCommit = toolFactory("getCommit");
|
|
408
|
+
/** Create the TanStack `getBlame` server tool. */
|
|
409
|
+
const getBlame = toolFactory("getBlame");
|
|
410
|
+
/** Create the TanStack `compareCommits` server tool. */
|
|
411
|
+
const compareCommits = toolFactory("compareCommits");
|
|
412
|
+
/** Create the TanStack `listGists` server tool. */
|
|
413
|
+
const listGists = toolFactory("listGists");
|
|
414
|
+
/** Create the TanStack `getGist` server tool. */
|
|
415
|
+
const getGist = toolFactory("getGist");
|
|
416
|
+
/** Create the TanStack `listGistComments` server tool. */
|
|
417
|
+
const listGistComments = toolFactory("listGistComments");
|
|
418
|
+
/** Create the TanStack `createGist` server tool. */
|
|
419
|
+
const createGist = toolFactory("createGist");
|
|
420
|
+
/** Create the TanStack `updateGist` server tool. */
|
|
421
|
+
const updateGist = toolFactory("updateGist");
|
|
422
|
+
/** Create the TanStack `deleteGist` server tool. */
|
|
423
|
+
const deleteGist = toolFactory("deleteGist");
|
|
424
|
+
/** Create the TanStack `createGistComment` server tool. */
|
|
425
|
+
const createGistComment = toolFactory("createGistComment");
|
|
426
|
+
/** Create the TanStack `listWorkflows` server tool. */
|
|
427
|
+
const listWorkflows = toolFactory("listWorkflows");
|
|
428
|
+
/** Create the TanStack `listWorkflowRuns` server tool. */
|
|
429
|
+
const listWorkflowRuns = toolFactory("listWorkflowRuns");
|
|
430
|
+
/** Create the TanStack `getWorkflowRun` server tool. */
|
|
431
|
+
const getWorkflowRun = toolFactory("getWorkflowRun");
|
|
432
|
+
/** Create the TanStack `listWorkflowJobs` server tool. */
|
|
433
|
+
const listWorkflowJobs = toolFactory("listWorkflowJobs");
|
|
434
|
+
/** Create the TanStack `getWorkflowJobLogs` server tool. */
|
|
435
|
+
const getWorkflowJobLogs = toolFactory("getWorkflowJobLogs");
|
|
436
|
+
/** Create the TanStack `triggerWorkflow` server tool. */
|
|
437
|
+
const triggerWorkflow = toolFactory("triggerWorkflow");
|
|
438
|
+
/** Create the TanStack `cancelWorkflowRun` server tool. */
|
|
439
|
+
const cancelWorkflowRun = toolFactory("cancelWorkflowRun");
|
|
440
|
+
/** Create the TanStack `rerunWorkflowRun` server tool. */
|
|
441
|
+
const rerunWorkflowRun = toolFactory("rerunWorkflowRun");
|
|
442
|
+
/** Create the TanStack `listCheckRuns` server tool. */
|
|
443
|
+
const listCheckRuns = toolFactory("listCheckRuns");
|
|
444
|
+
/** Create the TanStack `getCombinedStatus` server tool. */
|
|
445
|
+
const getCombinedStatus = toolFactory("getCombinedStatus");
|
|
446
|
+
/** Create the TanStack `getCiFailureContext` server tool. */
|
|
447
|
+
const getCiFailureContext = toolFactory("getCiFailureContext");
|
|
448
|
+
/** Create the TanStack `listReleases` server tool. */
|
|
449
|
+
const listReleases = toolFactory("listReleases");
|
|
450
|
+
/** Create the TanStack `getLatestRelease` server tool. */
|
|
451
|
+
const getLatestRelease = toolFactory("getLatestRelease");
|
|
452
|
+
/** Create the TanStack `getRelease` server tool. */
|
|
453
|
+
const getRelease = toolFactory("getRelease");
|
|
454
|
+
/** Create the TanStack `getReleaseContext` server tool. */
|
|
455
|
+
const getReleaseContext = toolFactory("getReleaseContext");
|
|
456
|
+
/** Create the TanStack `createRelease` server tool. */
|
|
457
|
+
const createRelease = toolFactory("createRelease");
|
|
458
|
+
/** Create the TanStack `updateRelease` server tool. */
|
|
459
|
+
const updateRelease = toolFactory("updateRelease");
|
|
460
|
+
/** Create the TanStack `deleteRelease` server tool. */
|
|
461
|
+
const deleteRelease = toolFactory("deleteRelease");
|
|
462
|
+
//#endregion
|
|
463
|
+
export { AUTO_APPROVAL_TOOLS, DEFAULT_EVALUATION_MODEL, GITHUB_TOOL_NAMES, GITHUB_WRITE_TOOLS, PRESET_TOOLS, addAssignees, addCommentReaction, addDiscussionComment, addIssueComment, addIssueReaction, addLabels, addPullRequestComment, cancelWorkflowRun, closeIssue, compareCommits, createBranch, createGist, createGistComment, createGithubAgent, createGithubApprovalMiddleware, createGithubTools, createIssue, createLabel, 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, 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, resolveReviewThread, searchCode, searchIssues, searchRepositories, triggerWorkflow, updateGist, updateIssue, updateIssueComment, updateLabel, updatePullRequest, updatePullRequestComment, updateRelease };
|
|
464
|
+
|
|
465
|
+
//# sourceMappingURL=tanstack.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tanstack.mjs","names":[],"sources":["../src/tanstack/tools.ts","../src/tanstack/evaluation.ts","../src/tanstack/approval.ts","../src/tanstack/agent.ts","../src/tanstack/factories.ts"],"sourcesContent":["import { toolDefinition } from '@tanstack/ai'\nimport type { ServerTool } from '@tanstack/ai'\nimport type { z } from 'zod'\nimport { GITHUB_TOOL_CATALOG, isGithubWriteToolName } from '../core/catalog'\nimport { GITHUB_TOOL_CORES } from '../core/cores'\nimport { resolveApprovalMode, type ApprovalConfig, type ToolApprovalMode } from '../core/approval-policy'\nimport { mergeContextArgs, softenContextSchema, type GithubToolsContext } from '../core/context'\nimport { resolvePresetTools, type GithubToolPreset, type PresetToolName } from '../core/presets'\nimport { createGithubTokenResolver, githubTokenCall, type GithubTokenInput } from '../core/token'\nimport type { GithubToolName } from '../core/tool-names'\nimport { ALL_GITHUB_TOOL_NAMES } from '../core/tool-names'\nimport { stripRateLimit } from '../core/rate-limit'\nimport type { CommitIdentity } from '../types'\n\ntype Catalog = typeof GITHUB_TOOL_CATALOG\n/** A TanStack server tool with the catalog's input schema and core return type. */\nexport type GithubTanstackTool<N extends GithubToolName = GithubToolName> = N extends GithubToolName\n ? Omit<ServerTool<Catalog[N]['inputSchema'], undefined, N, unknown, boolean>, 'execute'> & {\n execute: (input: z.input<Catalog[N]['inputSchema']>) => ReturnType<(typeof GITHUB_TOOL_CORES)[N]>\n }\n : never\n\n/** Supported TanStack tool customizations. */\nexport type TanstackToolOverrides = {\n description?: string\n needsApproval?: boolean\n}\n\n/** Options shared by TanStack tool factories. */\nexport type TanstackToolOptions = Omit<TanstackToolOverrides, 'needsApproval'> & {\n needsApproval?: ToolApprovalMode\n context?: GithubToolsContext\n author?: CommitIdentity\n committer?: CommitIdentity\n coAuthors?: CommitIdentity[]\n}\n\n/** Configuration for a native array of GitHub server tools. */\nexport type CreateGithubToolsOptions = Omit<TanstackToolOptions, 'description' | 'needsApproval'> & {\n token?: GithubTokenInput\n preset?: GithubToolPreset | readonly GithubToolPreset[]\n requireApproval?: ApprovalConfig\n overrides?: Partial<Record<GithubToolName, TanstackToolOverrides>>\n}\n\nexport const autoTools = new WeakMap<object, { name: GithubToolName, resolveInput: (input: unknown) => Record<string, unknown> }>()\n\nfunction buildTool<N extends GithubToolName>(name: N, token: GithubTokenInput | undefined, options: TanstackToolOptions): GithubTanstackTool<N> {\n const descriptor = GITHUB_TOOL_CATALOG[name]\n const resolveToken = createGithubTokenResolver(token)\n const inputSchema = options.context ? softenContextSchema(descriptor.inputSchema, options.context) : descriptor.inputSchema\n const resolveInput = (input: unknown): Record<string, unknown> => {\n const args = inputSchema.parse(input) as Record<string, unknown>\n return options.context ? mergeContextArgs(args, options.context) : args\n }\n const mode = options.needsApproval ?? (isGithubWriteToolName(name) ? true : false)\n const core = GITHUB_TOOL_CORES[name] as (input: Record<string, unknown> & { token: string }) => Promise<unknown>\n const built = toolDefinition({\n name,\n description: options.description ?? descriptor.description,\n inputSchema,\n needsApproval: mode !== false,\n }).server(async (input) => {\n const resolved = resolveInput(input)\n const attribution = name === 'createOrUpdateFile'\n ? { author: options.author, committer: options.committer, coAuthors: options.coAuthors }\n : name === 'mergePullRequest' ? { coAuthors: options.coAuthors } : {}\n return stripRateLimit(await core({ ...resolved, ...attribution, token: await resolveToken(githubTokenCall(name, resolved)) }))\n })\n if (mode === 'auto') autoTools.set(built, { name, resolveInput })\n return built as unknown as GithubTanstackTool<N>\n}\n\nexport function toolFactory<N extends GithubToolName>(name: N) {\n return (token: GithubTokenInput, options: TanstackToolOptions = {}): GithubTanstackTool<N> => buildTool(name, token, options)\n}\n\n/** Create TanStack server tools, optionally restricted to one or more presets. */\nexport function createGithubTools<const P extends GithubToolPreset | readonly GithubToolPreset[] | undefined = undefined>(\n options: CreateGithubToolsOptions & { preset?: P } = {},\n): GithubTanstackTool<P extends GithubToolPreset ? PresetToolName<P> : P extends readonly GithubToolPreset[] ? PresetToolName<P[number]> : GithubToolName>[] {\n const allowed = options.preset ? resolvePresetTools(typeof options.preset === 'string' ? options.preset : [...options.preset]) : null\n const tools = ALL_GITHUB_TOOL_NAMES.filter(name => !allowed || allowed.has(name)).map(name => buildTool(name, options.token, {\n context: options.context,\n author: options.author,\n committer: options.committer,\n coAuthors: options.coAuthors,\n needsApproval: isGithubWriteToolName(name) ? resolveApprovalMode(name, options.requireApproval ?? true) : false,\n ...options.overrides?.[name],\n }))\n return tools as ReturnType<typeof createGithubTools<P>>\n}\n","import { boolean, decide, score } from '@tanstack/ai'\nimport type { EvaluateAdapter, ModelMessage } from '@tanstack/ai'\nimport { GITHUB_TOOL_CATALOG } from '../core/catalog'\nimport { DEFAULT_EVALUATION_MODEL, INTENT_QUESTION, PRESET_PURPOSES, RISK_QUESTION, rankPresets, requiresApproval, type RoutablePreset } from '../core/evaluation-policy'\nimport { PRESET_TOOLS } from '../core/presets'\nimport { githubToolsErrors } from '../core/errors'\nimport type { GithubToolName } from '../core/tool-names'\n\n/** Jev configuration for TanStack automatic approval and preset selection. */\nexport type GithubEvaluationOptions = {\n /** Defaults to vercelGatewayDecider('typesafe-ai/jev') using Gateway authentication. */\n adapter?: EvaluateAdapter\n /** Maximum risk on the 0–2 rubric. @default 1 */\n maxRisk?: number\n /** Minimum probability that the user requested the call. @default 0.6 */\n minIntent?: number\n /** Minimum probability for a preset to qualify. @default 0.7 */\n minPresetProbability?: number\n /** Maximum number of combined presets. @default 2 */\n maxPresets?: number\n}\n\nasync function evaluationAdapter(options: GithubEvaluationOptions) {\n if (options.adapter) return options.adapter\n const { vercelGatewayDecider } = await import('@tanstack/ai-vercel-gateway')\n return vercelGatewayDecider(DEFAULT_EVALUATION_MODEL)\n}\n\nexport function latestUserText(messages: readonly ModelMessage[]): string {\n const message = messages.findLast(message => message.role === 'user')\n if (!message) return ''\n if (typeof message.content === 'string') return message.content\n return message.content?.flatMap(part => part.type === 'text' ? [part.content] : []).join('\\n') ?? ''\n}\n\nfunction evaluationFailed(error: unknown, options: GithubEvaluationOptions, fallback: string, signal?: AbortSignal) {\n signal?.throwIfAborted()\n if (error instanceof Error && error.name === 'AbortError') throw error\n const cause = error instanceof Error ? error : new Error(String(error))\n console.warn('[github-tools]', githubToolsErrors.EVALUATION_FAILED({\n model: options.adapter?.model ?? DEFAULT_EVALUATION_MODEL,\n fallback,\n detail: cause.message,\n cause,\n }))\n}\n\nexport async function needsAutoApproval(name: GithubToolName, input: unknown, messages: readonly ModelMessage[], options: GithubEvaluationOptions = {}, signal?: AbortSignal): Promise<boolean> {\n signal?.throwIfAborted()\n try {\n const result = await decide({\n adapter: await evaluationAdapter(options),\n state: { request: latestUserText(messages), toolCall: { tool: name, description: GITHUB_TOOL_CATALOG[name].description, input } },\n questions: {\n risk: score({ instructions: RISK_QUESTION.instructions, levels: RISK_QUESTION.criteria }),\n intent: boolean(INTENT_QUESTION),\n },\n abortSignal: signal,\n })\n signal?.throwIfAborted()\n return requiresApproval(result.risk.score, result.intent.probability, options)\n } catch (error) {\n evaluationFailed(error, options, `asking approval for ${name}`, signal)\n return true\n }\n}\n\nexport async function selectPresets(messages: readonly ModelMessage[], options: GithubEvaluationOptions = {}, signal?: AbortSignal): Promise<RoutablePreset[]> {\n signal?.throwIfAborted()\n try {\n const presets = Object.keys(PRESET_PURPOSES) as RoutablePreset[]\n const result = await decide({\n adapter: await evaluationAdapter(options),\n state: { request: latestUserText(messages) },\n questions: Object.fromEntries(presets.map(preset => [preset, boolean({\n instructions: 'Does handling this GitHub request need the tools of this preset?',\n criteria: { true: JSON.stringify({ purpose: PRESET_PURPOSES[preset], tools: [...PRESET_TOOLS[preset]] }) },\n })])),\n abortSignal: signal,\n })\n signal?.throwIfAborted()\n return rankPresets(Object.fromEntries(presets.map(preset => [preset, result[preset].probability])) as Record<RoutablePreset, number>, options)\n } catch (error) {\n evaluationFailed(error, options, 'using the repo-explorer preset', signal)\n return ['repo-explorer']\n }\n}\n","import { isDeepStrictEqual } from 'node:util'\nimport type { ChatMiddleware, ChatMiddlewareContext, Tool } from '@tanstack/ai'\nimport { autoTools } from './tools'\nimport { needsAutoApproval, type GithubEvaluationOptions } from './evaluation'\nimport { githubToolApproval } from './interrupts'\n\ntype Decision = { toolCallId: string, toolName: string, input: Record<string, unknown>, approved: boolean }\ntype RunState = { decisions: Decision[] }\n\n/** Options for GitHub approval middleware. Register githubToolApproval with chat(). */\nexport type GithubApprovalMiddlewareOptions = {\n tools: readonly Tool[]\n evaluation?: GithubEvaluationOptions\n}\n\n/** Evaluate automatic GitHub writes before execution and request review through githubToolApproval. */\nexport function createGithubApprovalMiddleware({ tools, evaluation }: GithubApprovalMiddlewareOptions): ChatMiddleware<unknown, typeof githubToolApproval> {\n const managed = new Map(tools.flatMap(tool => {\n const info = autoTools.get(tool)\n return info ? [[tool.name, { tool, ...info }] as const] : []\n }))\n const runs = new WeakMap<ChatMiddlewareContext, RunState>()\n const state = (ctx: ChatMiddlewareContext) => runs.get(ctx)!\n const decisionFor = (ctx: ChatMiddlewareContext, toolCallId: string | undefined, toolName: string, input: unknown) =>\n state(ctx).decisions.find(decision => decision.toolCallId === toolCallId && decision.toolName === toolName && isDeepStrictEqual(decision.input, input))\n\n return {\n name: 'github-tools.approval',\n onConfig(ctx, config) {\n if (ctx.phase === 'init') runs.set(ctx, { decisions: [] })\n return {\n tools: config.tools?.map(tool => {\n const info = managed.get(tool.name)\n if (!info || tool !== info.tool) return tool\n return {\n ...tool,\n needsApproval: false,\n execute: async (input, execution) => {\n const resolved = info.resolveInput(input)\n if (!decisionFor(ctx, execution?.toolCallId, tool.name, resolved)?.approved) {\n throw new Error(`GitHub tool ${tool.name} has no approval for this input.`)\n }\n return tool.execute!(resolved, execution)\n },\n }\n }),\n }\n },\n onInterruptResolution(ctx, resolutions) {\n for (const resolution of resolutions.for(githubToolApproval)) {\n const payload = resolution.request.payload\n if (!payload || !managed.has(payload.toolName)) continue\n state(ctx).decisions.push({ ...payload, approved: resolution.status === 'resolved' && resolution.response.approved })\n }\n },\n async onInterruptBoundary(ctx) {\n if (ctx.phase !== 'beforeTools') return\n const completed = new Set(ctx.messages.filter(message => message.role === 'tool').map(message => message.toolCallId))\n const calls = ctx.messages.flatMap(message => message.role === 'assistant' ? message.toolCalls ?? [] : []).filter(call => !completed.has(call.id))\n const interrupts = []\n for (const call of calls) {\n const info = managed.get(call.function.name)\n if (!info) continue\n const input = info.resolveInput(JSON.parse(call.function.arguments))\n if (decisionFor(ctx, call.id, info.name, input)) continue\n const needsApproval = await needsAutoApproval(info.name, input, ctx.messages, evaluation, ctx.signal)\n if (needsApproval) {\n interrupts.push(githubToolApproval.interrupt({\n key: call.id,\n reason: 'github-tool-approval',\n message: `Approve ${info.name}?`,\n payload: { toolCallId: call.id, toolName: info.name, input },\n }))\n } else {\n state(ctx).decisions.push({ toolCallId: call.id, toolName: info.name, input, approved: true })\n }\n }\n if (interrupts.length) return { interrupts }\n },\n onBeforeToolCall(ctx, call) {\n const info = managed.get(call.toolName)\n if (!info) return\n const decision = decisionFor(ctx, call.toolCallId, call.toolName, info.resolveInput(call.args))\n if (!decision) return { type: 'skip', result: { error: 'No approval recorded for this GitHub tool call and input.' } }\n if (!decision.approved) return { type: 'skip', result: { error: 'User denied this GitHub tool call.' } }\n },\n }\n}\n","import { chat, convertMessagesToModelMessages } from '@tanstack/ai'\nimport type { AnyTextAdapter, ChatMiddleware, ChatStream } from '@tanstack/ai'\nimport { resolveInstructions } from '../core/instructions'\nimport { PRESET_TOOLS, type GithubToolPreset } from '../core/presets'\nimport { createGithubTools, type CreateGithubToolsOptions } from './tools'\nimport { selectPresets, type GithubEvaluationOptions } from './evaluation'\nimport { createGithubApprovalMiddleware } from './approval'\nimport { githubToolApproval } from './interrupts'\n\ntype NativeOptions<A extends AnyTextAdapter> = Parameters<typeof chat<A, undefined, true>>[0]\ntype ChatSettings<A extends AnyTextAdapter> = Omit<NativeOptions<A>, 'tools' | 'messages' | 'systemPrompts' | 'context' | 'middleware' | 'interrupts' | 'stream' | 'outputSchema'>\n\n/** Configure a GitHub agent backed by TanStack chat(). */\nexport type CreateGithubAgentOptions<A extends AnyTextAdapter> = ChatSettings<A> & Omit<CreateGithubToolsOptions, 'preset'> & {\n /** Explicit presets or request-based selection with Jev. */\n preset?: GithubToolPreset | readonly GithubToolPreset[] | 'auto'\n /** Replace the default instructions; repository context is still appended. */\n instructions?: string\n /** Append to default instructions, unless instructions is supplied. */\n additionalInstructions?: string\n /** Evaluator adapter and thresholds for automatic routing and approval. */\n evaluation?: GithubEvaluationOptions\n /** Additional TanStack middleware. GitHub approval runs before these hooks. */\n middleware?: ChatMiddleware[]\n}\n\n/** One agent invocation, including TanStack cancellation and continuation options. */\nexport type GithubAgentCallOptions<A extends AnyTextAdapter> = Omit<Partial<ChatSettings<A>>, 'adapter'> & (\n | { prompt: string, messages?: never }\n | { messages: NonNullable<NativeOptions<A>['messages']>, prompt?: never }\n)\n\n/** A reusable, stateless TanStack GitHub agent. */\nexport type GithubAgent<A extends AnyTextAdapter> = {\n /** Collect TanStack's text result. Throws on interrupts; use stream() for approval UIs. */\n generate: (options: GithubAgentCallOptions<A>) => Promise<string>\n /** Run the tool loop as native TanStack events, including approval interrupts. */\n stream: (options: GithubAgentCallOptions<A>) => ChatStream\n}\n\n/** Create a GitHub agent with preset instructions, tools, and automatic approval middleware. */\nexport function createGithubAgent<A extends AnyTextAdapter>({\n token, preset, requireApproval, overrides, context, author, committer, coAuthors,\n instructions, additionalInstructions, evaluation, middleware = [], ...settings\n}: CreateGithubAgentOptions<A>): GithubAgent<A> {\n async function prepare(call: GithubAgentCallOptions<A>) {\n const { prompt, messages: suppliedMessages, ...callSettings } = call\n const messages = suppliedMessages ?? [{ role: 'user' as const, content: prompt! }]\n const modelMessages = convertMessagesToModelMessages(messages)\n const continuingAuto = preset === 'auto' && Boolean((callSettings.resume ?? settings.resume)?.length)\n const selected = preset === 'auto'\n ? continuingAuto ? 'repo-explorer' : await selectPresets(modelMessages, evaluation, (callSettings.abortController ?? settings.abortController)?.signal)\n : preset\n const availableTools = createGithubTools({ token, preset: continuingAuto ? undefined : selected, requireApproval, overrides, context, author, committer, coAuthors })\n const completed = new Set(modelMessages.filter(message => message.role === 'tool').map(message => message.toolCallId))\n const pendingNames = new Set(modelMessages.flatMap(message => message.role === 'assistant' ? message.toolCalls ?? [] : [])\n .filter(call => !completed.has(call.id)).map(call => call.function.name))\n const continuationNames = new Set<string>([...PRESET_TOOLS['repo-explorer'], ...pendingNames])\n const tools = continuingAuto ? availableTools.filter(tool => continuationNames.has(tool.name)) : availableTools\n const promptPreset: GithubToolPreset | GithubToolPreset[] | undefined = typeof selected === 'string' || selected === undefined\n ? selected\n : selected.length === 1 ? selected[0] : [...selected]\n return {\n ...settings,\n ...callSettings,\n messages,\n tools,\n systemPrompts: [resolveInstructions({ preset: continuingAuto ? undefined : promptPreset, instructions, additionalInstructions, context })],\n middleware: [createGithubApprovalMiddleware({ tools, evaluation }), ...middleware],\n interrupts: [githubToolApproval],\n }\n }\n\n return {\n async generate(call) {\n const prepared = await prepare(call)\n let interrupted = false\n const observeInterrupt: ChatMiddleware = {\n name: 'github-tools.generate',\n onChunk(_ctx, chunk) {\n if (chunk.type === 'RUN_FINISHED' && chunk.outcome?.type === 'interrupt') interrupted = true\n },\n }\n const text = await chat({ ...prepared, middleware: [observeInterrupt, ...prepared.middleware], stream: false })\n if (interrupted) throw new Error('GitHub agent requires review. Use stream() to handle approval interrupts and continuation.')\n return text\n },\n async *stream(call) {\n yield* chat({ ...await prepare(call), stream: true })\n },\n }\n}\n","import { toolFactory } from './tools'\n\n/** Create the TanStack `getRepository` server tool. */\nexport const getRepository = toolFactory('getRepository')\n\n/** Create the TanStack `listBranches` server tool. */\nexport const listBranches = toolFactory('listBranches')\n\n/** Create the TanStack `getFileContent` server tool. */\nexport const getFileContent = toolFactory('getFileContent')\n\n/** Create the TanStack `getRepositoryTree` server tool. */\nexport const getRepositoryTree = toolFactory('getRepositoryTree')\n\n/** Create the TanStack `createBranch` server tool. */\nexport const createBranch = toolFactory('createBranch')\n\n/** Create the TanStack `deleteBranch` server tool. */\nexport const deleteBranch = toolFactory('deleteBranch')\n\n/** Create the TanStack `forkRepository` server tool. */\nexport const forkRepository = toolFactory('forkRepository')\n\n/** Create the TanStack `createRepository` server tool. */\nexport const createRepository = toolFactory('createRepository')\n\n/** Create the TanStack `createOrUpdateFile` server tool. */\nexport const createOrUpdateFile = toolFactory('createOrUpdateFile')\n\n/** Create the TanStack `listPullRequests` server tool. */\nexport const listPullRequests = toolFactory('listPullRequests')\n\n/** Create the TanStack `getPullRequest` server tool. */\nexport const getPullRequest = toolFactory('getPullRequest')\n\n/** Create the TanStack `createPullRequest` server tool. */\nexport const createPullRequest = toolFactory('createPullRequest')\n\n/** Create the TanStack `mergePullRequest` server tool. */\nexport const mergePullRequest = toolFactory('mergePullRequest')\n\n/** Create the TanStack `updatePullRequest` server tool. */\nexport const updatePullRequest = toolFactory('updatePullRequest')\n\n/** Create the TanStack `addPullRequestComment` server tool. */\nexport const addPullRequestComment = toolFactory('addPullRequestComment')\n\n/** Create the TanStack `updatePullRequestComment` server tool. */\nexport const updatePullRequestComment = toolFactory('updatePullRequestComment')\n\n/** Create the TanStack `deletePullRequestComment` server tool. */\nexport const deletePullRequestComment = toolFactory('deletePullRequestComment')\n\n/** Create the TanStack `listPullRequestFiles` server tool. */\nexport const listPullRequestFiles = toolFactory('listPullRequestFiles')\n\n/** Create the TanStack `listPullRequestReviews` server tool. */\nexport const listPullRequestReviews = toolFactory('listPullRequestReviews')\n\n/** Create the TanStack `createPullRequestReview` server tool. */\nexport const createPullRequestReview = toolFactory('createPullRequestReview')\n\n/** Create the TanStack `listPullRequestReviewThreads` server tool. */\nexport const listPullRequestReviewThreads = toolFactory('listPullRequestReviewThreads')\n\n/** Create the TanStack `replyToReviewComment` server tool. */\nexport const replyToReviewComment = toolFactory('replyToReviewComment')\n\n/** Create the TanStack `resolveReviewThread` server tool. */\nexport const resolveReviewThread = toolFactory('resolveReviewThread')\n\n/** Create the TanStack `requestReviewers` server tool. */\nexport const requestReviewers = toolFactory('requestReviewers')\n\n/** Create the TanStack `getPullRequestContext` server tool. */\nexport const getPullRequestContext = toolFactory('getPullRequestContext')\n\n/** Create the TanStack `getIssueContext` server tool. */\nexport const getIssueContext = toolFactory('getIssueContext')\n\n/** Create the TanStack `listIssues` server tool. */\nexport const listIssues = toolFactory('listIssues')\n\n/** Create the TanStack `getIssue` server tool. */\nexport const getIssue = toolFactory('getIssue')\n\n/** Create the TanStack `listIssueComments` server tool. */\nexport const listIssueComments = toolFactory('listIssueComments')\n\n/** Create the TanStack `createIssue` server tool. */\nexport const createIssue = toolFactory('createIssue')\n\n/** Create the TanStack `addIssueComment` server tool. */\nexport const addIssueComment = toolFactory('addIssueComment')\n\n/** Create the TanStack `updateIssueComment` server tool. */\nexport const updateIssueComment = toolFactory('updateIssueComment')\n\n/** Create the TanStack `deleteIssueComment` server tool. */\nexport const deleteIssueComment = toolFactory('deleteIssueComment')\n\n/** Create the TanStack `closeIssue` server tool. */\nexport const closeIssue = toolFactory('closeIssue')\n\n/** Create the TanStack `updateIssue` server tool. */\nexport const updateIssue = toolFactory('updateIssue')\n\n/** Create the TanStack `listLabels` server tool. */\nexport const listLabels = toolFactory('listLabels')\n\n/** Create the TanStack `addLabels` server tool. */\nexport const addLabels = toolFactory('addLabels')\n\n/** Create the TanStack `removeLabel` server tool. */\nexport const removeLabel = toolFactory('removeLabel')\n\n/** Create the TanStack `createLabel` server tool. */\nexport const createLabel = toolFactory('createLabel')\n\n/** Create the TanStack `updateLabel` server tool. */\nexport const updateLabel = toolFactory('updateLabel')\n\n/** Create the TanStack `deleteLabel` server tool. */\nexport const deleteLabel = toolFactory('deleteLabel')\n\n/** Create the TanStack `addAssignees` server tool. */\nexport const addAssignees = toolFactory('addAssignees')\n\n/** Create the TanStack `removeAssignees` server tool. */\nexport const removeAssignees = toolFactory('removeAssignees')\n\n/** Create the TanStack `listIssueReactions` server tool. */\nexport const listIssueReactions = toolFactory('listIssueReactions')\n\n/** Create the TanStack `addIssueReaction` server tool. */\nexport const addIssueReaction = toolFactory('addIssueReaction')\n\n/** Create the TanStack `listCommentReactions` server tool. */\nexport const listCommentReactions = toolFactory('listCommentReactions')\n\n/** Create the TanStack `addCommentReaction` server tool. */\nexport const addCommentReaction = toolFactory('addCommentReaction')\n\n/** Create the TanStack `listDiscussions` server tool. */\nexport const listDiscussions = toolFactory('listDiscussions')\n\n/** Create the TanStack `getDiscussion` server tool. */\nexport const getDiscussion = toolFactory('getDiscussion')\n\n/** Create the TanStack `addDiscussionComment` server tool. */\nexport const addDiscussionComment = toolFactory('addDiscussionComment')\n\n/** Create the TanStack `listNotifications` server tool. */\nexport const listNotifications = toolFactory('listNotifications')\n\n/** Create the TanStack `markNotificationRead` server tool. */\nexport const markNotificationRead = toolFactory('markNotificationRead')\n\n/** Create the TanStack `searchCode` server tool. */\nexport const searchCode = toolFactory('searchCode')\n\n/** Create the TanStack `searchRepositories` server tool. */\nexport const searchRepositories = toolFactory('searchRepositories')\n\n/** Create the TanStack `searchIssues` server tool. */\nexport const searchIssues = toolFactory('searchIssues')\n\n/** Create the TanStack `listCommits` server tool. */\nexport const listCommits = toolFactory('listCommits')\n\n/** Create the TanStack `getCommit` server tool. */\nexport const getCommit = toolFactory('getCommit')\n\n/** Create the TanStack `getBlame` server tool. */\nexport const getBlame = toolFactory('getBlame')\n\n/** Create the TanStack `compareCommits` server tool. */\nexport const compareCommits = toolFactory('compareCommits')\n\n/** Create the TanStack `listGists` server tool. */\nexport const listGists = toolFactory('listGists')\n\n/** Create the TanStack `getGist` server tool. */\nexport const getGist = toolFactory('getGist')\n\n/** Create the TanStack `listGistComments` server tool. */\nexport const listGistComments = toolFactory('listGistComments')\n\n/** Create the TanStack `createGist` server tool. */\nexport const createGist = toolFactory('createGist')\n\n/** Create the TanStack `updateGist` server tool. */\nexport const updateGist = toolFactory('updateGist')\n\n/** Create the TanStack `deleteGist` server tool. */\nexport const deleteGist = toolFactory('deleteGist')\n\n/** Create the TanStack `createGistComment` server tool. */\nexport const createGistComment = toolFactory('createGistComment')\n\n/** Create the TanStack `listWorkflows` server tool. */\nexport const listWorkflows = toolFactory('listWorkflows')\n\n/** Create the TanStack `listWorkflowRuns` server tool. */\nexport const listWorkflowRuns = toolFactory('listWorkflowRuns')\n\n/** Create the TanStack `getWorkflowRun` server tool. */\nexport const getWorkflowRun = toolFactory('getWorkflowRun')\n\n/** Create the TanStack `listWorkflowJobs` server tool. */\nexport const listWorkflowJobs = toolFactory('listWorkflowJobs')\n\n/** Create the TanStack `getWorkflowJobLogs` server tool. */\nexport const getWorkflowJobLogs = toolFactory('getWorkflowJobLogs')\n\n/** Create the TanStack `triggerWorkflow` server tool. */\nexport const triggerWorkflow = toolFactory('triggerWorkflow')\n\n/** Create the TanStack `cancelWorkflowRun` server tool. */\nexport const cancelWorkflowRun = toolFactory('cancelWorkflowRun')\n\n/** Create the TanStack `rerunWorkflowRun` server tool. */\nexport const rerunWorkflowRun = toolFactory('rerunWorkflowRun')\n\n/** Create the TanStack `listCheckRuns` server tool. */\nexport const listCheckRuns = toolFactory('listCheckRuns')\n\n/** Create the TanStack `getCombinedStatus` server tool. */\nexport const getCombinedStatus = toolFactory('getCombinedStatus')\n\n/** Create the TanStack `getCiFailureContext` server tool. */\nexport const getCiFailureContext = toolFactory('getCiFailureContext')\n\n/** Create the TanStack `listReleases` server tool. */\nexport const listReleases = toolFactory('listReleases')\n\n/** Create the TanStack `getLatestRelease` server tool. */\nexport const getLatestRelease = toolFactory('getLatestRelease')\n\n/** Create the TanStack `getRelease` server tool. */\nexport const getRelease = toolFactory('getRelease')\n\n/** Create the TanStack `getReleaseContext` server tool. */\nexport const getReleaseContext = toolFactory('getReleaseContext')\n\n/** Create the TanStack `createRelease` server tool. */\nexport const createRelease = toolFactory('createRelease')\n\n/** Create the TanStack `updateRelease` server tool. */\nexport const updateRelease = toolFactory('updateRelease')\n\n/** Create the TanStack `deleteRelease` server tool. */\nexport const deleteRelease = toolFactory('deleteRelease')\n"],"mappings":";;;;;;;AA6CA,MAAa,4BAAY,IAAI,QAAqG;AAElI,SAAS,UAAoC,MAAS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