@github-tools/sdk 1.14.0 → 1.16.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 +8 -0
- package/dist/connect/eve.d.mts +1 -1
- package/dist/connect/eve.mjs +1 -1
- package/dist/connect.d.mts +8 -8
- package/dist/connect.d.mts.map +1 -1
- package/dist/connect.mjs +2 -2
- package/dist/{eve-runtime-D1v4C0UP.d.mts → eve-runtime-Bu8Gy8CS.d.mts} +2 -2
- package/dist/{eve-runtime-D1v4C0UP.d.mts.map → eve-runtime-Bu8Gy8CS.d.mts.map} +1 -1
- package/dist/{eve-runtime-BdolQrBF.mjs → eve-runtime-Cfyy1tzp.mjs} +3 -2
- package/dist/eve-runtime-Cfyy1tzp.mjs.map +1 -0
- package/dist/eve-runtime.d.mts +4 -4
- package/dist/eve-runtime.mjs +3 -3
- package/dist/eve.d.mts +1 -1
- package/dist/eve.mjs +2 -2
- package/dist/{index-PqQNoVuw.d.mts → index-BOerqLIm.d.mts} +114 -2
- package/dist/index-BOerqLIm.d.mts.map +1 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +3 -3
- package/dist/{src-D9WxaIVj.mjs → src-C54blWpT.mjs} +2 -2
- package/dist/{src-D9WxaIVj.mjs.map → src-C54blWpT.mjs.map} +1 -1
- package/dist/{token-Dt6qs_kf.mjs → token-Iop2lapd.mjs} +61 -10
- package/dist/token-Iop2lapd.mjs.map +1 -0
- package/dist/tool-types-DbZpOYFG.d.mts.map +1 -1
- package/dist/{types-BAEqBfM5.d.mts → types-v39VrZ-m.d.mts} +11 -2
- package/dist/types-v39VrZ-m.d.mts.map +1 -0
- package/dist/workflow.d.mts +1 -1
- package/dist/workflow.mjs +2 -2
- package/dist/{write-tools-Ct0ZV87Z.mjs → write-tools-BvuWAzwo.mjs} +154 -14
- package/dist/write-tools-BvuWAzwo.mjs.map +1 -0
- package/package.json +2 -1
- package/dist/eve-runtime-BdolQrBF.mjs.map +0 -1
- package/dist/index-PqQNoVuw.d.mts.map +0 -1
- package/dist/token-Dt6qs_kf.mjs.map +0 -1
- package/dist/types-BAEqBfM5.d.mts.map +0 -1
- package/dist/write-tools-Ct0ZV87Z.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -198,6 +198,14 @@ result.rateLimit?.remaining
|
|
|
198
198
|
|
|
199
199
|
`resource` is `core`, `search`, or `graphql`. On HTTP 403/429 the thrown error message also includes remaining/reset.
|
|
200
200
|
|
|
201
|
+
## Errors
|
|
202
|
+
|
|
203
|
+
Classifiable failures become structured [evlog](https://evlog.dev) catalog errors with a stable `code`, a `why` (technical cause), and a `fix` (actionable remedy) — written so a model recovers instead of hallucinating. The two causes models get wrong most often are spelled out: GitHub answers 404 for private resources the token cannot see (`NOT_FOUND`), and an expired `VERCEL_OIDC_TOKEN` is caught before any request with the exact expiry time (`OIDC_TOKEN_EXPIRED`) instead of surfacing as an opaque Connect 403.
|
|
204
|
+
|
|
205
|
+
Codes: `TOKEN_REQUIRED`, `OIDC_TOKEN_EXPIRED`, `CONNECT_NOT_AUTHORIZED`, `CONNECT_USER_NOT_CONNECTED`, `CONNECT_INSTALLATION_REQUIRED`, `SUBJECT_CONTEXT_REQUIRED`, `UNAUTHORIZED` (401), `FORBIDDEN` (403), `RATE_LIMITED` (403/429), `NOT_FOUND` (404), `VALIDATION_FAILED` (422). Unmapped statuses pass through unchanged; the original Octokit error stays reachable as `cause`.
|
|
206
|
+
|
|
207
|
+
In the eve extension, a failing tool returns `{ error: { code, message, why, fix, link } }` to the model. With `generateText`/`streamText`, the framework forwards `error.message` (self-sufficient by design); use evlog's `parseError(error)` when you need the full structure. The catalog is exported as `githubToolsErrors`. See the [errors guide](https://github-tools.com/guide/errors).
|
|
208
|
+
|
|
201
209
|
## Commit Attribution
|
|
202
210
|
|
|
203
211
|
Control how commits are attributed when using `createOrUpdateFile` or `mergePullRequest`:
|
package/dist/connect/eve.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as GithubConnectorInput, t as ConnectGithubEveToolsOptions } from "../types-
|
|
1
|
+
import { a as GithubConnectorInput, t as ConnectGithubEveToolsOptions } from "../types-v39VrZ-m.mjs";
|
|
2
2
|
//#region src/connect/eve.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Register eve GitHub tools backed by a Vercel Connect connector.
|
package/dist/connect/eve.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createGithubTools } from "../eve.mjs";
|
|
2
|
-
import { t as connectGithubToken } from "../token-
|
|
2
|
+
import { t as connectGithubToken } from "../token-Iop2lapd.mjs";
|
|
3
3
|
//#region src/connect/eve.ts
|
|
4
4
|
/**
|
|
5
5
|
* Register eve GitHub tools backed by a Vercel Connect connector.
|
package/dist/connect.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as GithubConnectorInput, i as GithubConnectParams, n as ConnectGithubTokenOptions, o as resolveGithubConnector, r as ConnectGithubToolsOptions, t as ConnectGithubEveToolsOptions } from "./types-
|
|
1
|
+
import { a as GithubConnectorInput, i as GithubConnectParams, n as ConnectGithubTokenOptions, o as resolveGithubConnector, r as ConnectGithubToolsOptions, t as ConnectGithubEveToolsOptions } from "./types-v39VrZ-m.mjs";
|
|
2
2
|
import { a as GithubTokenInput, d as GithubToolPreset, h as GithubToolName, t as AllGithubTools } from "./tool-types-DbZpOYFG.mjs";
|
|
3
|
-
import "./eve-runtime-
|
|
4
|
-
import "@vercel/connect";
|
|
3
|
+
import "./eve-runtime-Bu8Gy8CS.mjs";
|
|
4
|
+
import { ConnectTokenSubject } from "@vercel/connect";
|
|
5
5
|
//#region src/connect/scopes.d.ts
|
|
6
6
|
/**
|
|
7
7
|
* Vercel Connect scope strings mapped to each {@link GithubToolPreset}.
|
|
@@ -14,10 +14,10 @@ import "@vercel/connect";
|
|
|
14
14
|
*
|
|
15
15
|
* Gist tools in `repo-explorer` and `maintainer` are intentionally left
|
|
16
16
|
* unscoped: the Gists API only accepts GitHub App *user* access tokens, never
|
|
17
|
-
* installation tokens, and Connect
|
|
18
|
-
* installation tokens. Gist calls made with
|
|
19
|
-
* regardless of requested scopes — use a
|
|
20
|
-
* account permission for those tools instead.
|
|
17
|
+
* installation tokens, and Connect mints `subject: { type: 'app' }`
|
|
18
|
+
* installation tokens by default. Gist calls made with an app-subject token
|
|
19
|
+
* 403 regardless of requested scopes — use a `{ type: 'user' }` subject or a
|
|
20
|
+
* fine-grained PAT with the "Gists" account permission for those tools instead.
|
|
21
21
|
*
|
|
22
22
|
* Notification tools in `maintainer` and `notification-inbox` are unscoped for
|
|
23
23
|
* the same reason: `notifications` is an account-level GitHub App permission
|
|
@@ -89,5 +89,5 @@ declare function connectGithubToken(connector: GithubConnectorInput, options?: C
|
|
|
89
89
|
*/
|
|
90
90
|
declare function connectGithubTools(connector: GithubConnectorInput, options?: ConnectGithubToolsOptions): AllGithubTools | Pick<AllGithubTools, "getPullRequest" | "listPullRequests" | "listPullRequestFiles" | "listPullRequestReviews" | "listPullRequestReviewThreads" | "getPullRequestContext" | "getFileContent" | "listCommits" | "getCommit" | "getBlame" | "compareCommits" | "getRepository" | "listBranches" | "searchCode" | "listCheckRuns" | "getCombinedStatus" | "updatePullRequest" | "addPullRequestComment" | "updatePullRequestComment" | "deletePullRequestComment" | "createPullRequestReview" | "replyToReviewComment" | "resolveReviewThread" | "requestReviewers" | "listIssues" | "getIssueContext" | "listIssueComments" | "createIssue" | "addIssueComment" | "updateIssueComment" | "deleteIssueComment" | "closeIssue" | "updateIssue" | "addLabels" | "removeLabel" | "createLabel" | "updateLabel" | "deleteLabel" | "addAssignees" | "removeAssignees" | "listIssueReactions" | "addIssueReaction" | "listCommentReactions" | "addCommentReaction" | "searchRepositories" | "searchIssues" | "listWorkflows" | "listWorkflowRuns" | "getWorkflowRun" | "listWorkflowJobs" | "getWorkflowJobLogs" | "getCiFailureContext" | "triggerWorkflow" | "cancelWorkflowRun" | "rerunWorkflowRun" | "getRepositoryTree" | "getIssue" | "listDiscussions" | "getDiscussion" | "listLabels" | "listGists" | "getGist" | "listGistComments" | "listReleases" | "getLatestRelease" | "getRelease" | "getReleaseContext" | "createRelease" | "updateRelease" | "deleteRelease" | "addDiscussionComment" | "listNotifications" | "markNotificationRead" | "createBranch" | "deleteBranch" | "createOrUpdateFile" | "createPullRequest" | "forkRepository" | "createRepository" | "mergePullRequest" | "createGist" | "updateGist" | "deleteGist" | "createGistComment">;
|
|
91
91
|
//#endregion
|
|
92
|
-
export { type ConnectGithubEveToolsOptions, type ConnectGithubTokenOptions, type ConnectGithubToolsOptions, type ConnectScopeSelection, type GithubConnectParams, type GithubConnectorInput, PRESET_CONNECT_SCOPES, TOOL_CONNECT_SCOPES, connectGithubScopesForPreset, connectGithubScopesForSelection, connectGithubScopesForTools, connectGithubToken, connectGithubTools, resolveGithubConnector };
|
|
92
|
+
export { type ConnectGithubEveToolsOptions, type ConnectGithubTokenOptions, type ConnectGithubToolsOptions, type ConnectScopeSelection, type ConnectTokenSubject, type GithubConnectParams, type GithubConnectorInput, PRESET_CONNECT_SCOPES, TOOL_CONNECT_SCOPES, connectGithubScopesForPreset, connectGithubScopesForSelection, connectGithubScopesForTools, connectGithubToken, connectGithubTools, resolveGithubConnector };
|
|
93
93
|
//# sourceMappingURL=connect.d.mts.map
|
package/dist/connect.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connect.d.mts","names":[],"sources":["../src/connect/scopes.ts","../src/connect/token.ts","../src/connect/tools.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;cAyBa;;;;;;;;;;;;;;;;;cAwHA,qBAAmB;;;;;iBAgBhB,6BACd,SAAS,mBAAmB;;;;;iBAcd,4BAA4B,gBAAgB;KAUhD;EACV,SAAS,mBAAmB;EAC5B,mBAAmB;EACnB,mBAAmB;;;;;;;;;;iBA6BL,gCAAgC,YAAW;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"connect.d.mts","names":[],"sources":["../src/connect/scopes.ts","../src/connect/token.ts","../src/connect/tools.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;cAyBa;;;;;;;;;;;;;;;;;cAwHA,qBAAmB;;;;;iBAgBhB,6BACd,SAAS,mBAAmB;;;;;iBAcd,4BAA4B,gBAAgB;KAUhD;EACV,SAAS,mBAAmB;EAC5B,mBAAmB;EACnB,mBAAmB;;;;;;;;;;iBA6BL,gCAAgC,YAAW;;;;;;;;;;;;iBCnM3C,mBACd,WAAW,sBACX,UAAS,4BACR;;;;;;;;;;iBCda,mBACd,WAAW,sBACX,UAAS,4BAAA,iBAA8B,KAAA"}
|
package/dist/connect.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as createGithubTools } from "./src-
|
|
2
|
-
import { a as connectGithubScopesForSelection, i as connectGithubScopesForPreset, n as PRESET_CONNECT_SCOPES, o as connectGithubScopesForTools, r as TOOL_CONNECT_SCOPES, s as resolveGithubConnector, t as connectGithubToken } from "./token-
|
|
1
|
+
import { t as createGithubTools } from "./src-C54blWpT.mjs";
|
|
2
|
+
import { a as connectGithubScopesForSelection, i as connectGithubScopesForPreset, n as PRESET_CONNECT_SCOPES, o as connectGithubScopesForTools, r as TOOL_CONNECT_SCOPES, s as resolveGithubConnector, t as connectGithubToken } from "./token-Iop2lapd.mjs";
|
|
3
3
|
//#region src/connect/tools.ts
|
|
4
4
|
/**
|
|
5
5
|
* Create GitHub tools backed by a Vercel Connect connector.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { d as GithubToolPreset, g as GithubWriteToolName, h as GithubToolName, p as PresetToolName, u as CombinedPresetToolNames } from "./tool-types-DbZpOYFG.mjs";
|
|
2
2
|
import { i as EveToolFactoryOptions, n as EveApprovalValue, r as EveGithubToolsOptions, t as EveApprovalConfig } from "./types-CCoH12WC.mjs";
|
|
3
|
-
import "./index-
|
|
3
|
+
import "./index-BOerqLIm.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { ToolDefinition, ToolModelOutput } from "eve/tools";
|
|
6
6
|
import { Approval, ApprovalPolicy } from "eve/tools/approval";
|
|
@@ -82,4 +82,4 @@ declare function resolveEveToolApproval(toolName: GithubWriteToolName, config: E
|
|
|
82
82
|
declare const MISSING_EVE_MESSAGE = "The \"eve\" package is required to use @github-tools/sdk/eve. Install it with: pnpm add eve";
|
|
83
83
|
//#endregion
|
|
84
84
|
export { resolveEveToolApproval as a, createEveGithubToolsDynamic as c, listResolvedEveToolNames as d, formatGithubEveToolOutput as f, resolveEveApproval as i, executeGithubEveTool as l, isEveApprovalDisabled as n, buildEveToolDefinition as o, hasGithubEveToolModelOutput as p, mapEveApprovalValue as r, buildEveToolMap as s, MISSING_EVE_MESSAGE as t, listEveToolDescriptors as u };
|
|
85
|
-
//# sourceMappingURL=eve-runtime-
|
|
85
|
+
//# sourceMappingURL=eve-runtime-Bu8Gy8CS.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eve-runtime-
|
|
1
|
+
{"version":3,"file":"eve-runtime-Bu8Gy8CS.d.mts","names":[],"sources":["../src/eve/registry.ts","../src/eve/build.ts","../src/eve/approval.ts","../src/eve/load-eve.ts"],"mappings":";;;;;;;;iBAoEgB,4BAA4B,MAAM;;;;;;;iBAUlC,0BAA0B,MAAM,gBAAgB,kBAAkB;;;KCrE7E,eAAe,yBAAyB;EAA0B,SAAS;;KAC3E,aAAa,QAAQ,OAAO,gBAAgB;iBA8CjC,uBACd,MAAM,gBACN,UAAS,eACR;iBAgCa,gBAAgB,UAAS,wBAA6B;iBAmCtD,4BAA4B,UAAS,4CAA0B,gBAAA,QAAA,ipDAAA;iBAY/D,yBAAyB;EAAY;EAAoB;EAAqB;IAAwB;iBACtG,yBAAyB,UAAU,kBAAkB;EAAW,QAAQ;EAAG;EAAqB;IAAwB,eAAe;iBACvI,yBAAyB,mBAAmB,oBAAoB;EAAW,QAAQ;EAAG;EAAqB;IAAwB,wBAAwB;iBAC3J,yBAAyB,SAAS,KAAK,2DAA2D;;;;;iBAUlG,uBAAuB,UAAS;;;;aAAA;;;;;;;iBA2B1B,qBACpB,MAAM,gBACN,OAAO,yBACP,UAAS,wBAA0B;;;;;;;;iBC3KrB,sBAAsB,OAAO;iBAI7B,oBAAoB,OAAO,mBAAmB;iBAY9C,mBACd,UAAU,qBACV,QAAQ,gCACP;;;;;;iBAgBa,uBACd,UAAU,qBACV,QAAQ,+BACR,WAAW,mBACV;;;;;;;;;cChCU"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ci as compareCommitsToModelOutput, Di as getRepositoryTreeToModelOutput, Ei as getPullRequestContextToModelOutput, Oi as listPullRequestFilesToModelOutput, Si as resolveGithubToken, Ti as getFileContentToModelOutput, a as isGithubWriteToolName, d as softenContextSchema, i as GITHUB_TOOL_CATALOG, r as ALL_GITHUB_TOOL_NAMES, ra as
|
|
1
|
+
import { Ci as compareCommitsToModelOutput, Di as getRepositoryTreeToModelOutput, Ei as getPullRequestContextToModelOutput, Oi as listPullRequestFilesToModelOutput, Si as resolveGithubToken, Ti as getFileContentToModelOutput, a as isGithubWriteToolName, aa as toModelErrorPayload, d as softenContextSchema, i as GITHUB_TOOL_CATALOG, oa as stripRateLimit, r as ALL_GITHUB_TOOL_NAMES, ra as EvlogError, s as resolvePresetTools, u as mergeContextArgs, wi as getCommitToModelOutput, xi as createGithubTokenResolver } from "./write-tools-BvuWAzwo.mjs";
|
|
2
2
|
import * as eveTools from "eve/tools";
|
|
3
3
|
import * as eveApproval from "eve/tools/approval";
|
|
4
4
|
//#region src/eve/load-eve.ts
|
|
@@ -148,6 +148,7 @@ async function runGithubToolStep(name, input, ctx) {
|
|
|
148
148
|
token
|
|
149
149
|
});
|
|
150
150
|
} catch (error) {
|
|
151
|
+
if (EvlogError.isEvlogError(error)) return { error: toModelErrorPayload(error) };
|
|
151
152
|
return { error: error instanceof Error ? error.message : String(error) };
|
|
152
153
|
}
|
|
153
154
|
}
|
|
@@ -272,4 +273,4 @@ async function executeGithubEveTool(name, input, options = {}) {
|
|
|
272
273
|
//#endregion
|
|
273
274
|
export { listEveToolDescriptors as a, hasGithubEveToolModelOutput as c, resolveEveApproval as d, resolveEveToolApproval as f, executeGithubEveTool as i, isEveApprovalDisabled as l, buildEveToolMap as n, listResolvedEveToolNames as o, MISSING_EVE_MESSAGE as p, createEveGithubToolsDynamic as r, formatGithubEveToolOutput as s, buildEveToolDefinition as t, mapEveApprovalValue as u };
|
|
274
275
|
|
|
275
|
-
//# sourceMappingURL=eve-runtime-
|
|
276
|
+
//# sourceMappingURL=eve-runtime-Cfyy1tzp.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eve-runtime-Cfyy1tzp.mjs","names":[],"sources":["../src/eve/load-eve.ts","../src/eve/approval.ts","../src/eve/registry.ts","../src/eve/steps.ts","../src/eve/build.ts"],"sourcesContent":["import * as eveTools from 'eve/tools'\nimport * as eveApproval from 'eve/tools/approval'\n\n/**\n * Static ESM imports so bundlers (eve/Nitro/Vercel) can resolve `eve` when it is\n * compiled into the output rather than left as `node_modules/eve` at runtime.\n * Runtime `createRequire(\"eve/tools\")` fails in those targets.\n */\nexport type EveToolsModule = typeof import('eve/tools')\nexport type EveApprovalModule = typeof import('eve/tools/approval')\n\n/**\n * @deprecated Never thrown since eve moved to static ESM imports — a missing\n * `eve` package now fails at module resolution with the bundler/runtime's own\n * error. Kept only for backward compatibility of the public export; do not\n * match on it. Will be removed in the next major.\n */\nexport const MISSING_EVE_MESSAGE =\n 'The \"eve\" package is required to use @github-tools/sdk/eve. Install it with: pnpm add eve'\n\nexport function getEveTools(): EveToolsModule {\n return eveTools\n}\n\nexport function getEveApprovalHelpers(): EveApprovalModule {\n return eveApproval\n}\n","import type { Approval, ApprovalPolicy } from 'eve/tools/approval'\nimport type { GithubWriteToolName } from '../core/write-tools'\nimport { getEveApprovalHelpers } from './load-eve'\nimport type { EveApprovalConfig, EveApprovalValue } from './types'\n\n/**\n * `false` / `'never'` should omit the tool `approval` field entirely.\n * eve treats a missing `approval` like `never()`; attaching `never()` is\n * redundant and has caused approval UI noise on some channels.\n */\nexport function isEveApprovalDisabled(value: EveApprovalValue | undefined): boolean {\n return value === false || value === 'never'\n}\n\nexport function mapEveApprovalValue(value: EveApprovalValue): ApprovalPolicy {\n if (typeof value === 'function') return value\n // Object-shaped eve `ApprovalConfiguration` — the request-time policy lives on `request`.\n if (typeof value === 'object') return value.request\n\n const { always, never, once } = getEveApprovalHelpers()\n\n if (value === true || value === 'always') return always()\n if (value === false || value === 'never') return never()\n return once()\n}\n\nexport function resolveEveApproval(\n toolName: GithubWriteToolName,\n config: EveApprovalConfig | undefined,\n): ApprovalPolicy {\n if (config === undefined) return getEveApprovalHelpers().always()\n if (config === true) return getEveApprovalHelpers().always()\n if (config === false) return getEveApprovalHelpers().never()\n\n const value = config[toolName]\n if (value === undefined) return getEveApprovalHelpers().always()\n\n return mapEveApprovalValue(value)\n}\n\n/**\n * Approval to attach on a write tool, or `undefined` to omit the field.\n * Prefer this when building `defineTool` values so `false` / `'never'` do not\n * attach a redundant `never()` handler.\n */\nexport function resolveEveToolApproval(\n toolName: GithubWriteToolName,\n config: EveApprovalConfig | undefined,\n override?: EveApprovalValue,\n): Approval | undefined {\n const value = override !== undefined\n ? override\n : typeof config === 'object' && config !== null\n ? config[toolName]\n : config\n\n if (value === undefined) return getEveApprovalHelpers().always()\n if (isEveApprovalDisabled(value)) return undefined\n // Pass policies and `ApprovalConfiguration` objects through unchanged so a\n // response-time authorizer (`response`) survives onto `defineTool`.\n if (typeof value === 'function' || typeof value === 'object') return value\n return mapEveApprovalValue(value)\n}\n","import type { ToolModelOutput } from 'eve/tools'\nimport type { z } from 'zod'\nimport type { CommitIdentity } from '../types'\nimport { GITHUB_TOOL_CATALOG, isGithubWriteToolName } from '../core/catalog'\nimport { mergeContextArgs, softenContextSchema, type GithubToolsContext } from '../core/context'\nimport {\n compareCommitsToModelOutput,\n getCommitToModelOutput,\n getFileContentToModelOutput,\n getPullRequestContextToModelOutput,\n getRepositoryTreeToModelOutput,\n listPullRequestFilesToModelOutput,\n} from '../core/model-output'\nimport { stripRateLimit } from '../core/rate-limit'\nimport { resolveGithubToken, type GithubTokenInput } from '../core/token'\nimport type { GithubWriteToolName } from '../core/write-tools'\nimport { ALL_GITHUB_TOOL_NAMES, type GithubToolName } from '../core/tool-names'\nexport type { GithubToolName } from '../core/tool-names'\nexport { ALL_GITHUB_TOOL_NAMES } from '../core/tool-names'\n\nexport type ToolBuildContext = {\n token: GithubTokenInput\n context?: GithubToolsContext\n author?: CommitIdentity\n committer?: CommitIdentity\n coAuthors?: CommitIdentity[]\n}\n\ntype ToolRegistryEntry = {\n name: GithubToolName\n writeTool?: GithubWriteToolName\n description: string\n inputSchema: z.ZodType\n execute: (args: Record<string, unknown>) => Promise<unknown>\n toModelOutput?: (output: unknown) => ToolModelOutput\n}\n\nfunction withToken<T extends Record<string, unknown>>(\n core: (args: T & { token: string }) => Promise<unknown>,\n ctx: ToolBuildContext,\n extra?: Record<string, unknown>,\n) {\n return async (input: Record<string, unknown>) =>\n core({\n token: await resolveGithubToken(ctx.token),\n ...extra,\n ...mergeContextArgs(input, ctx.context ?? {}),\n } as T & { token: string })\n}\n\nfunction modelOutputAdapter(\n fn: (options: { toolCallId: string, input: unknown, output: unknown }) => { type: 'json' | 'text', value: unknown },\n) {\n return (output: unknown) => fn({ toolCallId: '', input: {}, output }) as ToolModelOutput\n}\n\nconst GITHUB_EVE_TOOL_MODEL_OUTPUT = {\n getFileContent: modelOutputAdapter(getFileContentToModelOutput),\n getRepositoryTree: modelOutputAdapter(getRepositoryTreeToModelOutput),\n listPullRequestFiles: modelOutputAdapter(listPullRequestFilesToModelOutput),\n getPullRequestContext: modelOutputAdapter(getPullRequestContextToModelOutput),\n getCommit: modelOutputAdapter(getCommitToModelOutput),\n compareCommits: modelOutputAdapter(compareCommitsToModelOutput),\n} satisfies Partial<Record<GithubToolName, (output: unknown) => ToolModelOutput>>\n\nconst EVE_TOOL_MODEL_OUTPUTS: Partial<Record<GithubToolName, (output: unknown) => ToolModelOutput>> = GITHUB_EVE_TOOL_MODEL_OUTPUT\n\n/** Whether a GitHub tool has a built-in eve `toModelOutput` projection. */\nexport function hasGithubEveToolModelOutput(name: GithubToolName): boolean {\n return Object.hasOwn(GITHUB_EVE_TOOL_MODEL_OUTPUT, name)\n}\n\n/**\n * Apply the built-in eve `toModelOutput` projection for a tool.\n * Strips `rateLimit` so it never reaches the model. Tools without a dedicated\n * formatter get `{ type: 'json', value }` of the remaining payload.\n * Used by `@github-tools/eve-extension` so the callback only closes over a serializable tool name.\n */\nexport function formatGithubEveToolOutput(name: GithubToolName, output: unknown): ToolModelOutput {\n const stripped = stripRateLimit(output)\n // `runGithubToolStep` returns `{ error }` when execute throws. The per-tool\n // formatters assume the success shape (e.g. `listPullRequestFilesToModelOutput`\n // calls `.map` on the payload), so dispatching an error payload would throw a\n // second time inside model-output formatting and re-break the tool loop.\n if (isErrorPayload(stripped)) {\n return { type: 'json', value: stripped }\n }\n const format = GITHUB_EVE_TOOL_MODEL_OUTPUT[name as keyof typeof GITHUB_EVE_TOOL_MODEL_OUTPUT]\n if (!format) {\n return { type: 'json', value: stripped }\n }\n return format(stripped)\n}\n\nfunction isErrorPayload(output: unknown): output is { error: string } {\n return (\n output != null\n && typeof output === 'object'\n && !Array.isArray(output)\n && typeof (output as { error?: unknown }).error === 'string'\n )\n}\n\nexport function createToolRegistry(ctx: ToolBuildContext): ToolRegistryEntry[] {\n // Commit-identity options are session-level, not model inputs, so they ride\n // alongside the token instead of living in the tool's input schema.\n const commitExtras: Partial<Record<GithubToolName, Record<string, unknown>>> = {\n createOrUpdateFile: { author: ctx.author, committer: ctx.committer, coAuthors: ctx.coAuthors },\n mergePullRequest: { coAuthors: ctx.coAuthors },\n }\n\n const entries = ALL_GITHUB_TOOL_NAMES.map((name): ToolRegistryEntry => {\n const descriptor = GITHUB_TOOL_CATALOG[name]\n // Argument types vary per tool; `withToken` re-narrows at the dispatch boundary.\n const core = descriptor.core as (args: Record<string, unknown> & { token: string }) => Promise<unknown>\n const toModelOutput = EVE_TOOL_MODEL_OUTPUTS[name]\n return {\n name,\n ...(isGithubWriteToolName(name) && { writeTool: name }),\n description: descriptor.description,\n inputSchema: descriptor.inputSchema,\n execute: withToken(core, ctx, commitExtras[name]),\n ...(toModelOutput && { toModelOutput }),\n }\n })\n\n if (!ctx.context) return entries\n\n return entries.map(entry => ({\n ...entry,\n inputSchema: softenContextSchema(entry.inputSchema, ctx.context!),\n }))\n}\n","import { EvlogError, toModelErrorPayload } from '../core/errors'\nimport { resolveGithubToken } from '../core/token'\nimport { createToolRegistry, type GithubToolName, type ToolBuildContext } from './registry'\n\nasync function executeGithubToolStep(\n name: GithubToolName,\n input: Record<string, unknown>,\n ctx: ToolBuildContext,\n) {\n 'use step'\n const entry = createToolRegistry(ctx).find(tool => tool.name === name)\n if (!entry) {\n throw new Error(`Unknown GitHub tool: ${name}`)\n }\n return entry.execute(input)\n}\n\nexport async function runGithubToolStep(\n name: GithubToolName,\n input: Record<string, unknown>,\n ctx: ToolBuildContext,\n) {\n try {\n // Resolve the token before entering the step so only a serializable string crosses the boundary.\n const token = await resolveGithubToken(ctx.token)\n return await executeGithubToolStep(name, input, { ...ctx, token })\n } catch (error) {\n // Eve's tool-loop logs thrown execute errors but does not always append a\n // tool_result. Returning a payload keeps the Anthropic tool_use/tool_result pairing intact.\n // Catalog errors keep their { code, why, fix, link } structure so the model can recover.\n if (EvlogError.isEvlogError(error)) {\n return { error: toModelErrorPayload(error) }\n }\n return { error: error instanceof Error ? error.message : String(error) }\n }\n}\n","import type { ToolDefinition } from 'eve/tools'\nimport { resolvePresetTools, type CombinedPresetToolNames, type GithubToolPreset, type PresetToolName } from '../core/presets'\nimport { createGithubTokenResolver } from '../core/token'\nimport { isEveApprovalDisabled, mapEveApprovalValue, resolveEveToolApproval } from './approval'\nimport { getEveTools } from './load-eve'\nimport { ALL_GITHUB_TOOL_NAMES, createToolRegistry, formatGithubEveToolOutput, hasGithubEveToolModelOutput, type GithubToolName, type ToolBuildContext } from './registry'\nimport { runGithubToolStep } from './steps'\nimport type { EveGithubToolsOptions, EveToolFactoryOptions, EveToolOverrides } from './types'\n\ntype BuildOptions = EveGithubToolsOptions | (EveToolFactoryOptions & { preset?: EveGithubToolsOptions['preset'] })\ntype EveToolMap = Partial<Record<GithubToolName, ToolDefinition>>\n\nfunction resolveAllowedToolNames(\n options: Pick<EveGithubToolsOptions, 'preset' | 'include' | 'exclude'>,\n): (name: GithubToolName) => boolean {\n const presetAllowed = options.preset ? resolvePresetTools(options.preset) : null\n const includeAllowed = options.include ? new Set(options.include) : null\n const excluded = options.exclude ? new Set(options.exclude) : null\n\n // `preset` and `include` compose as a union (add tools a preset is missing);\n // `exclude` always subtracts from that combined set afterward.\n const allowed = presetAllowed && includeAllowed\n ? new Set([...presetAllowed, ...includeAllowed])\n : presetAllowed ?? includeAllowed\n\n return name => (!allowed || allowed.has(name)) && !excluded?.has(name)\n}\n\nfunction applyOverrides<T extends ToolDefinition>(\n tool: T,\n name: GithubToolName,\n overrides?: EveToolOverrides,\n): T {\n const override = overrides?.[name]\n if (!override) return tool\n\n const next: T = {\n ...tool,\n ...override.description !== undefined && { description: override.description },\n ...override.toModelOutput !== undefined && { toModelOutput: override.toModelOutput },\n ...override.outputSchema !== undefined && { outputSchema: override.outputSchema },\n }\n\n if (override.approval === undefined) return next\n if (isEveApprovalDisabled(override.approval)) {\n const rest = { ...next }\n delete (rest as { approval?: unknown }).approval\n return rest\n }\n // Preserve policies and `ApprovalConfiguration` objects as-is; only literals need mapping.\n const approval = typeof override.approval === 'function' || typeof override.approval === 'object'\n ? override.approval\n : mapEveApprovalValue(override.approval)\n return { ...next, approval }\n}\n\nexport function buildEveToolDefinition(\n name: GithubToolName,\n options: BuildOptions = {},\n): ToolDefinition {\n const { defineTool } = getEveTools()\n const ctx: ToolBuildContext = {\n token: createGithubTokenResolver(options.token),\n context: options.context,\n author: options.author,\n committer: options.committer,\n coAuthors: options.coAuthors,\n }\n\n const entry = createToolRegistry(ctx).find(tool => tool.name === name)\n if (!entry) {\n throw new Error(`Unknown GitHub tool: ${name}`)\n }\n\n const approval = entry.writeTool\n ? resolveEveToolApproval(entry.writeTool, options.requireApproval)\n : undefined\n\n // Annotated so defineTool resolves to its ToolDefinition overload — inference\n // from the bare literal picks the background-tool overload on eve 0.45+.\n const definition: ToolDefinition = {\n description: entry.description,\n inputSchema: entry.inputSchema,\n ...(approval && { approval }),\n toModelOutput: (output: unknown) => formatGithubEveToolOutput(name, output),\n execute: async (input) => runGithubToolStep(name, input as Record<string, unknown>, ctx),\n }\n\n return applyOverrides(defineTool(definition), name, options.overrides)\n}\n\nexport function buildEveToolMap(options: EveGithubToolsOptions = {}): EveToolMap {\n const { defineTool } = getEveTools()\n const ctx: ToolBuildContext = {\n token: createGithubTokenResolver(options.token),\n context: options.context,\n author: options.author,\n committer: options.committer,\n coAuthors: options.coAuthors,\n }\n\n const isAllowed = resolveAllowedToolNames(options)\n const registry = createToolRegistry(ctx)\n const tools = {} as EveToolMap\n\n for (const entry of registry) {\n if (!isAllowed(entry.name)) continue\n\n const approval = entry.writeTool\n ? resolveEveToolApproval(entry.writeTool, options.requireApproval)\n : undefined\n\n const definition: ToolDefinition = {\n description: entry.description,\n inputSchema: entry.inputSchema,\n ...(approval && { approval }),\n toModelOutput: (output: unknown) => formatGithubEveToolOutput(entry.name, output),\n execute: async (input) => runGithubToolStep(entry.name, input as Record<string, unknown>, ctx),\n }\n\n tools[entry.name] = applyOverrides(defineTool(definition), entry.name, options.overrides)\n }\n\n return tools\n}\n\nexport function createEveGithubToolsDynamic(options: EveGithubToolsOptions = {}) {\n const { defineDynamic } = getEveTools()\n\n // TODO(eve-auth): resolve token from ctx.getToken('github') when eve-managed auth lands.\n // Deferred — eve does not yet expose managed GitHub tokens on the session context.\n return defineDynamic({\n events: {\n 'step.started': async () => buildEveToolMap(options),\n },\n })\n}\n\nexport function listResolvedEveToolNames(options?: { preset?: undefined, include?: undefined, exclude?: undefined }): GithubToolName[]\nexport function listResolvedEveToolNames<P extends GithubToolPreset>(options: { preset: P, include?: undefined, exclude?: undefined }): PresetToolName<P>[]\nexport function listResolvedEveToolNames<P extends readonly GithubToolPreset[]>(options: { preset: P, include?: undefined, exclude?: undefined }): CombinedPresetToolNames<P>[]\nexport function listResolvedEveToolNames(options: Pick<EveGithubToolsOptions, 'preset' | 'include' | 'exclude'>): GithubToolName[]\nexport function listResolvedEveToolNames(options: Pick<EveGithubToolsOptions, 'preset' | 'include' | 'exclude'> = {}): GithubToolName[] {\n const isAllowed = resolveAllowedToolNames(options)\n return ALL_GITHUB_TOOL_NAMES.filter(isAllowed)\n}\n\n/**\n * Tool descriptors (no `execute`) for authored eve `defineTool` loops.\n * Prefer this when registering tools outside the SDK package so durable transforms can hoist inline execute.\n */\nexport function listEveToolDescriptors(options: EveGithubToolsOptions = {}) {\n const ctx: ToolBuildContext = {\n token: createGithubTokenResolver(options.token),\n context: options.context,\n author: options.author,\n committer: options.committer,\n coAuthors: options.coAuthors,\n }\n\n const isAllowed = resolveAllowedToolNames(options)\n return createToolRegistry(ctx)\n .filter(entry => isAllowed(entry.name))\n .map(entry => ({\n name: entry.name,\n description: entry.description,\n inputSchema: entry.inputSchema,\n writeTool: entry.writeTool,\n toModelOutput: entry.toModelOutput,\n }))\n}\n\nexport { formatGithubEveToolOutput, hasGithubEveToolModelOutput }\n\n/**\n * Execute a GitHub tool by name with the given eve options (token/context/attribution).\n * Used by `@github-tools/eve-extension` so `execute` only closes over a serializable tool name.\n */\nexport async function executeGithubEveTool(\n name: GithubToolName,\n input: Record<string, unknown>,\n options: EveGithubToolsOptions = {},\n) {\n const ctx: ToolBuildContext = {\n token: createGithubTokenResolver(options.token),\n context: options.context,\n author: options.author,\n committer: options.committer,\n coAuthors: options.coAuthors,\n }\n return runGithubToolStep(name, input, ctx)\n}\n"],"mappings":";;;;;;;;;;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wBAAwB,OAAO;CACjD,OAAO,mBAAmB,GAAG,CAAC,CAC3B,QAAO,UAAS,UAAU,MAAM,IAAI,CAAC,CAAC,CACtC,KAAI,WAAU;EACb,MAAM,MAAM;EACZ,aAAa,MAAM;EACnB,aAAa,MAAM;EACnB,WAAW,MAAM;EACjB,eAAe,MAAM;CACvB,EAAE;AACN;;;;;AAQA,eAAsB,qBACpB,MACA,OACA,UAAiC,CAAC,GAClC;CAQA,OAAO,kBAAkB,MAAM,OAAO;EANpC,OAAO,0BAA0B,QAAQ,KAAK;EAC9C,SAAS,QAAQ;EACjB,QAAQ,QAAQ;EAChB,WAAW,QAAQ;EACnB,WAAW,QAAQ;CAEiB,CAAG;AAC3C"}
|
package/dist/eve-runtime.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as CommitIdentity, d as GithubToolPreset, f as PRESET_TOOLS, g as GithubWriteToolName, h as GithubToolName, i as PickGithubTools, l as GITHUB_WRITE_TOOLS, m as GITHUB_TOOL_NAMES, p as PresetToolName, r as GithubToolsForPreset, t as AllGithubTools, u as CombinedPresetToolNames } from "./tool-types-DbZpOYFG.mjs";
|
|
1
|
+
import { _ as CommitIdentity, d as GithubToolPreset, f as PRESET_TOOLS, g as GithubWriteToolName, h as GithubToolName, i as PickGithubTools, l as GITHUB_WRITE_TOOLS, m as GITHUB_TOOL_NAMES, o as resolveGithubToken, p as PresetToolName, r as GithubToolsForPreset, t as AllGithubTools, u as CombinedPresetToolNames } from "./tool-types-DbZpOYFG.mjs";
|
|
2
2
|
import { a as EveToolOverrides, i as EveToolFactoryOptions, n as EveApprovalValue, r as EveGithubToolsOptions, t as EveApprovalConfig } from "./types-CCoH12WC.mjs";
|
|
3
|
-
import { o as GithubRateLimit } from "./index-
|
|
4
|
-
import { a as resolveEveToolApproval, c as createEveGithubToolsDynamic, d as listResolvedEveToolNames, f as formatGithubEveToolOutput, i as resolveEveApproval, l as executeGithubEveTool, n as isEveApprovalDisabled, o as buildEveToolDefinition, p as hasGithubEveToolModelOutput, r as mapEveApprovalValue, s as buildEveToolMap, t as MISSING_EVE_MESSAGE, u as listEveToolDescriptors } from "./eve-runtime-
|
|
5
|
-
export { type AllGithubTools, type CombinedPresetToolNames, type CommitIdentity, type EveApprovalConfig, type EveApprovalValue, type EveGithubToolsOptions, type EveToolFactoryOptions, type EveToolOverrides, GITHUB_TOOL_NAMES, GITHUB_WRITE_TOOLS, type GithubRateLimit, type GithubToolName, type GithubToolPreset, type GithubToolsForPreset, type GithubWriteToolName, MISSING_EVE_MESSAGE, PRESET_TOOLS, type PickGithubTools, type PresetToolName, buildEveToolDefinition, buildEveToolMap, createEveGithubToolsDynamic, executeGithubEveTool, formatGithubEveToolOutput, hasGithubEveToolModelOutput, isEveApprovalDisabled, listEveToolDescriptors, listResolvedEveToolNames, mapEveApprovalValue, resolveEveApproval, resolveEveToolApproval };
|
|
3
|
+
import { o as githubToolsErrors, s as GithubRateLimit } from "./index-BOerqLIm.mjs";
|
|
4
|
+
import { a as resolveEveToolApproval, c as createEveGithubToolsDynamic, d as listResolvedEveToolNames, f as formatGithubEveToolOutput, i as resolveEveApproval, l as executeGithubEveTool, n as isEveApprovalDisabled, o as buildEveToolDefinition, p as hasGithubEveToolModelOutput, r as mapEveApprovalValue, s as buildEveToolMap, t as MISSING_EVE_MESSAGE, u as listEveToolDescriptors } from "./eve-runtime-Bu8Gy8CS.mjs";
|
|
5
|
+
export { type AllGithubTools, type CombinedPresetToolNames, type CommitIdentity, type EveApprovalConfig, type EveApprovalValue, type EveGithubToolsOptions, type EveToolFactoryOptions, type EveToolOverrides, GITHUB_TOOL_NAMES, GITHUB_WRITE_TOOLS, type GithubRateLimit, type GithubToolName, type GithubToolPreset, type GithubToolsForPreset, type GithubWriteToolName, MISSING_EVE_MESSAGE, PRESET_TOOLS, type PickGithubTools, type PresetToolName, buildEveToolDefinition, buildEveToolMap, createEveGithubToolsDynamic, executeGithubEveTool, formatGithubEveToolOutput, githubToolsErrors, hasGithubEveToolModelOutput, isEveApprovalDisabled, listEveToolDescriptors, listResolvedEveToolNames, mapEveApprovalValue, resolveEveApproval, resolveEveToolApproval, resolveGithubToken };
|
package/dist/eve-runtime.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as GITHUB_TOOL_NAMES, o as PRESET_TOOLS, t as GITHUB_WRITE_TOOLS } from "./write-tools-
|
|
2
|
-
import { a as listEveToolDescriptors, c as hasGithubEveToolModelOutput, d as resolveEveApproval, f as resolveEveToolApproval, i as executeGithubEveTool, l as isEveApprovalDisabled, n as buildEveToolMap, o as listResolvedEveToolNames, p as MISSING_EVE_MESSAGE, r as createEveGithubToolsDynamic, s as formatGithubEveToolOutput, t as buildEveToolDefinition, u as mapEveApprovalValue } from "./eve-runtime-
|
|
3
|
-
export { GITHUB_TOOL_NAMES, GITHUB_WRITE_TOOLS, MISSING_EVE_MESSAGE, PRESET_TOOLS, buildEveToolDefinition, buildEveToolMap, createEveGithubToolsDynamic, executeGithubEveTool, formatGithubEveToolOutput, hasGithubEveToolModelOutput, isEveApprovalDisabled, listEveToolDescriptors, listResolvedEveToolNames, mapEveApprovalValue, resolveEveApproval, resolveEveToolApproval };
|
|
1
|
+
import { Si as resolveGithubToken, ia as githubToolsErrors, n as GITHUB_TOOL_NAMES, o as PRESET_TOOLS, t as GITHUB_WRITE_TOOLS } from "./write-tools-BvuWAzwo.mjs";
|
|
2
|
+
import { a as listEveToolDescriptors, c as hasGithubEveToolModelOutput, d as resolveEveApproval, f as resolveEveToolApproval, i as executeGithubEveTool, l as isEveApprovalDisabled, n as buildEveToolMap, o as listResolvedEveToolNames, p as MISSING_EVE_MESSAGE, r as createEveGithubToolsDynamic, s as formatGithubEveToolOutput, t as buildEveToolDefinition, u as mapEveApprovalValue } from "./eve-runtime-Cfyy1tzp.mjs";
|
|
3
|
+
export { GITHUB_TOOL_NAMES, GITHUB_WRITE_TOOLS, MISSING_EVE_MESSAGE, PRESET_TOOLS, buildEveToolDefinition, buildEveToolMap, createEveGithubToolsDynamic, executeGithubEveTool, formatGithubEveToolOutput, githubToolsErrors, hasGithubEveToolModelOutput, isEveApprovalDisabled, listEveToolDescriptors, listResolvedEveToolNames, mapEveApprovalValue, resolveEveApproval, resolveEveToolApproval, resolveGithubToken };
|
package/dist/eve.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { _ as CommitIdentity, d as GithubToolPreset, f as PRESET_TOOLS, g as GithubWriteToolName, h as GithubToolName, i as PickGithubTools, l as GITHUB_WRITE_TOOLS, m as GITHUB_TOOL_NAMES, p as PresetToolName, r as GithubToolsForPreset, t as AllGithubTools, u as CombinedPresetToolNames } from "./tool-types-DbZpOYFG.mjs";
|
|
2
2
|
import { a as EveToolOverrides, i as EveToolFactoryOptions, n as EveApprovalValue, r as EveGithubToolsOptions, t as EveApprovalConfig } from "./types-CCoH12WC.mjs";
|
|
3
|
-
import { a as resolveEveToolApproval, c as createEveGithubToolsDynamic, d as listResolvedEveToolNames, i as resolveEveApproval, l as executeGithubEveTool, n as isEveApprovalDisabled, o as buildEveToolDefinition, r as mapEveApprovalValue, s as buildEveToolMap, t as MISSING_EVE_MESSAGE, u as listEveToolDescriptors } from "./eve-runtime-
|
|
3
|
+
import { a as resolveEveToolApproval, c as createEveGithubToolsDynamic, d as listResolvedEveToolNames, i as resolveEveApproval, l as executeGithubEveTool, n as isEveApprovalDisabled, o as buildEveToolDefinition, r as mapEveApprovalValue, s as buildEveToolMap, t as MISSING_EVE_MESSAGE, u as listEveToolDescriptors } from "./eve-runtime-Bu8Gy8CS.mjs";
|
|
4
4
|
//#region src/eve.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Register all GitHub tools (or a preset subset) as eve dynamic capabilities.
|
package/dist/eve.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as GITHUB_TOOL_NAMES, o as PRESET_TOOLS, t as GITHUB_WRITE_TOOLS } from "./write-tools-
|
|
2
|
-
import { a as listEveToolDescriptors, d as resolveEveApproval, f as resolveEveToolApproval, i as executeGithubEveTool, l as isEveApprovalDisabled, n as buildEveToolMap, o as listResolvedEveToolNames, p as MISSING_EVE_MESSAGE, r as createEveGithubToolsDynamic, t as buildEveToolDefinition, u as mapEveApprovalValue } from "./eve-runtime-
|
|
1
|
+
import { n as GITHUB_TOOL_NAMES, o as PRESET_TOOLS, t as GITHUB_WRITE_TOOLS } from "./write-tools-BvuWAzwo.mjs";
|
|
2
|
+
import { a as listEveToolDescriptors, d as resolveEveApproval, f as resolveEveToolApproval, i as executeGithubEveTool, l as isEveApprovalDisabled, n as buildEveToolMap, o as listResolvedEveToolNames, p as MISSING_EVE_MESSAGE, r as createEveGithubToolsDynamic, t as buildEveToolDefinition, u as mapEveApprovalValue } from "./eve-runtime-Cfyy1tzp.mjs";
|
|
3
3
|
//#region src/eve.ts
|
|
4
4
|
/**
|
|
5
5
|
* Legacy eve registration for `agent/tools/` (direct import).
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { _ as CommitIdentity, a as GithubTokenInput, d as GithubToolPreset, h as GithubToolName, n as GithubToolsBaseOptions, p as PresetToolName, t as AllGithubTools, u as CombinedPresetToolNames, v as CommitToolOptions, x as ToolOptions, y as GithubTool } from "./tool-types-DbZpOYFG.mjs";
|
|
2
2
|
import { ToolLoopAgent, ToolLoopAgentSettings, ToolSet } from "ai";
|
|
3
3
|
import { Octokit } from "octokit";
|
|
4
|
+
import "evlog";
|
|
4
5
|
//#region src/client.d.ts
|
|
5
6
|
declare function createOctokit(token: string): Octokit;
|
|
6
7
|
//#endregion
|
|
@@ -214,6 +215,117 @@ type GithubRateLimit = {
|
|
|
214
215
|
retryAfter?: number;
|
|
215
216
|
};
|
|
216
217
|
//#endregion
|
|
218
|
+
//#region src/core/errors.d.ts
|
|
219
|
+
/**
|
|
220
|
+
* Structured error catalog for every failure the SDK can surface to a model
|
|
221
|
+
* or a consumer. Each entry carries `why` (technical cause) and `fix`
|
|
222
|
+
* (actionable remedy) so agents can recover instead of guessing — a bare
|
|
223
|
+
* "Not authorized" reads as "the repo is private" to a model; the catalog
|
|
224
|
+
* version names the real cause.
|
|
225
|
+
*/
|
|
226
|
+
declare const githubToolsErrors: import("evlog").ErrorCatalog<"github_tools", {
|
|
227
|
+
readonly TOKEN_REQUIRED: {
|
|
228
|
+
readonly status: 401;
|
|
229
|
+
readonly message: "GitHub token is required. Pass it as `token` or set the GITHUB_TOKEN environment variable.";
|
|
230
|
+
readonly why: "No token string, async token provider, or GITHUB_TOKEN environment variable was available when the tool resolved its GitHub credentials.";
|
|
231
|
+
readonly fix: "Pass `token` (a PAT string or async provider) when creating the tools, set GITHUB_TOKEN, or configure a Vercel Connect `connector`.";
|
|
232
|
+
readonly link: "https://github-tools.com/guide/tokens-and-auth";
|
|
233
|
+
};
|
|
234
|
+
readonly OIDC_TOKEN_EXPIRED: {
|
|
235
|
+
readonly status: 401;
|
|
236
|
+
readonly message: ({ expiredAt }: {
|
|
237
|
+
expiredAt: string;
|
|
238
|
+
}) => string;
|
|
239
|
+
readonly why: "The SDK pins the VERCEL_OIDC_TOKEN environment token when it is set (skipping @vercel/oidc's project-root walk, which fails inside eve/workflow snapshots), so an expired env token is never refreshed automatically.";
|
|
240
|
+
readonly fix: "Locally: run `vercel env pull` to refresh .env.local. On Vercel: deployments inject a fresh token — check nothing overrides VERCEL_OIDC_TOKEN with a stale value.";
|
|
241
|
+
readonly link: "https://github-tools.com/guide/vercel-connect#eve-agent";
|
|
242
|
+
};
|
|
243
|
+
readonly CONNECT_NOT_AUTHORIZED: {
|
|
244
|
+
readonly status: 403;
|
|
245
|
+
readonly message: ({ detail }: {
|
|
246
|
+
detail: string;
|
|
247
|
+
}) => string;
|
|
248
|
+
readonly why: "Connect rejected the identity of the calling process (the Vercel OIDC token), not the GitHub permissions — the request never reached GitHub.";
|
|
249
|
+
readonly fix: "Refresh the OIDC token (`vercel env pull` locally) and check the connector is linked to the Vercel project this code runs in.";
|
|
250
|
+
readonly link: "https://github-tools.com/guide/vercel-connect#setup-checklist";
|
|
251
|
+
};
|
|
252
|
+
readonly CONNECT_USER_NOT_CONNECTED: {
|
|
253
|
+
readonly status: 401;
|
|
254
|
+
readonly message: ({ subjectId }: {
|
|
255
|
+
subjectId: string;
|
|
256
|
+
}) => string;
|
|
257
|
+
readonly why: "The Connect token was requested with a user subject, but that user has not connected their GitHub account to this connector (or revoked the authorization).";
|
|
258
|
+
readonly fix: "Have the user connect their GitHub account (e.g. from the integrations panel), then retry.";
|
|
259
|
+
readonly link: "https://github-tools.com/guide/vercel-connect#per-user-tokens";
|
|
260
|
+
};
|
|
261
|
+
readonly CONNECT_INSTALLATION_REQUIRED: {
|
|
262
|
+
readonly status: 401;
|
|
263
|
+
readonly message: ({ detail }: {
|
|
264
|
+
detail: string;
|
|
265
|
+
}) => string;
|
|
266
|
+
readonly why: "The connector exists but its GitHub App is not installed on the target org or user account.";
|
|
267
|
+
readonly fix: "Install the connector's GitHub App on the org or account the agent needs, from the Vercel Connect dashboard.";
|
|
268
|
+
readonly link: "https://github-tools.com/guide/vercel-connect#create-a-github-connector";
|
|
269
|
+
};
|
|
270
|
+
readonly SUBJECT_CONTEXT_REQUIRED: {
|
|
271
|
+
readonly status: 500;
|
|
272
|
+
readonly message: "connect.subject resolver needs the tool execution context — it is only available while a tool call executes.";
|
|
273
|
+
readonly why: "The per-caller subject resolver was invoked without an eve ToolContext, which only exists during tool execution.";
|
|
274
|
+
readonly fix: "Keep `connect.subject` resolution on the tool execute path; use a static subject when no execution context is available.";
|
|
275
|
+
readonly link: "https://github-tools.com/frameworks/eve-extension#per-user-tokens";
|
|
276
|
+
};
|
|
277
|
+
readonly UNAUTHORIZED: {
|
|
278
|
+
readonly status: 401;
|
|
279
|
+
readonly message: ({ detail }: {
|
|
280
|
+
detail: string;
|
|
281
|
+
}) => string;
|
|
282
|
+
readonly why: "The GitHub token is invalid, expired, or revoked.";
|
|
283
|
+
readonly fix: "Rotate the credential: regenerate the PAT or re-mint the installation token, then update the token source.";
|
|
284
|
+
readonly link: "https://docs.github.com/en/rest/using-the-rest-api/troubleshooting-the-rest-api";
|
|
285
|
+
};
|
|
286
|
+
readonly FORBIDDEN: {
|
|
287
|
+
readonly status: 403;
|
|
288
|
+
readonly message: ({ detail }: {
|
|
289
|
+
detail: string;
|
|
290
|
+
}) => string;
|
|
291
|
+
readonly why: "The token authenticated but lacks permission: a missing scope on this resource, SAML SSO enforcement, or an API that only accepts user access tokens (gists, notifications) called with an installation token.";
|
|
292
|
+
readonly fix: "Grant the missing permission on the PAT or GitHub App installation; authorize the token for SAML if the org enforces it; use a user access token for gist and notification tools.";
|
|
293
|
+
readonly link: "https://github-tools.com/guide/tokens-and-auth#map-permissions-to-presets";
|
|
294
|
+
};
|
|
295
|
+
readonly RATE_LIMITED: {
|
|
296
|
+
readonly status: 429;
|
|
297
|
+
readonly message: ({ detail }: {
|
|
298
|
+
detail: string;
|
|
299
|
+
}) => string;
|
|
300
|
+
readonly why: "The token used up its GitHub API rate limit for this resource.";
|
|
301
|
+
readonly fix: "Stop calling this tool and retry after the reset timestamp in the message; batch reads or narrow the query to spend fewer requests.";
|
|
302
|
+
readonly link: "https://docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api";
|
|
303
|
+
};
|
|
304
|
+
readonly NOT_FOUND: {
|
|
305
|
+
readonly status: 404;
|
|
306
|
+
readonly message: ({ detail }: {
|
|
307
|
+
detail: string;
|
|
308
|
+
}) => string;
|
|
309
|
+
readonly why: "Either the resource does not exist, or the token cannot see it — GitHub deliberately returns 404 instead of 403 for private resources the token has no access to.";
|
|
310
|
+
readonly fix: "Check the owner/repo/number input first. If it is correct, the token lacks access: grant the repository to the PAT or App installation, or use a Connect subject that has access.";
|
|
311
|
+
readonly link: "https://docs.github.com/en/rest/using-the-rest-api/troubleshooting-the-rest-api#404-not-found-for-an-existing-resource";
|
|
312
|
+
};
|
|
313
|
+
readonly VALIDATION_FAILED: {
|
|
314
|
+
readonly status: 422;
|
|
315
|
+
readonly message: ({ detail }: {
|
|
316
|
+
detail: string;
|
|
317
|
+
}) => string;
|
|
318
|
+
readonly why: "The input was well-formed but GitHub refused it — a duplicate resource, an immutable state transition, or an unresolvable ref.";
|
|
319
|
+
readonly fix: "The embedded GitHub message names the offending field or state; adjust the input and retry.";
|
|
320
|
+
readonly link: "https://docs.github.com/en/rest/using-the-rest-api/troubleshooting-the-rest-api#validation-failed";
|
|
321
|
+
};
|
|
322
|
+
}>;
|
|
323
|
+
declare module 'evlog' {
|
|
324
|
+
interface RegisteredErrorCatalogs {
|
|
325
|
+
github_tools: typeof githubToolsErrors;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
//#endregion
|
|
217
329
|
//#region src/agents.d.ts
|
|
218
330
|
type AgentOptions = Omit<ToolLoopAgentSettings<ToolSet>, 'model' | 'tools' | 'instructions'>;
|
|
219
331
|
type CreateGithubAgentOptions = AgentOptions & GithubToolsBaseOptions & {
|
|
@@ -283,5 +395,5 @@ declare function createGithubTools<P extends readonly GithubToolPreset[]>(option
|
|
|
283
395
|
declare function createGithubTools(options?: GithubToolsOptions): AllGithubTools | Pick<AllGithubTools, GithubToolName>;
|
|
284
396
|
type GithubTools = AllGithubTools & ToolSet;
|
|
285
397
|
//#endregion
|
|
286
|
-
export {
|
|
287
|
-
//# sourceMappingURL=index-
|
|
398
|
+
export { addLabels as $, deleteGist as A, createOrUpdateFile as At, searchIssues as B, listWorkflowJobs as C, mergePullRequest as Ct, triggerWorkflow as D, updatePullRequest as Dt, rerunWorkflowRun as E, resolveReviewThread as Et, compareCommits as F, getRepository as Ft, getDiscussion as G, listNotifications as H, getBlame as I, getRepositoryTree as It, addIssueReaction as J, listDiscussions as K, getCommit as L, listBranches as Lt, listGistComments as M, deleteBranch as Mt, listGists as N, forkRepository as Nt, createGist as O, updatePullRequestComment as Ot, updateGist as P, getFileContent as Pt, addIssueComment as Q, listCommits as R, createOctokit as Rt, getWorkflowRun as S, listPullRequests as St, listWorkflows as T, requestReviewers as Tt, markNotificationRead as U, searchRepositories as V, addDiscussionComment as W, listIssueReactions as X, listCommentReactions as Y, addAssignees as Z, updateRelease as _, deletePullRequestComment as _t, createGithubAgent as a, getIssue as at, cancelWorkflowRun as b, listPullRequestReviewThreads as bt, getCiFailureContext as c, listLabels as ct, getReleaseContext as d, updateIssue as dt, closeIssue as et, createRelease as f, updateIssueComment as ft, listReleases as g, createPullRequestReview as gt, getRelease as h, createPullRequest as ht, CreateGithubAgentOptions as i, deleteLabel as it, getGist as j, createRepository as jt, createGistComment as k, createBranch as kt, getIssueContext as l, removeAssignees as lt, getLatestRelease as m, addPullRequestComment as mt, GithubToolsOptions as n, createLabel as nt, githubToolsErrors as o, listIssueComments as ot, deleteRelease as p, updateLabel as pt, addCommentReaction as q, createGithubTools as r, deleteIssueComment as rt, GithubRateLimit as s, listIssues as st, GithubTools as t, createIssue as tt, getPullRequestContext as u, removeLabel as ut, getCombinedStatus as v, getPullRequest as vt, listWorkflowRuns as w, replyToReviewComment as wt, getWorkflowJobLogs as x, listPullRequestReviews as xt, listCheckRuns as y, listPullRequestFiles as yt, searchCode as z };
|
|
399
|
+
//# sourceMappingURL=index-BOerqLIm.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-BOerqLIm.d.mts","names":[],"sources":["../src/client.ts","../src/tools/repository.ts","../src/tools/pull-requests.ts","../src/tools/issues.ts","../src/tools/reactions.ts","../src/tools/discussions.ts","../src/tools/notifications.ts","../src/tools/search.ts","../src/tools/commits.ts","../src/tools/gists.ts","../src/tools/workflows.ts","../src/tools/checks.ts","../src/tools/releases.ts","../src/tools/bundles.ts","../src/core/rate-limit.ts","../src/core/errors.ts","../src/agents.ts","../src/index.ts"],"mappings":";;;;;iBAiBgB,cAAc,gBAAgB;;;;cC0BjC,gBAAiB,OAAO,qBAAmB;;cAa3C,eAAgB,OAAO,qBAAmB;;cAa1C,iBAAkB,OAAO,qBAAmB;;cAc5C,oBAAqB,OAAO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iBAGc,kBAAkB,SAAS;EAA6B;IAAuB,qBAAqB;iBACpG,kBAAkB,UAAU,kBAC1C,SAAS;EAA6B,QAAQ;IAC7C,qBAAqB,KAAK,gBAAgB,eAAe;iBAC5C,kBAAkB,mBAAmB,oBACnD,SAAS;EAA6B,QAAQ;IAC7C,qBAAqB,KAAK,gBAAgB,wBAAwB;;;KC7JzD,qBAAqB;;;;;;;;;;;;;;;;;;;EAmB/B,SAAS,mBAAmB;;iBAGd,kBAAkB,UAAU;EAA2B;IAAuB;iBAC9E,kBAAkB,UAAU,kBAC1C,SAAS;EAA2B,QAAQ;IAC3C,KAAK,gBAAgB,eAAe;iBACvB,kBAAkB,mBAAmB,oBACnD,SAAS;EAA2B,QAAQ;IAC3C,KAAK,gBAAgB,wBAAwB;iBAChC,kBAAkB,UAAU,qBAAqB,iBAAiB,KAAK,gBAAgB;KA+K3F,cAAc,iBAAiB"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { S as ToolOverrides, _ as CommitIdentity, a as GithubTokenInput, b as Octokit, c as ApprovalConfig, d as GithubToolPreset, f as PRESET_TOOLS, g as GithubWriteToolName, h as GithubToolName, i as PickGithubTools, l as GITHUB_WRITE_TOOLS, m as GITHUB_TOOL_NAMES, o as resolveGithubToken, p as PresetToolName, r as GithubToolsForPreset, s as GithubToolsContext, t as AllGithubTools, u as CombinedPresetToolNames, v as CommitToolOptions, x as ToolOptions, y as GithubTool } from "./tool-types-DbZpOYFG.mjs";
|
|
2
|
-
import { $ as
|
|
3
|
-
export { type AllGithubTools, type ApprovalConfig, type CombinedPresetToolNames, type CommitIdentity, type CommitToolOptions, type CreateGithubAgentOptions, GITHUB_TOOL_NAMES, GITHUB_WRITE_TOOLS, type GithubRateLimit, type GithubTokenInput, type GithubTool, type GithubToolName, type GithubToolPreset, GithubTools, type GithubToolsContext, type GithubToolsForPreset, GithubToolsOptions, type GithubWriteToolName, type Octokit, PRESET_TOOLS, type PickGithubTools, type PresetToolName, type ToolOptions, type ToolOverrides, addAssignees, addCommentReaction, addDiscussionComment, addIssueComment, addIssueReaction, addLabels, addPullRequestComment, cancelWorkflowRun, closeIssue, compareCommits, createBranch, createGist, createGistComment, createGithubAgent, createGithubTools, createIssue, createLabel, createOctokit, createOrUpdateFile, createPullRequest, createPullRequestReview, createRelease, createRepository, deleteBranch, deleteGist, deleteIssueComment, deleteLabel, deletePullRequestComment, deleteRelease, forkRepository, getBlame, getCiFailureContext, getCombinedStatus, getCommit, getDiscussion, getFileContent, getGist, getIssue, getIssueContext, getLatestRelease, getPullRequest, getPullRequestContext, getRelease, getReleaseContext, getRepository, getRepositoryTree, getWorkflowJobLogs, getWorkflowRun, listBranches, listCheckRuns, listCommentReactions, listCommits, listDiscussions, listGistComments, listGists, listIssueComments, listIssueReactions, listIssues, listLabels, listNotifications, listPullRequestFiles, listPullRequestReviewThreads, listPullRequestReviews, listPullRequests, listReleases, listWorkflowJobs, listWorkflowRuns, listWorkflows, markNotificationRead, mergePullRequest, removeAssignees, removeLabel, replyToReviewComment, requestReviewers, rerunWorkflowRun, resolveGithubToken, resolveReviewThread, searchCode, searchIssues, searchRepositories, triggerWorkflow, updateGist, updateIssue, updateIssueComment, updateLabel, updatePullRequest, updatePullRequestComment, updateRelease };
|
|
2
|
+
import { $ as addLabels, A as deleteGist, At as createOrUpdateFile, B as searchIssues, C as listWorkflowJobs, Ct as mergePullRequest, D as triggerWorkflow, Dt as updatePullRequest, E as rerunWorkflowRun, Et as resolveReviewThread, F as compareCommits, Ft as getRepository, G as getDiscussion, H as listNotifications, I as getBlame, It as getRepositoryTree, J as addIssueReaction, K as listDiscussions, L as getCommit, Lt as listBranches, M as listGistComments, Mt as deleteBranch, N as listGists, Nt as forkRepository, O as createGist, Ot as updatePullRequestComment, P as updateGist, Pt as getFileContent, Q as addIssueComment, R as listCommits, Rt as createOctokit, S as getWorkflowRun, St as listPullRequests, T as listWorkflows, Tt as requestReviewers, U as markNotificationRead, V as searchRepositories, W as addDiscussionComment, X as listIssueReactions, Y as listCommentReactions, Z as addAssignees, _ as updateRelease, _t as deletePullRequestComment, a as createGithubAgent, at as getIssue, b as cancelWorkflowRun, bt as listPullRequestReviewThreads, c as getCiFailureContext, ct as listLabels, d as getReleaseContext, dt as updateIssue, et as closeIssue, f as createRelease, ft as updateIssueComment, g as listReleases, gt as createPullRequestReview, h as getRelease, ht as createPullRequest, i as CreateGithubAgentOptions, it as deleteLabel, j as getGist, jt as createRepository, k as createGistComment, kt as createBranch, l as getIssueContext, lt as removeAssignees, m as getLatestRelease, mt as addPullRequestComment, n as GithubToolsOptions, nt as createLabel, o as githubToolsErrors, ot as listIssueComments, p as deleteRelease, pt as updateLabel, q as addCommentReaction, r as createGithubTools, rt as deleteIssueComment, s as GithubRateLimit, st as listIssues, t as GithubTools, tt as createIssue, u as getPullRequestContext, ut as removeLabel, v as getCombinedStatus, vt as getPullRequest, w as listWorkflowRuns, wt as replyToReviewComment, x as getWorkflowJobLogs, xt as listPullRequestReviews, y as listCheckRuns, yt as listPullRequestFiles, z as searchCode } from "./index-BOerqLIm.mjs";
|
|
3
|
+
export { type AllGithubTools, type ApprovalConfig, type CombinedPresetToolNames, type CommitIdentity, type CommitToolOptions, type CreateGithubAgentOptions, GITHUB_TOOL_NAMES, GITHUB_WRITE_TOOLS, type GithubRateLimit, type GithubTokenInput, type GithubTool, type GithubToolName, type GithubToolPreset, GithubTools, type GithubToolsContext, type GithubToolsForPreset, GithubToolsOptions, type GithubWriteToolName, type Octokit, PRESET_TOOLS, type PickGithubTools, type PresetToolName, type ToolOptions, type ToolOverrides, addAssignees, addCommentReaction, addDiscussionComment, addIssueComment, addIssueReaction, addLabels, addPullRequestComment, cancelWorkflowRun, closeIssue, compareCommits, createBranch, createGist, createGistComment, createGithubAgent, createGithubTools, createIssue, createLabel, createOctokit, createOrUpdateFile, createPullRequest, createPullRequestReview, createRelease, createRepository, deleteBranch, deleteGist, deleteIssueComment, deleteLabel, deletePullRequestComment, deleteRelease, forkRepository, getBlame, getCiFailureContext, getCombinedStatus, getCommit, getDiscussion, getFileContent, getGist, getIssue, getIssueContext, getLatestRelease, getPullRequest, getPullRequestContext, getRelease, getReleaseContext, getRepository, getRepositoryTree, getWorkflowJobLogs, getWorkflowRun, githubToolsErrors, listBranches, listCheckRuns, listCommentReactions, listCommits, listDiscussions, listGistComments, listGists, listIssueComments, listIssueReactions, listIssues, listLabels, listNotifications, listPullRequestFiles, listPullRequestReviewThreads, listPullRequestReviews, listPullRequests, listReleases, listWorkflowJobs, listWorkflowRuns, listWorkflows, markNotificationRead, mergePullRequest, removeAssignees, removeLabel, replyToReviewComment, requestReviewers, rerunWorkflowRun, resolveGithubToken, resolveReviewThread, searchCode, searchIssues, searchRepositories, triggerWorkflow, updateGist, updateIssue, updateIssueComment, updateLabel, updatePullRequest, updatePullRequestComment, updateRelease };
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Si as resolveGithubToken, n as GITHUB_TOOL_NAMES, na as createOctokit, o as PRESET_TOOLS, t as GITHUB_WRITE_TOOLS } from "./write-tools-
|
|
2
|
-
import { $ as deleteIssueComment, A as updateGist, At as getFileContent, B as addDiscussionComment, C as triggerWorkflow, Ct as updatePullRequest, D as getGist, Dt as createRepository, E as deleteGist, Et as createOrUpdateFile, F as searchCode, G as listCommentReactions, H as listDiscussions, I as searchIssues, J as addIssueComment, K as listIssueReactions, L as searchRepositories, M as getBlame, Mt as getRepositoryTree, N as getCommit, Nt as listBranches, O as listGistComments, Ot as deleteBranch, P as listCommits, Q as createLabel, R as listNotifications, S as rerunWorkflowRun, St as resolveReviewThread, T as createGistComment, Tt as createBranch, U as addCommentReaction, V as getDiscussion, W as addIssueReaction, X as closeIssue, Y as addLabels, Z as createIssue, _ as getWorkflowJobLogs, _t as listPullRequestReviews, a as getIssueContext, at as removeAssignees, b as listWorkflowRuns, bt as replyToReviewComment, c as createRelease, ct as updateIssueComment, d as getRelease, dt as createPullRequest, et as deleteLabel, f as listReleases, ft as createPullRequestReview, g as cancelWorkflowRun, gt as listPullRequestReviewThreads, h as listCheckRuns, ht as listPullRequestFiles, i as getCiFailureContext, it as listLabels, j as compareCommits, jt as getRepository, k as listGists, kt as forkRepository, l as deleteRelease, lt as updateLabel, m as getCombinedStatus, mt as getPullRequest, n as createGithubAgent, nt as listIssueComments, o as getPullRequestContext, ot as removeLabel, p as updateRelease, pt as deletePullRequestComment, q as addAssignees, rt as listIssues, s as getReleaseContext, st as updateIssue, t as createGithubTools, tt as getIssue, u as getLatestRelease, ut as addPullRequestComment, v as getWorkflowRun, vt as listPullRequests, w as createGist, wt as updatePullRequestComment, x as listWorkflows, xt as requestReviewers, y as listWorkflowJobs, yt as mergePullRequest, z as markNotificationRead } from "./src-
|
|
3
|
-
export { GITHUB_TOOL_NAMES, GITHUB_WRITE_TOOLS, PRESET_TOOLS, addAssignees, addCommentReaction, addDiscussionComment, addIssueComment, addIssueReaction, addLabels, addPullRequestComment, cancelWorkflowRun, closeIssue, compareCommits, createBranch, createGist, createGistComment, createGithubAgent, createGithubTools, createIssue, createLabel, createOctokit, createOrUpdateFile, createPullRequest, createPullRequestReview, createRelease, createRepository, deleteBranch, deleteGist, deleteIssueComment, deleteLabel, deletePullRequestComment, deleteRelease, forkRepository, getBlame, getCiFailureContext, getCombinedStatus, getCommit, getDiscussion, getFileContent, getGist, getIssue, getIssueContext, getLatestRelease, getPullRequest, getPullRequestContext, getRelease, getReleaseContext, getRepository, getRepositoryTree, getWorkflowJobLogs, getWorkflowRun, listBranches, listCheckRuns, listCommentReactions, listCommits, listDiscussions, listGistComments, listGists, listIssueComments, listIssueReactions, listIssues, listLabels, listNotifications, listPullRequestFiles, listPullRequestReviewThreads, listPullRequestReviews, listPullRequests, listReleases, listWorkflowJobs, listWorkflowRuns, listWorkflows, markNotificationRead, mergePullRequest, removeAssignees, removeLabel, replyToReviewComment, requestReviewers, rerunWorkflowRun, resolveGithubToken, resolveReviewThread, searchCode, searchIssues, searchRepositories, triggerWorkflow, updateGist, updateIssue, updateIssueComment, updateLabel, updatePullRequest, updatePullRequestComment, updateRelease };
|
|
1
|
+
import { Si as resolveGithubToken, ia as githubToolsErrors, n as GITHUB_TOOL_NAMES, na as createOctokit, o as PRESET_TOOLS, t as GITHUB_WRITE_TOOLS } from "./write-tools-BvuWAzwo.mjs";
|
|
2
|
+
import { $ as deleteIssueComment, A as updateGist, At as getFileContent, B as addDiscussionComment, C as triggerWorkflow, Ct as updatePullRequest, D as getGist, Dt as createRepository, E as deleteGist, Et as createOrUpdateFile, F as searchCode, G as listCommentReactions, H as listDiscussions, I as searchIssues, J as addIssueComment, K as listIssueReactions, L as searchRepositories, M as getBlame, Mt as getRepositoryTree, N as getCommit, Nt as listBranches, O as listGistComments, Ot as deleteBranch, P as listCommits, Q as createLabel, R as listNotifications, S as rerunWorkflowRun, St as resolveReviewThread, T as createGistComment, Tt as createBranch, U as addCommentReaction, V as getDiscussion, W as addIssueReaction, X as closeIssue, Y as addLabels, Z as createIssue, _ as getWorkflowJobLogs, _t as listPullRequestReviews, a as getIssueContext, at as removeAssignees, b as listWorkflowRuns, bt as replyToReviewComment, c as createRelease, ct as updateIssueComment, d as getRelease, dt as createPullRequest, et as deleteLabel, f as listReleases, ft as createPullRequestReview, g as cancelWorkflowRun, gt as listPullRequestReviewThreads, h as listCheckRuns, ht as listPullRequestFiles, i as getCiFailureContext, it as listLabels, j as compareCommits, jt as getRepository, k as listGists, kt as forkRepository, l as deleteRelease, lt as updateLabel, m as getCombinedStatus, mt as getPullRequest, n as createGithubAgent, nt as listIssueComments, o as getPullRequestContext, ot as removeLabel, p as updateRelease, pt as deletePullRequestComment, q as addAssignees, rt as listIssues, s as getReleaseContext, st as updateIssue, t as createGithubTools, tt as getIssue, u as getLatestRelease, ut as addPullRequestComment, v as getWorkflowRun, vt as listPullRequests, w as createGist, wt as updatePullRequestComment, x as listWorkflows, xt as requestReviewers, y as listWorkflowJobs, yt as mergePullRequest, z as markNotificationRead } from "./src-C54blWpT.mjs";
|
|
3
|
+
export { GITHUB_TOOL_NAMES, GITHUB_WRITE_TOOLS, PRESET_TOOLS, addAssignees, addCommentReaction, addDiscussionComment, addIssueComment, addIssueReaction, addLabels, addPullRequestComment, cancelWorkflowRun, closeIssue, compareCommits, createBranch, createGist, createGistComment, createGithubAgent, createGithubTools, createIssue, createLabel, createOctokit, createOrUpdateFile, createPullRequest, createPullRequestReview, createRelease, createRepository, deleteBranch, deleteGist, deleteIssueComment, deleteLabel, deletePullRequestComment, deleteRelease, forkRepository, getBlame, getCiFailureContext, getCombinedStatus, getCommit, getDiscussion, getFileContent, getGist, getIssue, getIssueContext, getLatestRelease, getPullRequest, getPullRequestContext, getRelease, getReleaseContext, getRepository, getRepositoryTree, getWorkflowJobLogs, getWorkflowRun, githubToolsErrors, listBranches, listCheckRuns, listCommentReactions, listCommits, listDiscussions, listGistComments, listGists, listIssueComments, listIssueReactions, listIssues, listLabels, listNotifications, listPullRequestFiles, listPullRequestReviewThreads, listPullRequestReviews, listPullRequests, listReleases, listWorkflowJobs, listWorkflowRuns, listWorkflows, markNotificationRead, mergePullRequest, removeAssignees, removeLabel, replyToReviewComment, requestReviewers, rerunWorkflowRun, resolveGithubToken, resolveReviewThread, searchCode, searchIssues, searchRepositories, triggerWorkflow, updateGist, updateIssue, updateIssueComment, updateLabel, updatePullRequest, updatePullRequestComment, updateRelease };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as getWorkflowJobLogsInputSchema, $i as listBranchesCore, $n as deleteIssueCommentInputSchema, $r as listPullRequestReviewsInputSchema, $t as searchCodeInputSchema, A as getLatestReleaseCore, Ai as createBranchDescription, An as listIssueReactionsCore, Ar as addPullRequestCommentCore, At as listGistCommentsCore, B as updateReleaseDescription, Bi as deleteBranchInputSchema, Bn as addLabelsDescription, Br as deletePullRequestCommentDescription, Bt as compareCommitsDescription, C as getReleaseContextInputSchema, Ci as compareCommitsToModelOutput, Cn as addCommentReactionInputSchema, Cr as updateIssueCommentInputSchema, Ct as createGistInputSchema, D as deleteReleaseCore, Di as getRepositoryTreeToModelOutput, Dn as listCommentReactionsCore, Dr as updateLabelCore, Dt as getGistCore, E as createReleaseInputSchema, Ei as getPullRequestContextToModelOutput, En as addIssueReactionInputSchema, Er as updateIssueInputSchema, Et as deleteGistInputSchema, F as getReleaseInputSchema, Fi as createRepositoryCore, Fn as addAssigneesInputSchema, Fr as createPullRequestInputSchema, Ft as listGistsInputSchema, G as listCheckRunsCore, Gi as getFileContentDescription, Gn as createIssueCore, Gr as listPullRequestFilesCore, Gt as getCommitCore, H as getCombinedStatusCore, Hi as forkRepositoryDescription, Hn as closeIssueCore, Hr as getPullRequestCore, Ht as getBlameCore, I as listReleasesCore, Ii as createRepositoryDescription, In as addIssueCommentCore, Ir as createPullRequestReviewCore, It as updateGistCore, J as cancelWorkflowRunCore, Ji as getRepositoryDescription, Jn as createLabelCore, Jr as listPullRequestReviewThreadsCore, Jt as listCommitsCore, K as listCheckRunsDescription, Ki as getFileContentInputSchema, Kn as createIssueDescription, Kr as listPullRequestFilesDescription, Kt as getCommitDescription, L as listReleasesDescription, Li as createRepositoryInputSchema, Ln as addIssueCommentDescription, Lr as createPullRequestReviewDescription, Lt as updateGistDescription, M as getLatestReleaseInputSchema, Mi as createOrUpdateFileCore, Mn as listIssueReactionsInputSchema, Mr as addPullRequestCommentInputSchema, Mt as listGistCommentsInputSchema, N as getReleaseCore, Ni as createOrUpdateFileDescription, Nn as addAssigneesCore, Nr as createPullRequestCore, Nt as listGistsCore, O as deleteReleaseDescription, Oi as listPullRequestFilesToModelOutput, On as listCommentReactionsDescription, Or as updateLabelDescription, Ot as getGistDescription, P as getReleaseDescription, Pi as createOrUpdateFileInputSchema, Pn as addAssigneesDescription, Pr as createPullRequestDescription, Pt as listGistsDescription, Q as getWorkflowJobLogsDescription, Qi as getRepositoryTreeInputSchema, Qn as deleteIssueCommentDescription, Qr as listPullRequestReviewsDescription, Qt as searchCodeDescription, R as listReleasesInputSchema, Ri as deleteBranchCore, Rn as addIssueCommentInputSchema, Rr as createPullRequestReviewInputSchema, Rt as updateGistInputSchema, S as getReleaseContextDescription, Si as resolveGithubToken, Sn as addCommentReactionDescription, Sr as updateIssueCommentDescription, St as createGistDescription, T as createReleaseDescription, Ti as getFileContentToModelOutput, Tn as addIssueReactionDescription, Tr as updateIssueDescription, Tt as deleteGistDescription, U as getCombinedStatusDescription, Ui as forkRepositoryInputSchema, Un as closeIssueDescription, Ur as getPullRequestDescription, Ut as getBlameDescription, V as updateReleaseInputSchema, Vi as forkRepositoryCore, Vn as addLabelsInputSchema, Vr as deletePullRequestCommentInputSchema, Vt as compareCommitsInputSchema, W as getCombinedStatusInputSchema, Wi as getFileContentCore, Wn as closeIssueInputSchema, Wr as getPullRequestInputSchema, Wt as getBlameInputSchema, X as cancelWorkflowRunInputSchema, Xi as getRepositoryTreeCore, Xn as createLabelInputSchema, Xr as listPullRequestReviewThreadsInputSchema, Xt as listCommitsInputSchema, Y as cancelWorkflowRunDescription, Yi as getRepositoryInputSchema, Yn as createLabelDescription, Yr as listPullRequestReviewThreadsDescription, Yt as listCommitsDescription, Z as getWorkflowJobLogsCore, Zi as getRepositoryTreeDescription, Zn as deleteIssueCommentCore, Zr as listPullRequestReviewsCore, Zt as searchCodeCore, _ as getIssueContextInputSchema, _i as updatePullRequestCommentInputSchema, _n as getDiscussionInputSchema, _r as removeAssigneesInputSchema, _t as triggerWorkflowInputSchema, ai as mergePullRequestInputSchema, an as searchRepositoriesInputSchema, ar as getIssueInputSchema, at as listWorkflowJobsInputSchema, b as getPullRequestContextInputSchema, bi as updatePullRequestInputSchema, bn as listDiscussionsInputSchema, br as removeLabelInputSchema, bt as createGistCommentInputSchema, c as bindToolsContext, ci as replyToReviewCommentInputSchema, cn as listNotificationsInputSchema, cr as listIssueCommentsInputSchema, ct as listWorkflowRunsInputSchema, di as requestReviewersInputSchema, dn as markNotificationReadInputSchema, dr as listIssuesInputSchema, dt as listWorkflowsInputSchema, ea as listBranchesDescription, ei as listPullRequestsCore, en as searchIssuesCore, er as deleteLabelCore, et as getWorkflowRunCore, f as getCiFailureContextCore, fi as resolveReviewThreadCore, fn as addDiscussionCommentCore, fr as listLabelsCore, ft as rerunWorkflowRunCore, g as getIssueContextDescription, gi as updatePullRequestCommentDescription, gn as getDiscussionDescription, gr as removeAssigneesDescription, gt as triggerWorkflowDescription, h as getIssueContextCore, hi as updatePullRequestCommentCore, hn as getDiscussionCore, hr as removeAssigneesCore, ht as triggerWorkflowCore, ii as mergePullRequestDescription, in as searchRepositoriesDescription, ir as getIssueDescription, it as listWorkflowJobsDescription, j as getLatestReleaseDescription, ji as createBranchInputSchema, jn as listIssueReactionsDescription, jr as addPullRequestCommentDescription, jt as listGistCommentsDescription, k as deleteReleaseInputSchema, ki as createBranchCore, kn as listCommentReactionsInputSchema, kr as updateLabelInputSchema, kt as getGistInputSchema, l as formatContextInstructions, li as requestReviewersCore, ln as markNotificationReadCore, lr as listIssuesCore, lt as listWorkflowsCore, m as getCiFailureContextInputSchema, mi as resolveReviewThreadInputSchema, mn as addDiscussionCommentInputSchema, mr as listLabelsInputSchema, mt as rerunWorkflowRunInputSchema, ni as listPullRequestsInputSchema, nn as searchIssuesInputSchema, nr as deleteLabelInputSchema, nt as getWorkflowRunInputSchema, oi as replyToReviewCommentCore, on as listNotificationsCore, or as listIssueCommentsCore, ot as listWorkflowRunsCore, p as getCiFailureContextDescription, pi as resolveReviewThreadDescription, pn as addDiscussionCommentDescription, pr as listLabelsDescription, pt as rerunWorkflowRunDescription, q as listCheckRunsInputSchema, qi as getRepositoryCore, qn as createIssueInputSchema, qr as listPullRequestFilesInputSchema, qt as getCommitInputSchema,
|
|
1
|
+
import { $ as getWorkflowJobLogsInputSchema, $i as listBranchesCore, $n as deleteIssueCommentInputSchema, $r as listPullRequestReviewsInputSchema, $t as searchCodeInputSchema, A as getLatestReleaseCore, Ai as createBranchDescription, An as listIssueReactionsCore, Ar as addPullRequestCommentCore, At as listGistCommentsCore, B as updateReleaseDescription, Bi as deleteBranchInputSchema, Bn as addLabelsDescription, Br as deletePullRequestCommentDescription, Bt as compareCommitsDescription, C as getReleaseContextInputSchema, Ci as compareCommitsToModelOutput, Cn as addCommentReactionInputSchema, Cr as updateIssueCommentInputSchema, Ct as createGistInputSchema, D as deleteReleaseCore, Di as getRepositoryTreeToModelOutput, Dn as listCommentReactionsCore, Dr as updateLabelCore, Dt as getGistCore, E as createReleaseInputSchema, Ei as getPullRequestContextToModelOutput, En as addIssueReactionInputSchema, Er as updateIssueInputSchema, Et as deleteGistInputSchema, F as getReleaseInputSchema, Fi as createRepositoryCore, Fn as addAssigneesInputSchema, Fr as createPullRequestInputSchema, Ft as listGistsInputSchema, G as listCheckRunsCore, Gi as getFileContentDescription, Gn as createIssueCore, Gr as listPullRequestFilesCore, Gt as getCommitCore, H as getCombinedStatusCore, Hi as forkRepositoryDescription, Hn as closeIssueCore, Hr as getPullRequestCore, Ht as getBlameCore, I as listReleasesCore, Ii as createRepositoryDescription, In as addIssueCommentCore, Ir as createPullRequestReviewCore, It as updateGistCore, J as cancelWorkflowRunCore, Ji as getRepositoryDescription, Jn as createLabelCore, Jr as listPullRequestReviewThreadsCore, Jt as listCommitsCore, K as listCheckRunsDescription, Ki as getFileContentInputSchema, Kn as createIssueDescription, Kr as listPullRequestFilesDescription, Kt as getCommitDescription, L as listReleasesDescription, Li as createRepositoryInputSchema, Ln as addIssueCommentDescription, Lr as createPullRequestReviewDescription, Lt as updateGistDescription, M as getLatestReleaseInputSchema, Mi as createOrUpdateFileCore, Mn as listIssueReactionsInputSchema, Mr as addPullRequestCommentInputSchema, Mt as listGistCommentsInputSchema, N as getReleaseCore, Ni as createOrUpdateFileDescription, Nn as addAssigneesCore, Nr as createPullRequestCore, Nt as listGistsCore, O as deleteReleaseDescription, Oi as listPullRequestFilesToModelOutput, On as listCommentReactionsDescription, Or as updateLabelDescription, Ot as getGistDescription, P as getReleaseDescription, Pi as createOrUpdateFileInputSchema, Pn as addAssigneesDescription, Pr as createPullRequestDescription, Pt as listGistsDescription, Q as getWorkflowJobLogsDescription, Qi as getRepositoryTreeInputSchema, Qn as deleteIssueCommentDescription, Qr as listPullRequestReviewsDescription, Qt as searchCodeDescription, R as listReleasesInputSchema, Ri as deleteBranchCore, Rn as addIssueCommentInputSchema, Rr as createPullRequestReviewInputSchema, Rt as updateGistInputSchema, S as getReleaseContextDescription, Si as resolveGithubToken, Sn as addCommentReactionDescription, Sr as updateIssueCommentDescription, St as createGistDescription, T as createReleaseDescription, Ti as getFileContentToModelOutput, Tn as addIssueReactionDescription, Tr as updateIssueDescription, Tt as deleteGistDescription, U as getCombinedStatusDescription, Ui as forkRepositoryInputSchema, Un as closeIssueDescription, Ur as getPullRequestDescription, Ut as getBlameDescription, V as updateReleaseInputSchema, Vi as forkRepositoryCore, Vn as addLabelsInputSchema, Vr as deletePullRequestCommentInputSchema, Vt as compareCommitsInputSchema, W as getCombinedStatusInputSchema, Wi as getFileContentCore, Wn as closeIssueInputSchema, Wr as getPullRequestInputSchema, Wt as getBlameInputSchema, X as cancelWorkflowRunInputSchema, Xi as getRepositoryTreeCore, Xn as createLabelInputSchema, Xr as listPullRequestReviewThreadsInputSchema, Xt as listCommitsInputSchema, Y as cancelWorkflowRunDescription, Yi as getRepositoryInputSchema, Yn as createLabelDescription, Yr as listPullRequestReviewThreadsDescription, Yt as listCommitsDescription, Z as getWorkflowJobLogsCore, Zi as getRepositoryTreeDescription, Zn as deleteIssueCommentCore, Zr as listPullRequestReviewsCore, Zt as searchCodeCore, _ as getIssueContextInputSchema, _i as updatePullRequestCommentInputSchema, _n as getDiscussionInputSchema, _r as removeAssigneesInputSchema, _t as triggerWorkflowInputSchema, ai as mergePullRequestInputSchema, an as searchRepositoriesInputSchema, ar as getIssueInputSchema, at as listWorkflowJobsInputSchema, b as getPullRequestContextInputSchema, bi as updatePullRequestInputSchema, bn as listDiscussionsInputSchema, br as removeLabelInputSchema, bt as createGistCommentInputSchema, c as bindToolsContext, ci as replyToReviewCommentInputSchema, cn as listNotificationsInputSchema, cr as listIssueCommentsInputSchema, ct as listWorkflowRunsInputSchema, di as requestReviewersInputSchema, dn as markNotificationReadInputSchema, dr as listIssuesInputSchema, dt as listWorkflowsInputSchema, ea as listBranchesDescription, ei as listPullRequestsCore, en as searchIssuesCore, er as deleteLabelCore, et as getWorkflowRunCore, f as getCiFailureContextCore, fi as resolveReviewThreadCore, fn as addDiscussionCommentCore, fr as listLabelsCore, ft as rerunWorkflowRunCore, g as getIssueContextDescription, gi as updatePullRequestCommentDescription, gn as getDiscussionDescription, gr as removeAssigneesDescription, gt as triggerWorkflowDescription, h as getIssueContextCore, hi as updatePullRequestCommentCore, hn as getDiscussionCore, hr as removeAssigneesCore, ht as triggerWorkflowCore, ii as mergePullRequestDescription, in as searchRepositoriesDescription, ir as getIssueDescription, it as listWorkflowJobsDescription, j as getLatestReleaseDescription, ji as createBranchInputSchema, jn as listIssueReactionsDescription, jr as addPullRequestCommentDescription, jt as listGistCommentsDescription, k as deleteReleaseInputSchema, ki as createBranchCore, kn as listCommentReactionsInputSchema, kr as updateLabelInputSchema, kt as getGistInputSchema, l as formatContextInstructions, li as requestReviewersCore, ln as markNotificationReadCore, lr as listIssuesCore, lt as listWorkflowsCore, m as getCiFailureContextInputSchema, mi as resolveReviewThreadInputSchema, mn as addDiscussionCommentInputSchema, mr as listLabelsInputSchema, mt as rerunWorkflowRunInputSchema, ni as listPullRequestsInputSchema, nn as searchIssuesInputSchema, nr as deleteLabelInputSchema, nt as getWorkflowRunInputSchema, oa as stripRateLimit, oi as replyToReviewCommentCore, on as listNotificationsCore, or as listIssueCommentsCore, ot as listWorkflowRunsCore, p as getCiFailureContextDescription, pi as resolveReviewThreadDescription, pn as addDiscussionCommentDescription, pr as listLabelsDescription, pt as rerunWorkflowRunDescription, q as listCheckRunsInputSchema, qi as getRepositoryCore, qn as createIssueInputSchema, qr as listPullRequestFilesInputSchema, qt as getCommitInputSchema, ri as mergePullRequestCore, rn as searchRepositoriesCore, rr as getIssueCore, rt as listWorkflowJobsCore, s as resolvePresetTools, si as replyToReviewCommentDescription, sn as listNotificationsDescription, sr as listIssueCommentsDescription, st as listWorkflowRunsDescription, ta as listBranchesInputSchema, ti as listPullRequestsDescription, tn as searchIssuesDescription, tr as deleteLabelDescription, tt as getWorkflowRunDescription, ui as requestReviewersDescription, un as markNotificationReadDescription, ur as listIssuesDescription, ut as listWorkflowsDescription, v as getPullRequestContextCore, vi as updatePullRequestCore, vn as listDiscussionsCore, vr as removeLabelCore, vt as createGistCommentCore, w as createReleaseCore, wi as getCommitToModelOutput, wn as addIssueReactionCore, wr as updateIssueCore, wt as deleteGistCore, x as getReleaseContextCore, xi as createGithubTokenResolver, xn as addCommentReactionCore, xr as updateIssueCommentCore, xt as createGistCore, y as getPullRequestContextDescription, yi as updatePullRequestDescription, yn as listDiscussionsDescription, yr as removeLabelDescription, yt as createGistCommentDescription, z as updateReleaseCore, zi as deleteBranchDescription, zn as addLabelsCore, zr as deletePullRequestCommentCore, zt as compareCommitsCore } from "./write-tools-BvuWAzwo.mjs";
|
|
2
2
|
import { ToolLoopAgent, tool } from "ai";
|
|
3
3
|
//#region src/tools/repository.ts
|
|
4
4
|
async function getRepositoryStep(args) {
|
|
@@ -1524,4 +1524,4 @@ function withStrippedRateLimit(tool) {
|
|
|
1524
1524
|
//#endregion
|
|
1525
1525
|
export { deleteIssueComment as $, updateGist as A, getFileContent as At, addDiscussionComment as B, triggerWorkflow as C, updatePullRequest as Ct, getGist as D, createRepository as Dt, deleteGist as E, createOrUpdateFile as Et, searchCode as F, listCommentReactions as G, listDiscussions as H, searchIssues as I, addIssueComment as J, listIssueReactions as K, searchRepositories as L, getBlame as M, getRepositoryTree as Mt, getCommit as N, listBranches as Nt, listGistComments as O, deleteBranch as Ot, listCommits as P, createLabel as Q, listNotifications as R, rerunWorkflowRun as S, resolveReviewThread as St, createGistComment as T, createBranch as Tt, addCommentReaction as U, getDiscussion as V, addIssueReaction as W, closeIssue as X, addLabels as Y, createIssue as Z, getWorkflowJobLogs as _, listPullRequestReviews as _t, getIssueContext as a, removeAssignees as at, listWorkflowRuns as b, replyToReviewComment as bt, createRelease as c, updateIssueComment as ct, getRelease as d, createPullRequest as dt, deleteLabel as et, listReleases as f, createPullRequestReview as ft, cancelWorkflowRun as g, listPullRequestReviewThreads as gt, listCheckRuns as h, listPullRequestFiles as ht, getCiFailureContext as i, listLabels as it, compareCommits as j, getRepository as jt, listGists as k, forkRepository as kt, deleteRelease as l, updateLabel as lt, getCombinedStatus as m, getPullRequest as mt, createGithubAgent as n, listIssueComments as nt, getPullRequestContext as o, removeLabel as ot, updateRelease as p, deletePullRequestComment as pt, addAssignees as q, resolveInstructions as r, listIssues as rt, getReleaseContext as s, updateIssue as st, createGithubTools as t, getIssue as tt, getLatestRelease as u, addPullRequestComment as ut, getWorkflowRun as v, listPullRequests as vt, createGist as w, updatePullRequestComment as wt, listWorkflows as x, requestReviewers as xt, listWorkflowJobs as y, mergePullRequest as yt, markNotificationRead as z };
|
|
1526
1526
|
|
|
1527
|
-
//# sourceMappingURL=src-
|
|
1527
|
+
//# sourceMappingURL=src-C54blWpT.mjs.map
|