@github-tools/sdk 1.12.0 → 1.14.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 +22 -17
- package/dist/connect/eve.d.mts +2 -3
- package/dist/connect/eve.d.mts.map +1 -1
- package/dist/connect/eve.mjs +1 -1
- package/dist/connect.d.mts +8 -86
- package/dist/connect.d.mts.map +1 -1
- package/dist/connect.mjs +2 -2
- package/dist/eve-runtime-BdolQrBF.mjs +275 -0
- package/dist/eve-runtime-BdolQrBF.mjs.map +1 -0
- package/dist/{eve-runtime-BmoVTbEU.d.mts → eve-runtime-D1v4C0UP.d.mts} +14 -6
- package/dist/eve-runtime-D1v4C0UP.d.mts.map +1 -0
- package/dist/eve-runtime.d.mts +4 -3
- package/dist/eve-runtime.mjs +2 -2
- package/dist/eve.d.mts +4 -4
- package/dist/eve.d.mts.map +1 -1
- package/dist/eve.mjs +2 -2
- package/dist/index-PqQNoVuw.d.mts +287 -0
- package/dist/index-PqQNoVuw.d.mts.map +1 -0
- package/dist/index.d.mts +3 -2
- package/dist/index.mjs +3 -3
- package/dist/{src-D45Onmsn.mjs → src-D9WxaIVj.mjs} +83 -4
- package/dist/src-D9WxaIVj.mjs.map +1 -0
- package/dist/{token-BIn80-XU.mjs → token-Dt6qs_kf.mjs} +9 -168
- package/dist/token-Dt6qs_kf.mjs.map +1 -0
- package/dist/tool-types-DbZpOYFG.d.mts +3312 -0
- package/dist/tool-types-DbZpOYFG.d.mts.map +1 -0
- package/dist/{types-CiNZNOXa.d.mts → types-BAEqBfM5.d.mts} +3 -3
- package/dist/{types-CiNZNOXa.d.mts.map → types-BAEqBfM5.d.mts.map} +1 -1
- package/dist/{types-CoTpsxxp.d.mts → types-CCoH12WC.d.mts} +4 -3
- package/dist/types-CCoH12WC.d.mts.map +1 -0
- package/dist/workflow.d.mts +2 -1
- package/dist/workflow.d.mts.map +1 -1
- package/dist/workflow.mjs +2 -2
- package/dist/{write-tools-CnJE0Vvu.mjs → write-tools-Ct0ZV87Z.mjs} +1296 -306
- package/dist/write-tools-Ct0ZV87Z.mjs.map +1 -0
- package/package.json +3 -3
- package/dist/eve-runtime-3asyv7YM.mjs +0 -771
- package/dist/eve-runtime-3asyv7YM.mjs.map +0 -1
- package/dist/eve-runtime-BmoVTbEU.d.mts.map +0 -1
- package/dist/index-CGeFo38P.d.mts +0 -783
- package/dist/index-CGeFo38P.d.mts.map +0 -1
- package/dist/src-D45Onmsn.mjs.map +0 -1
- package/dist/token-BIn80-XU.mjs.map +0 -1
- package/dist/types-CoTpsxxp.d.mts.map +0 -1
- package/dist/write-tools-CnJE0Vvu.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eve-runtime-BdolQrBF.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 { 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 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":";;;;;;;;;;AAiBA,MAAa,sBACX;AAEF,SAAgB,cAA8B;CAC5C,OAAO;AACT;AAEA,SAAgB,wBAA2C;CACzD,OAAO;AACT;;;;;;;;AChBA,SAAg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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"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as EveToolFactoryOptions, n as EveApprovalValue, r as EveGithubToolsOptions, t as EveApprovalConfig } from "./types-
|
|
1
|
+
import { d as GithubToolPreset, g as GithubWriteToolName, h as GithubToolName, p as PresetToolName, u as CombinedPresetToolNames } from "./tool-types-DbZpOYFG.mjs";
|
|
2
|
+
import { i as EveToolFactoryOptions, n as EveApprovalValue, r as EveGithubToolsOptions, t as EveApprovalConfig } from "./types-CCoH12WC.mjs";
|
|
3
|
+
import "./index-PqQNoVuw.mjs";
|
|
3
4
|
import { z } from "zod";
|
|
4
|
-
import {
|
|
5
|
+
import { ToolDefinition, ToolModelOutput } from "eve/tools";
|
|
6
|
+
import { Approval, ApprovalPolicy } from "eve/tools/approval";
|
|
5
7
|
//#region src/eve/registry.d.ts
|
|
6
8
|
/** Whether a GitHub tool has a built-in eve `toModelOutput` projection. */
|
|
7
9
|
declare function hasGithubEveToolModelOutput(name: GithubToolName): boolean;
|
|
@@ -20,7 +22,7 @@ type BuildOptions = EveGithubToolsOptions | (EveToolFactoryOptions & {
|
|
|
20
22
|
type EveToolMap = Partial<Record<GithubToolName, ToolDefinition>>;
|
|
21
23
|
declare function buildEveToolDefinition(name: GithubToolName, options?: BuildOptions): ToolDefinition;
|
|
22
24
|
declare function buildEveToolMap(options?: EveGithubToolsOptions): EveToolMap;
|
|
23
|
-
declare function createEveGithubToolsDynamic(options?: EveGithubToolsOptions): import("eve/tools").DynamicSentinel<Partial<Record<
|
|
25
|
+
declare function createEveGithubToolsDynamic(options?: EveGithubToolsOptions): import("eve/tools").DynamicSentinel<Partial<Record<"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", ToolDefinition<unknown, unknown>>>>;
|
|
24
26
|
declare function listResolvedEveToolNames(options?: {
|
|
25
27
|
preset?: undefined;
|
|
26
28
|
include?: undefined;
|
|
@@ -42,7 +44,7 @@ declare function listResolvedEveToolNames(options: Pick<EveGithubToolsOptions, '
|
|
|
42
44
|
* Prefer this when registering tools outside the SDK package so durable transforms can hoist inline execute.
|
|
43
45
|
*/
|
|
44
46
|
declare function listEveToolDescriptors(options?: EveGithubToolsOptions): {
|
|
45
|
-
name:
|
|
47
|
+
name: "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";
|
|
46
48
|
description: string;
|
|
47
49
|
inputSchema: import("zod").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>>;
|
|
48
50
|
writeTool: GithubWriteToolName | undefined;
|
|
@@ -71,7 +73,13 @@ declare function resolveEveApproval(toolName: GithubWriteToolName, config: EveAp
|
|
|
71
73
|
declare function resolveEveToolApproval(toolName: GithubWriteToolName, config: EveApprovalConfig | undefined, override?: EveApprovalValue): Approval | undefined;
|
|
72
74
|
//#endregion
|
|
73
75
|
//#region src/eve/load-eve.d.ts
|
|
76
|
+
/**
|
|
77
|
+
* @deprecated Never thrown since eve moved to static ESM imports — a missing
|
|
78
|
+
* `eve` package now fails at module resolution with the bundler/runtime's own
|
|
79
|
+
* error. Kept only for backward compatibility of the public export; do not
|
|
80
|
+
* match on it. Will be removed in the next major.
|
|
81
|
+
*/
|
|
74
82
|
declare const MISSING_EVE_MESSAGE = "The \"eve\" package is required to use @github-tools/sdk/eve. Install it with: pnpm add eve";
|
|
75
83
|
//#endregion
|
|
76
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 };
|
|
77
|
-
//# sourceMappingURL=eve-runtime-
|
|
85
|
+
//# sourceMappingURL=eve-runtime-D1v4C0UP.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eve-runtime-D1v4C0UP.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"}
|
package/dist/eve-runtime.d.mts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as EveToolOverrides, i as EveToolFactoryOptions, n as EveApprovalValue, r as EveGithubToolsOptions, t as EveApprovalConfig } from "./types-
|
|
3
|
-
import {
|
|
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
|
+
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-PqQNoVuw.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-D1v4C0UP.mjs";
|
|
4
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 };
|
package/dist/eve-runtime.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
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-
|
|
1
|
+
import { n as GITHUB_TOOL_NAMES, o as PRESET_TOOLS, t as GITHUB_WRITE_TOOLS } from "./write-tools-Ct0ZV87Z.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-BdolQrBF.mjs";
|
|
3
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 };
|
package/dist/eve.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as EveToolOverrides, i as EveToolFactoryOptions, n as EveApprovalValue, r as EveGithubToolsOptions, t as EveApprovalConfig } from "./types-
|
|
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-
|
|
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
|
+
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-D1v4C0UP.mjs";
|
|
4
4
|
//#region src/eve.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Register all GitHub tools (or a preset subset) as eve dynamic capabilities.
|
|
@@ -16,7 +16,7 @@ import { a as resolveEveToolApproval, c as createEveGithubToolsDynamic, d as lis
|
|
|
16
16
|
* recommended way to add GitHub tools to an eve agent. This direct import keeps working but is no longer
|
|
17
17
|
* the recommended path. See https://github-tools.com/frameworks/eve-extension.
|
|
18
18
|
*/
|
|
19
|
-
declare function createGithubTools(options?: EveGithubToolsOptions): import("eve/tools").DynamicSentinel<Partial<Record<
|
|
19
|
+
declare function createGithubTools(options?: EveGithubToolsOptions): import("eve/tools").DynamicSentinel<Partial<Record<"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", import("eve/tools").ToolDefinition<unknown, unknown>>>>;
|
|
20
20
|
/**
|
|
21
21
|
* Get information about a GitHub repository including description, stars, forks, language, and default branch.
|
|
22
22
|
*
|
package/dist/eve.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eve.d.mts","names":[],"sources":["../src/eve.ts"],"mappings":";;;;;;;;;;;;;;;;;;iBA0DgB,kBAAkB,UAAlB,4CAAuE,gBAAA,QAAA,
|
|
1
|
+
{"version":3,"file":"eve.d.mts","names":[],"sources":["../src/eve.ts"],"mappings":";;;;;;;;;;;;;;;;;;iBA0DgB,kBAAkB,UAAlB,4CAAuE,gBAAA,QAAA,qqDAAA;;;;;;;cAc1E,gBAAa,UATN,8CAAqB;;;;;;;cAgB5B,eAAY,UAhBL,8CAAqB;;;;;;;cAuB5B,iBAAc,UAvBP,8CAAqB;;;;;;;cA8B5B,eAAY,UA9BL,8CAAqB;;;;;;;cAqC5B,iBAAc,UArCP,8CAAqB;;;;;;;cA4C5B,mBAAgB,UA5CT,8CAAqB;;;;;;;cAmD5B,qBAAkB,UAnDX,8CAAqB;;;;;;;cA0D5B,mBAAgB,UA1DT,8CAAqB;;;;;;;cAiE5B,iBAAc,UAjEP,8CAAqB;;;;;;;cAwE5B,oBAAiB,UAxEV,8CAAqB;;;;;;;cA+E5B,mBAAgB,UA/ET,8CAAqB;;;;;;;cAsF5B,wBAAqB,UAtFd,8CAAqB;;;;;;;cA6F5B,uBAAoB,UA7Fb,8CAAqB;;;;;;;cAoG5B,yBAAsB,UApGf,8CAAqB;;;;;;;cA2G5B,0BAAuB,UA3GhB,8CAAqB;;;;;;;cAkH5B,wBAAqB,UAlHd,8CAAqB;;;;;;;cAyH5B,kBAAe,UAzHR,8CAAqB;;;;;;;cAgI5B,aAAU,UAhIH,8CAAqB;;;;;;;cAuI5B,WAAQ,UAvID,8CAAqB;;;;;;;cA8I5B,oBAAiB,UA9IV,8CAAqB;;;;;;;cAqJ5B,cAAW,UArJJ,8CAAqB;;;;;;;cA4J5B,kBAAe,UA5JR,8CAAqB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led, 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-Ct0ZV87Z.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-BdolQrBF.mjs";
|
|
3
3
|
//#region src/eve.ts
|
|
4
4
|
/**
|
|
5
5
|
* Legacy eve registration for `agent/tools/` (direct import).
|
|
@@ -0,0 +1,287 @@
|
|
|
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
|
+
import { ToolLoopAgent, ToolLoopAgentSettings, ToolSet } from "ai";
|
|
3
|
+
import { Octokit } from "octokit";
|
|
4
|
+
//#region src/client.d.ts
|
|
5
|
+
declare function createOctokit(token: string): Octokit;
|
|
6
|
+
//#endregion
|
|
7
|
+
//#region src/tools/repository.d.ts
|
|
8
|
+
/** Get information about a GitHub repository including description, stars, forks, language, and default branch. */
|
|
9
|
+
declare const getRepository: (token: GithubTokenInput) => GithubTool;
|
|
10
|
+
/** List branches in a GitHub repository. */
|
|
11
|
+
declare const listBranches: (token: GithubTokenInput) => GithubTool;
|
|
12
|
+
/** Get the content of a file from a GitHub repository. */
|
|
13
|
+
declare const getFileContent: (token: GithubTokenInput) => GithubTool;
|
|
14
|
+
/** List the file and directory structure of a repository at a given ref. */
|
|
15
|
+
declare const getRepositoryTree: (token: GithubTokenInput) => GithubTool;
|
|
16
|
+
/** Create a new branch in a GitHub repository from an existing branch or commit SHA. Requires approval by default. */
|
|
17
|
+
declare const createBranch: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
18
|
+
/** Delete a branch from a GitHub repository permanently. Requires approval by default. */
|
|
19
|
+
declare const deleteBranch: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
20
|
+
/** Fork a GitHub repository to the authenticated user account or a specified organization. Requires approval by default. */
|
|
21
|
+
declare const forkRepository: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
22
|
+
/** Create a new GitHub repository for the authenticated user or a specified organization. Requires approval by default. */
|
|
23
|
+
declare const createRepository: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
24
|
+
/** Create or update a file in a GitHub repository. Provide the SHA when updating an existing file. Requires approval by default. */
|
|
25
|
+
declare const createOrUpdateFile: (token: GithubTokenInput, { needsApproval, author, committer, coAuthors }?: CommitToolOptions) => GithubTool;
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/tools/pull-requests.d.ts
|
|
28
|
+
type MergeToolOptions = ToolOptions & {
|
|
29
|
+
coAuthors?: CommitIdentity[];
|
|
30
|
+
};
|
|
31
|
+
/** List pull requests for a GitHub repository. */
|
|
32
|
+
declare const listPullRequests: (token: GithubTokenInput) => GithubTool;
|
|
33
|
+
/** Get detailed information about a specific pull request. */
|
|
34
|
+
declare const getPullRequest: (token: GithubTokenInput) => GithubTool;
|
|
35
|
+
/** Create a new pull request in a GitHub repository. Requires approval by default. */
|
|
36
|
+
declare const createPullRequest: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
37
|
+
/** Merge a pull request. Requires approval by default. */
|
|
38
|
+
declare const mergePullRequest: (token: GithubTokenInput, { needsApproval, coAuthors }?: MergeToolOptions) => GithubTool;
|
|
39
|
+
/** Update a pull request — title, body, state, base branch, or draft status. Requires approval by default. */
|
|
40
|
+
declare const updatePullRequest: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
41
|
+
/** Add a comment to a pull request. Requires approval by default. */
|
|
42
|
+
declare const addPullRequestComment: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
43
|
+
/** Update the body of a comment on a pull request. Requires approval by default. */
|
|
44
|
+
declare const updatePullRequestComment: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
45
|
+
/** Delete a comment from a pull request permanently. Requires approval by default. */
|
|
46
|
+
declare const deletePullRequestComment: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
47
|
+
/** List files changed in a pull request with status and stats. Patches omitted by default. */
|
|
48
|
+
declare const listPullRequestFiles: (token: GithubTokenInput) => GithubTool;
|
|
49
|
+
/** List reviews on a pull request (approvals, change requests, and comments). */
|
|
50
|
+
declare const listPullRequestReviews: (token: GithubTokenInput) => GithubTool;
|
|
51
|
+
/** Submit a pull request review with optional inline comments. Requires approval by default. */
|
|
52
|
+
declare const createPullRequestReview: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
53
|
+
/** List review threads on a pull request with comments, resolution state, and reply/resolve IDs. */
|
|
54
|
+
declare const listPullRequestReviewThreads: (token: GithubTokenInput) => GithubTool;
|
|
55
|
+
/** Reply to a pull request review comment in its review thread. Requires approval by default. */
|
|
56
|
+
declare const replyToReviewComment: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
57
|
+
/** Mark a pull request review thread as resolved. Requires approval by default. */
|
|
58
|
+
declare const resolveReviewThread: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
59
|
+
/** Request reviews from users or teams on a pull request. Requires approval by default. */
|
|
60
|
+
declare const requestReviewers: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
61
|
+
//#endregion
|
|
62
|
+
//#region src/tools/issues.d.ts
|
|
63
|
+
/** List issues for a GitHub repository (excludes pull requests). */
|
|
64
|
+
declare const listIssues: (token: GithubTokenInput) => GithubTool;
|
|
65
|
+
/** Get detailed information about a specific issue. */
|
|
66
|
+
declare const getIssue: (token: GithubTokenInput) => GithubTool;
|
|
67
|
+
/** List comments on a GitHub issue. Prefer getIssueContext for the first page when triaging. */
|
|
68
|
+
declare const listIssueComments: (token: GithubTokenInput) => GithubTool;
|
|
69
|
+
/** Create a new issue in a GitHub repository. Requires approval by default. */
|
|
70
|
+
declare const createIssue: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
71
|
+
/** Add a comment to a GitHub issue. Requires approval by default. */
|
|
72
|
+
declare const addIssueComment: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
73
|
+
/** Close an open GitHub issue. Requires approval by default. */
|
|
74
|
+
declare const closeIssue: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
75
|
+
/** Update a GitHub issue — title, body, state, labels, milestone, or assignees. Requires approval by default. */
|
|
76
|
+
declare const updateIssue: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
77
|
+
/** Update the body of a comment on a GitHub issue. Requires approval by default. */
|
|
78
|
+
declare const updateIssueComment: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
79
|
+
/** Delete a comment from a GitHub issue permanently. Requires approval by default. */
|
|
80
|
+
declare const deleteIssueComment: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
81
|
+
/** List labels available in a GitHub repository. */
|
|
82
|
+
declare const listLabels: (token: GithubTokenInput) => GithubTool;
|
|
83
|
+
/** Add labels to an issue or pull request. Requires approval by default. */
|
|
84
|
+
declare const addLabels: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
85
|
+
/** Remove a label from an issue or pull request. Requires approval by default. */
|
|
86
|
+
declare const removeLabel: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
87
|
+
/** Create a label in a GitHub repository. Requires approval by default. */
|
|
88
|
+
declare const createLabel: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
89
|
+
/** Update a label in a GitHub repository. Requires approval by default. */
|
|
90
|
+
declare const updateLabel: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
91
|
+
/** Delete a label from a GitHub repository permanently. Requires approval by default. */
|
|
92
|
+
declare const deleteLabel: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
93
|
+
/** Assign users to an issue or pull request. Requires approval by default. */
|
|
94
|
+
declare const addAssignees: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
95
|
+
/** Remove assignees from an issue or pull request. Requires approval by default. */
|
|
96
|
+
declare const removeAssignees: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
97
|
+
//#endregion
|
|
98
|
+
//#region src/tools/reactions.d.ts
|
|
99
|
+
/** List reactions on an issue or pull request conversation. */
|
|
100
|
+
declare const listIssueReactions: (token: GithubTokenInput) => GithubTool;
|
|
101
|
+
/** React to an issue or pull request with an emoji. Requires approval by default. */
|
|
102
|
+
declare const addIssueReaction: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
103
|
+
/** List reactions on an issue or pull request comment. */
|
|
104
|
+
declare const listCommentReactions: (token: GithubTokenInput) => GithubTool;
|
|
105
|
+
/** React to an issue or pull request comment with an emoji. Requires approval by default. */
|
|
106
|
+
declare const addCommentReaction: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
107
|
+
//#endregion
|
|
108
|
+
//#region src/tools/discussions.d.ts
|
|
109
|
+
/** List discussions in a repository, optionally filtered by category. */
|
|
110
|
+
declare const listDiscussions: (token: GithubTokenInput) => GithubTool;
|
|
111
|
+
/** Get a discussion by number. */
|
|
112
|
+
declare const getDiscussion: (token: GithubTokenInput) => GithubTool;
|
|
113
|
+
/** Add a comment to a discussion. Requires approval by default. */
|
|
114
|
+
declare const addDiscussionComment: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
115
|
+
//#endregion
|
|
116
|
+
//#region src/tools/notifications.d.ts
|
|
117
|
+
/** List notification threads for the authenticated user. */
|
|
118
|
+
declare const listNotifications: (token: GithubTokenInput) => GithubTool;
|
|
119
|
+
/** Mark a notification thread as read. Requires approval by default. */
|
|
120
|
+
declare const markNotificationRead: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
121
|
+
//#endregion
|
|
122
|
+
//#region src/tools/search.d.ts
|
|
123
|
+
/** Search for code in GitHub repositories. Use qualifiers like "repo:owner/name" to scope the search. Results include matching text snippets when GitHub returns them. */
|
|
124
|
+
declare const searchCode: (token: GithubTokenInput) => GithubTool;
|
|
125
|
+
/** Search for GitHub repositories by keyword, topic, language, or other qualifiers. */
|
|
126
|
+
declare const searchRepositories: (token: GithubTokenInput) => GithubTool;
|
|
127
|
+
/** Search for issues and pull requests across GitHub using search qualifiers like "repo:owner/name is:open". */
|
|
128
|
+
declare const searchIssues: (token: GithubTokenInput) => GithubTool;
|
|
129
|
+
//#endregion
|
|
130
|
+
//#region src/tools/commits.d.ts
|
|
131
|
+
/** List commits for a GitHub repository. Filter by file path to see commits that touched a file. */
|
|
132
|
+
declare const listCommits: (token: GithubTokenInput) => GithubTool;
|
|
133
|
+
/** Get detailed information about a specific commit. Patches omitted by default. */
|
|
134
|
+
declare const getCommit: (token: GithubTokenInput) => GithubTool;
|
|
135
|
+
/** Line-level git blame for a file at a commit-like ref (branch, tag, or SHA). */
|
|
136
|
+
declare const getBlame: (token: GithubTokenInput) => GithubTool;
|
|
137
|
+
/** Compare two branches, tags, or commits. Patches omitted by default. */
|
|
138
|
+
declare const compareCommits: (token: GithubTokenInput) => GithubTool;
|
|
139
|
+
//#endregion
|
|
140
|
+
//#region src/tools/gists.d.ts
|
|
141
|
+
/** List gists for the authenticated user or a specific user. */
|
|
142
|
+
declare const listGists: (token: GithubTokenInput) => GithubTool;
|
|
143
|
+
/** Get a gist by ID, including file contents. */
|
|
144
|
+
declare const getGist: (token: GithubTokenInput) => GithubTool;
|
|
145
|
+
/** List comments on a gist. */
|
|
146
|
+
declare const listGistComments: (token: GithubTokenInput) => GithubTool;
|
|
147
|
+
/** Create a new gist with one or more files. Requires approval by default. */
|
|
148
|
+
declare const createGist: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
149
|
+
/** Update an existing gist. Requires approval by default. */
|
|
150
|
+
declare const updateGist: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
151
|
+
/** Delete a gist permanently. Requires approval by default. */
|
|
152
|
+
declare const deleteGist: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
153
|
+
/** Add a comment to a gist. Requires approval by default. */
|
|
154
|
+
declare const createGistComment: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
155
|
+
//#endregion
|
|
156
|
+
//#region src/tools/workflows.d.ts
|
|
157
|
+
/** List GitHub Actions workflows in a repository. */
|
|
158
|
+
declare const listWorkflows: (token: GithubTokenInput) => GithubTool;
|
|
159
|
+
/** List workflow runs for a repository, optionally filtered by workflow, branch, status, or event. */
|
|
160
|
+
declare const listWorkflowRuns: (token: GithubTokenInput) => GithubTool;
|
|
161
|
+
/** Get details of a specific workflow run including status, timing, and trigger info. */
|
|
162
|
+
declare const getWorkflowRun: (token: GithubTokenInput) => GithubTool;
|
|
163
|
+
/** List jobs for a workflow run, including step-level status and timing. */
|
|
164
|
+
declare const listWorkflowJobs: (token: GithubTokenInput) => GithubTool;
|
|
165
|
+
/** Get the log output of a workflow job, tail-truncated with timestamps stripped. */
|
|
166
|
+
declare const getWorkflowJobLogs: (token: GithubTokenInput) => GithubTool;
|
|
167
|
+
/** Trigger a workflow via workflow_dispatch event. Requires approval by default. */
|
|
168
|
+
declare const triggerWorkflow: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
169
|
+
/** Cancel an in-progress workflow run. Requires approval by default. */
|
|
170
|
+
declare const cancelWorkflowRun: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
171
|
+
/** Re-run a workflow run, optionally only the failed jobs. Requires approval by default. */
|
|
172
|
+
declare const rerunWorkflowRun: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
173
|
+
//#endregion
|
|
174
|
+
//#region src/tools/checks.d.ts
|
|
175
|
+
/** List check runs (Checks API — GitHub Actions and other CI providers) for a commit, branch, or tag. */
|
|
176
|
+
declare const listCheckRuns: (token: GithubTokenInput) => GithubTool;
|
|
177
|
+
/** Get the combined commit status (Statuses API — legacy CI integrations) for a commit, branch, or tag. */
|
|
178
|
+
declare const getCombinedStatus: (token: GithubTokenInput) => GithubTool;
|
|
179
|
+
//#endregion
|
|
180
|
+
//#region src/tools/releases.d.ts
|
|
181
|
+
/** List releases for a GitHub repository, newest first (includes drafts and prereleases). */
|
|
182
|
+
declare const listReleases: (token: GithubTokenInput) => GithubTool;
|
|
183
|
+
/** Get the latest published release for a GitHub repository (excludes drafts and prereleases). */
|
|
184
|
+
declare const getLatestRelease: (token: GithubTokenInput) => GithubTool;
|
|
185
|
+
/** Get a specific release by ID, including its assets. */
|
|
186
|
+
declare const getRelease: (token: GithubTokenInput) => GithubTool;
|
|
187
|
+
/** Create a new release (and its tag if needed) in a GitHub repository. Requires approval by default. */
|
|
188
|
+
declare const createRelease: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
189
|
+
/** Update an existing release — tag, target, title, notes, draft, or prerelease status. Requires approval by default. */
|
|
190
|
+
declare const updateRelease: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
191
|
+
/** Delete a release permanently. Requires approval by default. */
|
|
192
|
+
declare const deleteRelease: (token: GithubTokenInput, { needsApproval }?: ToolOptions) => GithubTool;
|
|
193
|
+
//#endregion
|
|
194
|
+
//#region src/tools/bundles.d.ts
|
|
195
|
+
/** Fetch pull request details plus files, reviews, and optional CI checks in one call. */
|
|
196
|
+
declare const getPullRequestContext: (token: GithubTokenInput) => GithubTool;
|
|
197
|
+
/** Fetch an issue plus available label names and recent comments in one call. */
|
|
198
|
+
declare const getIssueContext: (token: GithubTokenInput) => GithubTool;
|
|
199
|
+
/** Fetch a release plus the previous release and tag comparison in one call. */
|
|
200
|
+
declare const getReleaseContext: (token: GithubTokenInput) => GithubTool;
|
|
201
|
+
/** Diagnose CI failures for a ref — combined status, failing checks, and failed workflow jobs. */
|
|
202
|
+
declare const getCiFailureContext: (token: GithubTokenInput) => GithubTool;
|
|
203
|
+
//#endregion
|
|
204
|
+
//#region src/core/rate-limit.d.ts
|
|
205
|
+
/**
|
|
206
|
+
* GitHub REST/GraphQL rate-limit snapshot from the last request in a tool call.
|
|
207
|
+
* Present on object-shaped execute results; stripped before the model sees the output.
|
|
208
|
+
*/
|
|
209
|
+
type GithubRateLimit = {
|
|
210
|
+
remaining: number;
|
|
211
|
+
limit: number;
|
|
212
|
+
reset: number;
|
|
213
|
+
resource?: string;
|
|
214
|
+
retryAfter?: number;
|
|
215
|
+
};
|
|
216
|
+
//#endregion
|
|
217
|
+
//#region src/agents.d.ts
|
|
218
|
+
type AgentOptions = Omit<ToolLoopAgentSettings<ToolSet>, 'model' | 'tools' | 'instructions'>;
|
|
219
|
+
type CreateGithubAgentOptions = AgentOptions & GithubToolsBaseOptions & {
|
|
220
|
+
model: ToolLoopAgentSettings<ToolSet>['model'];
|
|
221
|
+
/**
|
|
222
|
+
* Restrict tools and system prompt to a predefined preset.
|
|
223
|
+
*
|
|
224
|
+
* Selects a subset of tools and, when a single preset is passed,
|
|
225
|
+
* sets a matching system prompt. Combine presets with an array to merge tool sets.
|
|
226
|
+
*
|
|
227
|
+
* @see {@link GithubToolPreset} for available presets and included tools.
|
|
228
|
+
*/
|
|
229
|
+
preset?: GithubToolPreset | GithubToolPreset[];
|
|
230
|
+
/**
|
|
231
|
+
* Fully replace the default system prompt.
|
|
232
|
+
* When set, `preset` system prompts and `additionalInstructions` are ignored.
|
|
233
|
+
* `context` is still appended when provided.
|
|
234
|
+
*/
|
|
235
|
+
instructions?: string;
|
|
236
|
+
/**
|
|
237
|
+
* Append text to the preset-specific (or default) system prompt.
|
|
238
|
+
* Ignored when `instructions` is set.
|
|
239
|
+
*/
|
|
240
|
+
additionalInstructions?: string;
|
|
241
|
+
};
|
|
242
|
+
declare function createGithubAgent(options: CreateGithubAgentOptions & {
|
|
243
|
+
preset?: undefined;
|
|
244
|
+
}): ToolLoopAgent<never, AllGithubTools>;
|
|
245
|
+
declare function createGithubAgent<P extends GithubToolPreset>(options: CreateGithubAgentOptions & {
|
|
246
|
+
preset: P;
|
|
247
|
+
}): ToolLoopAgent<never, Pick<AllGithubTools, PresetToolName<P>>>;
|
|
248
|
+
declare function createGithubAgent<P extends readonly GithubToolPreset[]>(options: CreateGithubAgentOptions & {
|
|
249
|
+
preset: P;
|
|
250
|
+
}): ToolLoopAgent<never, Pick<AllGithubTools, CombinedPresetToolNames<P>>>;
|
|
251
|
+
//#endregion
|
|
252
|
+
//#region src/index.d.ts
|
|
253
|
+
type GithubToolsOptions = GithubToolsBaseOptions & {
|
|
254
|
+
/**
|
|
255
|
+
* Restrict the returned tools to a predefined preset.
|
|
256
|
+
* Prefer a focused preset for most agents. Omit or use `maintainer` for the full catalog.
|
|
257
|
+
*
|
|
258
|
+
* @see {@link GithubToolPreset} for available presets and included tools.
|
|
259
|
+
*
|
|
260
|
+
* @example
|
|
261
|
+
* ```ts
|
|
262
|
+
* // Only code-review tools
|
|
263
|
+
* createGithubTools({ token, preset: 'code-review' })
|
|
264
|
+
*
|
|
265
|
+
* // Combine presets
|
|
266
|
+
* createGithubTools({ token, preset: ['code-review', 'issue-triage'] })
|
|
267
|
+
*
|
|
268
|
+
* // Full catalog
|
|
269
|
+
* createGithubTools({ token, preset: 'maintainer' })
|
|
270
|
+
* ```
|
|
271
|
+
*/
|
|
272
|
+
preset?: GithubToolPreset | GithubToolPreset[];
|
|
273
|
+
};
|
|
274
|
+
declare function createGithubTools(options?: GithubToolsBaseOptions & {
|
|
275
|
+
preset?: undefined;
|
|
276
|
+
}): AllGithubTools;
|
|
277
|
+
declare function createGithubTools<P extends GithubToolPreset>(options: GithubToolsBaseOptions & {
|
|
278
|
+
preset: P;
|
|
279
|
+
}): Pick<AllGithubTools, PresetToolName<P>>;
|
|
280
|
+
declare function createGithubTools<P extends readonly GithubToolPreset[]>(options: GithubToolsBaseOptions & {
|
|
281
|
+
preset: P;
|
|
282
|
+
}): Pick<AllGithubTools, CombinedPresetToolNames<P>>;
|
|
283
|
+
declare function createGithubTools(options?: GithubToolsOptions): AllGithubTools | Pick<AllGithubTools, GithubToolName>;
|
|
284
|
+
type GithubTools = AllGithubTools & ToolSet;
|
|
285
|
+
//#endregion
|
|
286
|
+
export { closeIssue as $, getGist as A, createRepository as At, searchRepositories as B, listWorkflowRuns as C, replyToReviewComment as Ct, createGist as D, updatePullRequestComment as Dt, triggerWorkflow as E, updatePullRequest as Et, getBlame as F, getRepositoryTree as Ft, listDiscussions as G, markNotificationRead as H, getCommit as I, listBranches as It, listCommentReactions as J, addCommentReaction as K, listCommits as L, createOctokit as Lt, listGists as M, forkRepository as Mt, updateGist as N, getFileContent as Nt, createGistComment as O, createBranch as Ot, compareCommits as P, getRepository as Pt, addLabels as Q, searchCode as R, listWorkflowJobs as S, mergePullRequest as St, rerunWorkflowRun as T, resolveReviewThread as Tt, addDiscussionComment as U, listNotifications as V, getDiscussion as W, addAssignees as X, listIssueReactions as Y, addIssueComment as Z, getCombinedStatus as _, getPullRequest as _t, createGithubAgent as a, listIssueComments as at, getWorkflowJobLogs as b, listPullRequestReviews as bt, getIssueContext as c, removeAssignees as ct, createRelease as d, updateIssueComment as dt, createIssue as et, deleteRelease as f, updateLabel as ft, updateRelease as g, deletePullRequestComment as gt, listReleases as h, createPullRequestReview as ht, CreateGithubAgentOptions as i, getIssue as it, listGistComments as j, deleteBranch as jt, deleteGist as k, createOrUpdateFile as kt, getPullRequestContext as l, removeLabel as lt, getRelease as m, createPullRequest as mt, GithubToolsOptions as n, deleteIssueComment as nt, GithubRateLimit as o, listIssues as ot, getLatestRelease as p, addPullRequestComment as pt, addIssueReaction as q, createGithubTools as r, deleteLabel as rt, getCiFailureContext as s, listLabels as st, GithubTools as t, createLabel as tt, getReleaseContext as u, updateIssue as ut, listCheckRuns as v, listPullRequestFiles as vt, listWorkflows as w, requestReviewers as wt, getWorkflowRun as x, listPullRequests as xt, cancelWorkflowRun as y, listPullRequestReviewThreads as yt, searchIssues as z };
|
|
287
|
+
//# sourceMappingURL=index-PqQNoVuw.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-PqQNoVuw.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/agents.ts","../src/index.ts"],"mappings":";;;;iBAiBgB,cAAc,gBAAgB;;;;cC0BjC,gBAAiB,OAAO,qBAAmB;;cAa3C,eAAgB,OAAO,qBAAmB;;cAa1C,iBAAkB,OAAO,qBAAmB;;cAc5C,oBAAqB,OAAO,qBAAmB;;cAc/C,eAAgB,OAAO,oBAAkB,kBAA0B,gBAAmB;;cActF,eAAgB,OAAO,oBAAkB,kBAA0B,gBAAmB;;cActF,iBAAkB,OAAO,oBAAkB,kBAA0B,gBAAmB;;cAcxF,mBAAoB,OAAO,oBAAkB,kBAA0B,gBAAmB;;cAc1F,qBACX,OAAO,oBACP,eAAA,QAAA,WAAA,cAAwD,sBACvD;;;KCxGS,mBAAmB;EAC7B,YAAY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@ -1,2 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
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 closeIssue, A as getGist, At as createRepository, B as searchRepositories, C as listWorkflowRuns, Ct as replyToReviewComment, D as createGist, Dt as updatePullRequestComment, E as triggerWorkflow, Et as updatePullRequest, F as getBlame, Ft as getRepositoryTree, G as listDiscussions, H as markNotificationRead, I as getCommit, It as listBranches, J as listCommentReactions, K as addCommentReaction, L as listCommits, Lt as createOctokit, M as listGists, Mt as forkRepository, N as updateGist, Nt as getFileContent, O as createGistComment, Ot as createBranch, P as compareCommits, Pt as getRepository, Q as addLabels, R as searchCode, S as listWorkflowJobs, St as mergePullRequest, T as rerunWorkflowRun, Tt as resolveReviewThread, U as addDiscussionComment, V as listNotifications, W as getDiscussion, X as addAssignees, Y as listIssueReactions, Z as addIssueComment, _ as getCombinedStatus, _t as getPullRequest, a as createGithubAgent, at as listIssueComments, b as getWorkflowJobLogs, bt as listPullRequestReviews, c as getIssueContext, ct as removeAssignees, d as createRelease, dt as updateIssueComment, et as createIssue, f as deleteRelease, ft as updateLabel, g as updateRelease, gt as deletePullRequestComment, h as listReleases, ht as createPullRequestReview, i as CreateGithubAgentOptions, it as getIssue, j as listGistComments, jt as deleteBranch, k as deleteGist, kt as createOrUpdateFile, l as getPullRequestContext, lt as removeLabel, m as getRelease, mt as createPullRequest, n as GithubToolsOptions, nt as deleteIssueComment, o as GithubRateLimit, ot as listIssues, p as getLatestRelease, pt as addPullRequestComment, q as addIssueReaction, r as createGithubTools, rt as deleteLabel, s as getCiFailureContext, st as listLabels, t as GithubTools, tt as createLabel, u as getReleaseContext, ut as updateIssue, v as listCheckRuns, vt as listPullRequestFiles, w as listWorkflows, wt as requestReviewers, x as getWorkflowRun, xt as listPullRequests, y as cancelWorkflowRun, yt as listPullRequestReviewThreads, z as searchIssues } from "./index-PqQNoVuw.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, 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 {
|
|
2
|
-
import { $ as
|
|
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, deleteGist, deleteIssueComment, deleteLabel, deletePullRequestComment, deleteRelease, forkRepository, getBlame, getCiFailureContext, getCombinedStatus, getCommit, getDiscussion, getFileContent, getGist, getIssue, getIssueContext, getLatestRelease, getPullRequest, getPullRequestContext, getRelease, getReleaseContext, getRepository, getRepositoryTree, getWorkflowRun, listBranches, listCheckRuns, listCommentReactions, listCommits, listDiscussions, listGistComments, listGists, listIssueComments, listIssueReactions, listIssues, listLabels, listNotifications, listPullRequestFiles, listPullRequestReviews, listPullRequests, listReleases, listWorkflowJobs, listWorkflowRuns, listWorkflows, markNotificationRead, mergePullRequest, removeAssignees, removeLabel, requestReviewers, rerunWorkflowRun, resolveGithubToken, searchCode, searchIssues, searchRepositories, triggerWorkflow, updateGist, updateIssue, updateIssueComment, updateLabel, updatePullRequest, updatePullRequestComment, updateRelease };
|
|
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-Ct0ZV87Z.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-D9WxaIVj.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, 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 };
|