@github-tools/sdk 1.19.0 → 1.20.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 +60 -26
- package/dist/approval-policy--kByBqhT.mjs +17 -0
- package/dist/approval-policy--kByBqhT.mjs.map +1 -0
- package/dist/connect/eve.d.mts +2 -2
- package/dist/connect/eve.d.mts.map +1 -1
- package/dist/connect/eve.mjs +1 -1
- package/dist/connect.d.mts +15 -24
- package/dist/connect.d.mts.map +1 -1
- package/dist/connect.mjs +2 -2
- package/dist/{cores-BeLZwcde.mjs → cores-FLzAv2tu.mjs} +23 -2
- package/dist/cores-FLzAv2tu.mjs.map +1 -0
- package/dist/evaluation-BtoHbxuQ.mjs +311 -0
- package/dist/evaluation-BtoHbxuQ.mjs.map +1 -0
- package/dist/{eve-runtime-YTxfrWP-.mjs → eve-runtime-C-0doyHq.mjs} +13 -7
- package/dist/eve-runtime-C-0doyHq.mjs.map +1 -0
- package/dist/{eve-runtime-DRh2QJI7.d.mts → eve-runtime-CflZNuXD.d.mts} +6 -6
- package/dist/{eve-runtime-DRh2QJI7.d.mts.map → eve-runtime-CflZNuXD.d.mts.map} +1 -1
- package/dist/eve-runtime.d.mts +5 -5
- package/dist/eve-runtime.mjs +4 -4
- package/dist/eve.d.mts +53 -4
- package/dist/eve.d.mts.map +1 -1
- package/dist/eve.mjs +52 -3
- package/dist/eve.mjs.map +1 -1
- package/dist/{index-DkZvveZP.d.mts → index-C3wlz660.d.mts} +91 -347
- package/dist/index-C3wlz660.d.mts.map +1 -0
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +4 -3
- package/dist/{interrupts-C_lUXMdd.d.mts → interrupts-BSDPwdJ2.d.mts} +2 -2
- package/dist/interrupts-BSDPwdJ2.d.mts.map +1 -0
- package/dist/{src-Bx5p1Unc.mjs → src-DyiAVHKl.mjs} +338 -15
- package/dist/src-DyiAVHKl.mjs.map +1 -0
- package/dist/tanstack/interrupts.d.mts +1 -1
- package/dist/tanstack.d.mts +1214 -56
- package/dist/tanstack.d.mts.map +1 -1
- package/dist/tanstack.mjs +26 -13
- package/dist/tanstack.mjs.map +1 -1
- package/dist/{token-Bh8nPj66.mjs → token-DIwB-wtp.mjs} +35 -116
- package/dist/token-DIwB-wtp.mjs.map +1 -0
- package/dist/{tool-types-CrC80SIL.d.mts → tool-types-OFyE3z0C.d.mts} +283 -54
- package/dist/tool-types-OFyE3z0C.d.mts.map +1 -0
- package/dist/{types-BmwOpI5-.d.mts → types-CJqhvQwi.d.mts} +3 -3
- package/dist/{types-BmwOpI5-.d.mts.map → types-CJqhvQwi.d.mts.map} +1 -1
- package/dist/{types-CPAsEMzx.d.mts → types-ITYfXMtY.d.mts} +2 -2
- package/dist/{types-CPAsEMzx.d.mts.map → types-ITYfXMtY.d.mts.map} +1 -1
- package/dist/workflow.d.mts +34 -40
- package/dist/workflow.d.mts.map +1 -1
- package/dist/workflow.mjs +17 -46
- package/dist/workflow.mjs.map +1 -1
- package/dist/{write-tools-BaoTUCg7.mjs → write-tools-DnGZw-RD.mjs} +941 -112
- package/dist/write-tools-DnGZw-RD.mjs.map +1 -0
- package/package.json +4 -6
- package/dist/cores-BeLZwcde.mjs.map +0 -1
- package/dist/evaluation-f-2QwBid.mjs +0 -210
- package/dist/evaluation-f-2QwBid.mjs.map +0 -1
- package/dist/eve-runtime-YTxfrWP-.mjs.map +0 -1
- package/dist/index-DkZvveZP.d.mts.map +0 -1
- package/dist/instructions-BuypoY0x.mjs +0 -148
- package/dist/instructions-BuypoY0x.mjs.map +0 -1
- package/dist/interrupts-C_lUXMdd.d.mts.map +0 -1
- package/dist/src-Bx5p1Unc.mjs.map +0 -1
- package/dist/token-Bh8nPj66.mjs.map +0 -1
- package/dist/tool-types-CrC80SIL.d.mts.map +0 -1
- package/dist/write-tools-BaoTUCg7.mjs.map +0 -1
package/dist/tanstack.d.mts.map
CHANGED
|
@@ -1 +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;;;;;;;;;;;;;;;;;;;;;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,eAAY,OAAZ,kBAAY,UAAA,wBAAA,4BAAA,yBAAA;;;;;;;;;;;;;;;;;;gBAAA;;;;;;;;;;;;;;qBAGZ,mBAAgB,OAAhB,kBAAgB,UAAA,wBAAA,4BAAA,yBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAGhB,aAAU,OAAV,kBAAU,UAAA,wBAAA,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"}
|
|
1
|
+
{"version":3,"file":"tanstack.d.mts","names":[],"sources":["../src/core/detail.ts","../src/core/bundles.ts","../src/core/checks.ts","../src/core/pagination.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/security.ts","../src/core/repository.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;;;;cCIC,kCAAgC,EAAA;;;;;;;;;;;;;;GAW3C,EAAA,KAAA;cAEW;iBA6BS,4BACpB,OACA,OACA,MACA,YACA,cACA,gBACA,eACA,cACA,cACA,qBACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;E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;;;;;;;;;;;;;;;;;;;;;;;;qBAGjB,gBAAa,OAAb,kBAAa,UAAA,wBAAA,4BAAA,yBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAGb,gBAAa,OAAb,kBAAa,UAAA,wBAAA,4BAAA,yBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAGb,gBAAa,OAAb,kBAAa,UAAA,wBAAA,4BAAA,yBAAA;;;;;;;;;;;;;;;qBAGb,yBAAsB,OAAtB,kBAAsB,UAAA,wBAAA,4BAAA,yBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAAA;;;;;;;;;;;;;;;;;qBAGtB,uBAAoB,OAApB,kBAAoB,UAAA,wBAAA,4BAAA,yBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAGpB,2BAAwB,OAAxB,kBAAwB,UAAA,wBAAA,4BAAA,yBAAA;;;;;;;;;;;;;;;;;;;;gBAAA"}
|
package/dist/tanstack.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { t as GITHUB_TOOL_CORES } from "./cores-
|
|
1
|
+
import { Aa as githubToolsErrors, C as GITHUB_TOOL_CATALOG, Ma as stripRateLimit, S as ALL_GITHUB_TOOL_NAMES, _ as PRESET_TOOLS, a as mergeContextArgs, b as githubTokenCall, c as DEFAULT_EVALUATION_MODEL, d as RISK_QUESTION, f as conversationState, h as GITHUB_TOOL_NAMES, l as INTENT_QUESTION, m as requiresApproval, n as resolveInstructions, o as softenContextSchema, p as rankPresets, s as AUTO_APPROVAL_TOOLS, t as GITHUB_WRITE_TOOLS, u as PRESET_PURPOSES, v as resolvePresetTools, w as isGithubWriteToolName, y as createGithubTokenResolver } from "./write-tools-DnGZw-RD.mjs";
|
|
2
|
+
import { t as resolveApprovalMode } from "./approval-policy--kByBqhT.mjs";
|
|
3
|
+
import { t as GITHUB_TOOL_CORES } from "./cores-FLzAv2tu.mjs";
|
|
4
4
|
import { githubToolApproval } from "./tanstack/interrupts.mjs";
|
|
5
5
|
import { boolean, chat, convertMessagesToModelMessages, decide, score, toolDefinition } from "@tanstack/ai";
|
|
6
6
|
import { isDeepStrictEqual } from "node:util";
|
|
@@ -23,11 +23,11 @@ function buildTool(name, token, options) {
|
|
|
23
23
|
needsApproval: mode !== false
|
|
24
24
|
}).server(async (input) => {
|
|
25
25
|
const resolved = resolveInput(input);
|
|
26
|
-
const attribution = name === "createOrUpdateFile" ? {
|
|
26
|
+
const attribution = name === "createOrUpdateFile" || name === "editFiles" ? {
|
|
27
27
|
author: options.author,
|
|
28
28
|
committer: options.committer,
|
|
29
29
|
coAuthors: options.coAuthors
|
|
30
|
-
} : name === "mergePullRequest" ? { coAuthors: options.coAuthors } : {};
|
|
30
|
+
} : name === "mergePullRequest" || name === "enablePullRequestAutoMerge" ? { coAuthors: options.coAuthors } : {};
|
|
31
31
|
return stripRateLimit(await core({
|
|
32
32
|
...resolved,
|
|
33
33
|
...attribution,
|
|
@@ -57,14 +57,13 @@ function createGithubTools(options = {}) {
|
|
|
57
57
|
}
|
|
58
58
|
//#endregion
|
|
59
59
|
//#region src/tanstack/evaluation.ts
|
|
60
|
+
const TANSTACK_DEFAULT_EVALUATION_MODEL = "typesafe-ai/jev";
|
|
60
61
|
async function evaluationAdapter(options) {
|
|
61
62
|
if (options.adapter) return options.adapter;
|
|
62
63
|
const { vercelGatewayDecider } = await import("@tanstack/ai-vercel-gateway");
|
|
63
|
-
return vercelGatewayDecider(
|
|
64
|
+
return vercelGatewayDecider(TANSTACK_DEFAULT_EVALUATION_MODEL);
|
|
64
65
|
}
|
|
65
|
-
function
|
|
66
|
-
const message = messages.findLast((message) => message.role === "user");
|
|
67
|
-
if (!message) return "";
|
|
66
|
+
function messageText(message) {
|
|
68
67
|
if (typeof message.content === "string") return message.content;
|
|
69
68
|
return message.content?.flatMap((part) => part.type === "text" ? [part.content] : []).join("\n") ?? "";
|
|
70
69
|
}
|
|
@@ -73,7 +72,7 @@ function evaluationFailed(error, options, fallback, signal) {
|
|
|
73
72
|
if (error instanceof Error && error.name === "AbortError") throw error;
|
|
74
73
|
const cause = error instanceof Error ? error : new Error(String(error));
|
|
75
74
|
console.warn("[github-tools]", githubToolsErrors.EVALUATION_FAILED({
|
|
76
|
-
model: options.adapter?.model ??
|
|
75
|
+
model: options.adapter?.model ?? TANSTACK_DEFAULT_EVALUATION_MODEL,
|
|
77
76
|
fallback,
|
|
78
77
|
detail: cause.message,
|
|
79
78
|
cause
|
|
@@ -85,7 +84,7 @@ async function needsAutoApproval(name, input, messages, options = {}, signal) {
|
|
|
85
84
|
const result = await decide({
|
|
86
85
|
adapter: await evaluationAdapter(options),
|
|
87
86
|
state: {
|
|
88
|
-
|
|
87
|
+
...conversationState(messages, messageText),
|
|
89
88
|
toolCall: {
|
|
90
89
|
tool: name,
|
|
91
90
|
description: GITHUB_TOOL_CATALOG[name].description,
|
|
@@ -114,7 +113,7 @@ async function selectPresets(messages, options = {}, signal) {
|
|
|
114
113
|
const presets = Object.keys(PRESET_PURPOSES);
|
|
115
114
|
const result = await decide({
|
|
116
115
|
adapter: await evaluationAdapter(options),
|
|
117
|
-
state:
|
|
116
|
+
state: conversationState(messages, messageText),
|
|
118
117
|
questions: Object.fromEntries(presets.map((preset) => [preset, boolean({
|
|
119
118
|
instructions: "Does handling this GitHub request need the tools of this preset?",
|
|
120
119
|
criteria: { true: JSON.stringify({
|
|
@@ -309,6 +308,8 @@ const forkRepository = toolFactory("forkRepository");
|
|
|
309
308
|
const createRepository = toolFactory("createRepository");
|
|
310
309
|
/** Create the TanStack `createOrUpdateFile` server tool. */
|
|
311
310
|
const createOrUpdateFile = toolFactory("createOrUpdateFile");
|
|
311
|
+
/** Create the TanStack `editFiles` server tool. */
|
|
312
|
+
const editFiles = toolFactory("editFiles");
|
|
312
313
|
/** Create the TanStack `listPullRequests` server tool. */
|
|
313
314
|
const listPullRequests = toolFactory("listPullRequests");
|
|
314
315
|
/** Create the TanStack `getPullRequest` server tool. */
|
|
@@ -317,6 +318,12 @@ const getPullRequest = toolFactory("getPullRequest");
|
|
|
317
318
|
const createPullRequest = toolFactory("createPullRequest");
|
|
318
319
|
/** Create the TanStack `mergePullRequest` server tool. */
|
|
319
320
|
const mergePullRequest = toolFactory("mergePullRequest");
|
|
321
|
+
/** Create the TanStack `enablePullRequestAutoMerge` server tool. */
|
|
322
|
+
const enablePullRequestAutoMerge = toolFactory("enablePullRequestAutoMerge");
|
|
323
|
+
/** Create the TanStack `disablePullRequestAutoMerge` server tool. */
|
|
324
|
+
const disablePullRequestAutoMerge = toolFactory("disablePullRequestAutoMerge");
|
|
325
|
+
/** Create the TanStack `getBranchRules` server tool. */
|
|
326
|
+
const getBranchRules = toolFactory("getBranchRules");
|
|
320
327
|
/** Create the TanStack `updatePullRequest` server tool. */
|
|
321
328
|
const updatePullRequest = toolFactory("updatePullRequest");
|
|
322
329
|
/** Create the TanStack `addPullRequestComment` server tool. */
|
|
@@ -459,7 +466,13 @@ const createRelease = toolFactory("createRelease");
|
|
|
459
466
|
const updateRelease = toolFactory("updateRelease");
|
|
460
467
|
/** Create the TanStack `deleteRelease` server tool. */
|
|
461
468
|
const deleteRelease = toolFactory("deleteRelease");
|
|
469
|
+
/** Create the TanStack `listCodeScanningAlerts` server tool. */
|
|
470
|
+
const listCodeScanningAlerts = toolFactory("listCodeScanningAlerts");
|
|
471
|
+
/** Create the TanStack `listDependabotAlerts` server tool. */
|
|
472
|
+
const listDependabotAlerts = toolFactory("listDependabotAlerts");
|
|
473
|
+
/** Create the TanStack `listSecretScanningAlerts` server tool. */
|
|
474
|
+
const listSecretScanningAlerts = toolFactory("listSecretScanningAlerts");
|
|
462
475
|
//#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 };
|
|
476
|
+
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, disablePullRequestAutoMerge, editFiles, enablePullRequestAutoMerge, forkRepository, getBlame, getBranchRules, getCiFailureContext, getCombinedStatus, getCommit, getDiscussion, getFileContent, getGist, getIssue, getIssueContext, getLatestRelease, getPullRequest, getPullRequestContext, getRelease, getReleaseContext, getRepository, getRepositoryTree, getWorkflowJobLogs, getWorkflowRun, listBranches, listCheckRuns, listCodeScanningAlerts, listCommentReactions, listCommits, listDependabotAlerts, listDiscussions, listGistComments, listGists, listIssueComments, listIssueReactions, listIssues, listLabels, listNotifications, listPullRequestFiles, listPullRequestReviewThreads, listPullRequestReviews, listPullRequests, listReleases, listSecretScanningAlerts, listWorkflowJobs, listWorkflowRuns, listWorkflows, markNotificationRead, mergePullRequest, removeAssignees, removeLabel, replyToReviewComment, requestReviewers, rerunWorkflowRun, resolveReviewThread, searchCode, searchIssues, searchRepositories, selectPresets, triggerWorkflow, updateGist, updateIssue, updateIssueComment, updateLabel, updatePullRequest, updatePullRequestComment, updateRelease };
|
|
464
477
|
|
|
465
478
|
//# sourceMappingURL=tanstack.mjs.map
|
package/dist/tanstack.mjs.map
CHANGED
|
@@ -1 +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,OAAqC,SAAqD;CAC9I,MAAM,aAAa,oBAAoB;CACvC,MAAM,eAAe,0BAA0B,KAAK;CACpD,MAAM,cAAc,QAAQ,UAAU,oBAAoB,WAAW,aAAa,QAAQ,OAAO,IAAI,WAAW;CAChH,MAAM,gBAAgB,UAA4C;EAChE,MAAM,OAAO,YAAY,MAAM,KAAK;EACpC,OAAO,QAAQ,UAAU,iBAAiB,MAAM,QAAQ,OAAO,IAAI;CACrE;CACA,MAAM,OAAO,QAAQ,kBAAkB,sBAAsB,IAAI,IAAI,OAAO;CAC5E,MAAM,OAAO,kBAAkB;CAC/B,MAAM,QAAQ,eAAe;EAC3B;EACA,aAAa,QAAQ,eAAe,WAAW;EAC/C;EACA,eAAe,SAAS;CAC1B,CAAC,CAAC,CAAC,OAAO,OAAO,UAAU;EACzB,MAAM,WAAW,aAAa,KAAK;EACnC,MAAM,cAAc,SAAS,uBACzB;GAAE,QAAQ,QAAQ;GAAQ,WAAW,QAAQ;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MAAa,aAAa,YAAY,YAAY;;AAGlD,MAAa,aAAa,YAAY,YAAY;;AAGlD,MAAa,oBAAoB,YAAY,mBAAmB;;AAGhE,MAAa,gBAAgB,YAAY,eAAe;;AAGxD,MAAa,mBAAmB,YAAY,kBAAkB;;AAG9D,MAAa,iBAAiB,YAAY,gBAAgB;;AAG1D,MAAa,mBAAmB,YAAY,kBAAkB;;AAG9D,MAAa,qBAAqB,YAAY,oBAAoB;;AAGlE,MAAa,kBAAkB,YAAY,iBAAiB;;AAG5D,MAAa,oBAAoB,YAAY,mBAAmB;;AAGhE,MAAa,mBAAmB,YAAY,kBAAkB;;AAG9D,MAAa,gBAAgB,YAAY,eAAe;;AAGxD,MAAa,oBAAoB,YAAY,mBAAmB;;AAGhE,MAAa,sBAAsB,YAAY,qBAAqB;;AAGpE,MAAa,eAAe,YAAY,cAAc;;AAGtD,MAAa,mBAAmB,YAAY,kBAAkB;;AAG9D,MAAa,aAAa,YAAY,YAAY;;AAGlD,MAAa,oBAAoB,YAAY,mBAAmB;;AAGhE,MAAa,gBAAgB,YAAY,eAAe;;AAGxD,MAAa,gBAAgB,YAAY,eAAe;;AAGxD,MAAa,gBAAgB,YAAY,eAAe"}
|
|
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' || name === 'editFiles'\n ? { author: options.author, committer: options.committer, coAuthors: options.coAuthors }\n : name === 'mergePullRequest' || name === 'enablePullRequestAutoMerge' ? { 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 { INTENT_QUESTION, PRESET_PURPOSES, RISK_QUESTION, conversationState, 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\n// `@tanstack/ai-vercel-gateway` 0.3 types only the `typesafe-ai/jev` alias, not pinned releases.\nconst TANSTACK_DEFAULT_EVALUATION_MODEL = 'typesafe-ai/jev'\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(TANSTACK_DEFAULT_EVALUATION_MODEL)\n}\n\nexport function latestUserText(messages: readonly ModelMessage[]): string {\n return conversationState(messages, messageText).request\n}\n\nfunction messageText(message: ModelMessage): string {\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 ?? TANSTACK_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: { ...conversationState(messages, messageText), 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: conversationState(messages, messageText),\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 `editFiles` server tool. */\nexport const editFiles = toolFactory('editFiles')\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 `enablePullRequestAutoMerge` server tool. */\nexport const enablePullRequestAutoMerge = toolFactory('enablePullRequestAutoMerge')\n\n/** Create the TanStack `disablePullRequestAutoMerge` server tool. */\nexport const disablePullRequestAutoMerge = toolFactory('disablePullRequestAutoMerge')\n\n/** Create the TanStack `getBranchRules` server tool. */\nexport const getBranchRules = toolFactory('getBranchRules')\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\n/** Create the TanStack `listCodeScanningAlerts` server tool. */\nexport const listCodeScanningAlerts = toolFactory('listCodeScanningAlerts')\n\n/** Create the TanStack `listDependabotAlerts` server tool. */\nexport const listDependabotAlerts = toolFactory('listDependabotAlerts')\n\n/** Create the TanStack `listSecretScanningAlerts` server tool. */\nexport const listSecretScanningAlerts = toolFactory('listSecretScanningAlerts')\n"],"mappings":";;;;;;;AA6CA,MAAa,4BAAY,IAAI,QAAqG;AAElI,SAAS,UAAoC,MAAS,OAAqC,SAAqD;CAC9I,MAAM,aAAa,oBAAoB;CACvC,MAAM,eAAe,0BAA0B,KAAK;CACpD,MAAM,cAAc,QAAQ,UAAU,oBAAoB,WAAW,aAAa,QAAQ,OAAO,IAAI,WAAW;CAChH,MAAM,gBAAgB,UAA4C;EAChE,MAAM,OAAO,YAAY,MAAM,KAAK;EACpC,OAAO,QAAQ,UAAU,iBAAiB,MAAM,QAAQ,OAAO,IAAI;CACrE;CACA,MAAM,OAAO,QAAQ,kBAAkB,sBAAsB,IAAI,IAAI,OAAO;CAC5E,MAAM,OAAO,kBAAkB;CAC/B,MAAM,QAAQ,eAAe;EAC3B;EACA,aAAa,QAAQ,eAAe,WAAW;EAC/C;EACA,eAAe,SAAS;CAC1B,CAAC,CAAC,CAAC,OAAO,OAAO,UAAU;EACzB,MAAM,WAAW,aAAa,KAAK;EACnC,MAAM,cAAc,SAAS,wBAAwB,SAAS,cAC1D;GAAE,QAAQ,QAAQ;GAAQ,WAAW,QAAQ;GAAW,WAAW,QAAQ;EAAU,IACrF,SAAS,sBAAsB,SAAS,+BAA+B,EAAE,WAAW,QAAQ,UAAU,IAAI,CAAC;EAC/G,OAAO,eAAe,MAAM,KAAK;GAAE,GAAG;GAAU,GAAG;GAAa,OAAO,MAAM,aAAa,gBAAgB,MAAM,QAAQ,CAAC;EAAE,CAAC,CAAC;CAC/H,CAAC;CACD,IAAI,SAAS,QAAQ,UAAU,IAAI,OAAO;EAAE;EAAM;CAAa,CAAC;CAChE,OAAO;AACT;AAEA,SAAgB,YAAsC,MAAS;CAC7D,QAAQ,OAAyB,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AoB;;AAGlE,MAAa,kBAAkB,YAAY,iBAAiB;;AAG5D,MAAa,oBAAoB,YAAY,mBAAmB;;AAGhE,MAAa,mBAAmB,YAAY,kBAAkB;;AAG9D,MAAa,gBAAgB,YAAY,eAAe;;AAGxD,MAAa,oBAAoB,YAAY,mBAAmB;;AAGhE,MAAa,sBAAsB,YAAY,qBAAqB;;AAGpE,MAAa,eAAe,YAAY,cAAc;;AAGtD,MAAa,mBAAmB,YAAY,kBAAkB;;AAG9D,MAAa,aAAa,YAAY,YAAY;;AAGlD,MAAa,oBAAoB,YAAY,mBAAmB;;AAGhE,MAAa,gBAAgB,YAAY,eAAe;;AAGxD,MAAa,gBAAgB,YAAY,eAAe;;AAGxD,MAAa,gBAAgB,YAAY,eAAe;;AAGxD,MAAa,yBAAyB,YAAY,wBAAwB;;AAG1E,MAAa,uBAAuB,YAAY,sBAAsB;;AAGtE,MAAa,2BAA2B,YAAY,0BAA0B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Aa as githubToolsErrors, C as GITHUB_TOOL_CATALOG, S as ALL_GITHUB_TOOL_NAMES, _ as PRESET_TOOLS, v as resolvePresetTools } from "./write-tools-DnGZw-RD.mjs";
|
|
2
2
|
import { ConnectError, ConnectorInstallationRequiredError, UserAuthorizationRequiredError, getToken } from "@vercel/connect";
|
|
3
3
|
//#region src/connect/connector.ts
|
|
4
4
|
/** Resolves a {@link GithubConnectorInput} to a connector name string. */
|
|
@@ -7,119 +7,6 @@ async function resolveGithubConnector(connector) {
|
|
|
7
7
|
}
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region src/connect/scopes.ts
|
|
10
|
-
/**
|
|
11
|
-
* Vercel Connect scope strings mapped to each {@link GithubToolPreset}.
|
|
12
|
-
*
|
|
13
|
-
* Scopes mirror GitHub App permissions (`contents`, `pull_requests`, `issues`,
|
|
14
|
-
* `discussions`, `actions`, `checks`, `statuses`, `administration`, `metadata`)
|
|
15
|
-
* and must cover every read/write family a preset's tools touch, not just its
|
|
16
|
-
* primary domain. Release tools fall under the `contents` permission on GitHub
|
|
17
|
-
* Apps, and reaction tools under `issues`, so neither needs a scope of its own.
|
|
18
|
-
*
|
|
19
|
-
* Gist tools in `repo-explorer` and `maintainer` are intentionally left
|
|
20
|
-
* unscoped: the Gists API only accepts GitHub App *user* access tokens, never
|
|
21
|
-
* installation tokens, and Connect mints `subject: { type: 'app' }`
|
|
22
|
-
* installation tokens by default. Gist calls made with an app-subject token
|
|
23
|
-
* 403 regardless of requested scopes — use a `{ type: 'user' }` subject or a
|
|
24
|
-
* fine-grained PAT with the "Gists" account permission for those tools instead.
|
|
25
|
-
*
|
|
26
|
-
* Notification tools in `maintainer` and `notification-inbox` are unscoped for
|
|
27
|
-
* the same reason: `notifications` is an account-level GitHub App permission
|
|
28
|
-
* that only applies to user access tokens, so `listNotifications` /
|
|
29
|
-
* `markNotificationRead` need a PAT with the "Notifications" account permission.
|
|
30
|
-
*/
|
|
31
|
-
const PRESET_CONNECT_SCOPES = {
|
|
32
|
-
"repo-explorer": [
|
|
33
|
-
"contents:read",
|
|
34
|
-
"metadata:read",
|
|
35
|
-
"pull_requests:read",
|
|
36
|
-
"issues:read",
|
|
37
|
-
"discussions:read",
|
|
38
|
-
"actions:read",
|
|
39
|
-
"checks:read",
|
|
40
|
-
"statuses:read"
|
|
41
|
-
],
|
|
42
|
-
"code-review": [
|
|
43
|
-
"contents:read",
|
|
44
|
-
"metadata:read",
|
|
45
|
-
"pull_requests:read",
|
|
46
|
-
"pull_requests:write",
|
|
47
|
-
"checks:read",
|
|
48
|
-
"statuses:read"
|
|
49
|
-
],
|
|
50
|
-
"issue-triage": [
|
|
51
|
-
"contents:read",
|
|
52
|
-
"metadata:read",
|
|
53
|
-
"issues:read",
|
|
54
|
-
"issues:write"
|
|
55
|
-
],
|
|
56
|
-
"ci-ops": [
|
|
57
|
-
"contents:read",
|
|
58
|
-
"metadata:read",
|
|
59
|
-
"actions:read",
|
|
60
|
-
"actions:write",
|
|
61
|
-
"checks:read",
|
|
62
|
-
"statuses:read"
|
|
63
|
-
],
|
|
64
|
-
"security-audit": [
|
|
65
|
-
"contents:read",
|
|
66
|
-
"metadata:read",
|
|
67
|
-
"pull_requests:read",
|
|
68
|
-
"issues:read",
|
|
69
|
-
"issues:write",
|
|
70
|
-
"actions:read",
|
|
71
|
-
"checks:read",
|
|
72
|
-
"statuses:read"
|
|
73
|
-
],
|
|
74
|
-
"release-manager": [
|
|
75
|
-
"contents:read",
|
|
76
|
-
"contents:write",
|
|
77
|
-
"metadata:read",
|
|
78
|
-
"pull_requests:read",
|
|
79
|
-
"actions:read",
|
|
80
|
-
"actions:write"
|
|
81
|
-
],
|
|
82
|
-
"discussion-moderator": [
|
|
83
|
-
"contents:read",
|
|
84
|
-
"metadata:read",
|
|
85
|
-
"issues:read",
|
|
86
|
-
"issues:write",
|
|
87
|
-
"discussions:read",
|
|
88
|
-
"discussions:write"
|
|
89
|
-
],
|
|
90
|
-
"notification-inbox": [
|
|
91
|
-
"contents:read",
|
|
92
|
-
"metadata:read",
|
|
93
|
-
"pull_requests:read",
|
|
94
|
-
"issues:read"
|
|
95
|
-
],
|
|
96
|
-
"pr-author": [
|
|
97
|
-
"contents:read",
|
|
98
|
-
"contents:write",
|
|
99
|
-
"metadata:read",
|
|
100
|
-
"pull_requests:read",
|
|
101
|
-
"pull_requests:write"
|
|
102
|
-
],
|
|
103
|
-
"maintainer": [
|
|
104
|
-
"contents:read",
|
|
105
|
-
"contents:write",
|
|
106
|
-
"metadata:read",
|
|
107
|
-
"pull_requests:read",
|
|
108
|
-
"pull_requests:write",
|
|
109
|
-
"issues:read",
|
|
110
|
-
"issues:write",
|
|
111
|
-
"discussions:read",
|
|
112
|
-
"discussions:write",
|
|
113
|
-
"actions:read",
|
|
114
|
-
"actions:write",
|
|
115
|
-
"checks:read",
|
|
116
|
-
"statuses:read",
|
|
117
|
-
"administration:read",
|
|
118
|
-
"administration:write"
|
|
119
|
-
]
|
|
120
|
-
};
|
|
121
|
-
/** Default scopes when no preset is specified — union of all preset scopes. */
|
|
122
|
-
const ALL_CONNECT_SCOPES = [...new Set(Object.values(PRESET_CONNECT_SCOPES).flat())];
|
|
123
10
|
/** Stable scope order for tool-derived unions (tests + Connect payloads). */
|
|
124
11
|
const SCOPE_ORDER = [
|
|
125
12
|
"contents:read",
|
|
@@ -136,7 +23,10 @@ const SCOPE_ORDER = [
|
|
|
136
23
|
"checks:read",
|
|
137
24
|
"statuses:read",
|
|
138
25
|
"administration:read",
|
|
139
|
-
"administration:write"
|
|
26
|
+
"administration:write",
|
|
27
|
+
"security_events:read",
|
|
28
|
+
"vulnerability_alerts:read",
|
|
29
|
+
"secret_scanning_alerts:read"
|
|
140
30
|
];
|
|
141
31
|
/**
|
|
142
32
|
* Per-tool Connect scopes, derived from `GITHUB_TOOL_CATALOG`. Empty arrays are
|
|
@@ -151,6 +41,35 @@ function orderScopes(scopes) {
|
|
|
151
41
|
return SCOPE_ORDER.filter((scope) => scopes.has(scope));
|
|
152
42
|
}
|
|
153
43
|
/**
|
|
44
|
+
* Vercel Connect scope strings mapped to each {@link GithubToolPreset}, derived
|
|
45
|
+
* from the preset's tools so a tool added to a preset brings its scopes along.
|
|
46
|
+
*
|
|
47
|
+
* Scopes mirror GitHub App permissions (`contents`, `pull_requests`, `issues`,
|
|
48
|
+
* `discussions`, `actions`, `checks`, `statuses`, `administration`, `metadata`,
|
|
49
|
+
* and `security_events`, `vulnerability_alerts`, `secret_scanning_alerts` for the alert tools)
|
|
50
|
+
* and must cover every read/write family a preset's tools touch, not just its
|
|
51
|
+
* primary domain. Release tools fall under the `contents` permission on GitHub
|
|
52
|
+
* Apps, and reaction tools under `issues`, so neither needs a scope of its own.
|
|
53
|
+
*
|
|
54
|
+
* Gist tools in `repo-explorer` and `maintainer` are intentionally left
|
|
55
|
+
* unscoped: the Gists API only accepts GitHub App *user* access tokens, never
|
|
56
|
+
* installation tokens, and Connect mints `subject: { type: 'app' }`
|
|
57
|
+
* installation tokens by default. Gist calls made with an app-subject token
|
|
58
|
+
* 403 regardless of requested scopes — use a `{ type: 'user' }` subject or a
|
|
59
|
+
* fine-grained PAT with the "Gists" account permission for those tools instead.
|
|
60
|
+
*
|
|
61
|
+
* Notification tools in `maintainer` and `notification-inbox` are unscoped for
|
|
62
|
+
* the same reason: `notifications` is an account-level GitHub App permission
|
|
63
|
+
* that only applies to user access tokens, so `listNotifications` /
|
|
64
|
+
* `markNotificationRead` need a PAT with the "Notifications" account permission.
|
|
65
|
+
*/
|
|
66
|
+
const PRESET_CONNECT_SCOPES = Object.keys(PRESET_TOOLS).reduce((map, preset) => {
|
|
67
|
+
map[preset] = connectGithubScopesForTools(PRESET_TOOLS[preset]);
|
|
68
|
+
return map;
|
|
69
|
+
}, {});
|
|
70
|
+
/** Default scopes when no preset is specified: every tool's scopes. */
|
|
71
|
+
const ALL_CONNECT_SCOPES = connectGithubScopesForTools(ALL_GITHUB_TOOL_NAMES);
|
|
72
|
+
/**
|
|
154
73
|
* Returns Vercel Connect scopes for a preset or combined presets.
|
|
155
74
|
* Without a preset, returns the union of all preset scopes (full tool set).
|
|
156
75
|
*/
|
|
@@ -349,4 +268,4 @@ function resolveConnectOptions(connectOptions) {
|
|
|
349
268
|
//#endregion
|
|
350
269
|
export { connectGithubScopesForSelection as a, connectGithubScopesForPreset as i, PRESET_CONNECT_SCOPES as n, connectGithubScopesForTools as o, TOOL_CONNECT_SCOPES as r, resolveGithubConnector as s, connectGithubToken as t };
|
|
351
270
|
|
|
352
|
-
//# sourceMappingURL=token-
|
|
271
|
+
//# sourceMappingURL=token-DIwB-wtp.mjs.map
|