{"version":3,"file":"eve.mjs","names":[],"sources":["../src/eve.ts"],"sourcesContent":["/**\n * Legacy eve registration for `agent/tools/` (direct import).\n *\n * Prefer `@github-tools/eve-extension` for new agents. Shared runtime helpers\n * used by the extension live on `@github-tools/sdk/eve-runtime` — import those\n * from there rather than this subpath.\n */\n\nimport { buildEveToolDefinition, createEveGithubToolsDynamic } from './eve/build'\nimport type { EveToolFactoryOptions } from './eve/types'\n\nexport {\n  buildEveToolDefinition,\n  buildEveToolMap,\n  createEveGithubToolsDynamic,\n  listResolvedEveToolNames,\n  listEveToolDescriptors,\n  executeGithubEveTool,\n  mapEveApprovalValue,\n  resolveEveApproval,\n  resolveEveToolApproval,\n  isEveApprovalDisabled,\n  PRESET_TOOLS,\n  GITHUB_TOOL_NAMES,\n  GITHUB_WRITE_TOOLS,\n  MISSING_EVE_MESSAGE,\n} from './eve-runtime'\nexport type {\n  EveApprovalConfig,\n  EveApprovalValue,\n  EveGithubToolsOptions,\n  EveToolFactoryOptions,\n  EveToolOverrides,\n  GithubToolPreset,\n  PresetToolName,\n  CombinedPresetToolNames,\n  GithubToolName,\n  GithubWriteToolName,\n  AllGithubTools,\n  GithubToolsForPreset,\n  PickGithubTools,\n  CommitIdentity,\n} from './eve-runtime'\n\n/**\n * Register all GitHub tools (or a preset subset) as eve dynamic capabilities.\n *\n * Export as the default from `agent/tools/github.ts`:\n *\n * ```ts\n * import { createGithubTools } from '@github-tools/sdk/eve'\n * export default createGithubTools({ preset: 'code-review' })\n * ```\n *\n * @deprecated Use the mountable `@github-tools/eve-extension` (`githubExtension`) instead — it is now the\n * recommended way to add GitHub tools to an eve agent. This direct import keeps working but is no longer\n * the recommended path. See https://github-tools.com/frameworks/eve-extension.\n */\nexport function createGithubTools(options?: import('./eve/types').EveGithubToolsOptions) {\n  return createEveGithubToolsDynamic(options ?? {})\n}\n\nfunction factory(name: Parameters<typeof buildEveToolDefinition>[0]) {\n  return (options?: EveToolFactoryOptions) => buildEveToolDefinition(name, options)\n}\n\n/**\n * Get information about a GitHub repository including description, stars, forks, language, and default branch.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const getRepository = factory('getRepository')\n/**\n * List branches in a GitHub repository.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const listBranches = factory('listBranches')\n/**\n * Get the content of a file from a GitHub repository.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const getFileContent = factory('getFileContent')\n/**\n * Create a new branch in a GitHub repository from an existing branch or commit SHA. Requires approval by default.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const createBranch = factory('createBranch')\n/**\n * Fork a GitHub repository to the authenticated user account or a specified organization. Requires approval by default.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const forkRepository = factory('forkRepository')\n/**\n * Create a new GitHub repository for the authenticated user or a specified organization. Requires approval by default.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const createRepository = factory('createRepository')\n/**\n * Create or update a file in a GitHub repository. Provide the SHA when updating an existing file. Requires approval by default.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const createOrUpdateFile = factory('createOrUpdateFile')\n/**\n * List pull requests for a GitHub repository.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const listPullRequests = factory('listPullRequests')\n/**\n * Get detailed information about a specific pull request.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const getPullRequest = factory('getPullRequest')\n/**\n * Create a new pull request in a GitHub repository. Requires approval by default.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const createPullRequest = factory('createPullRequest')\n/**\n * Merge a pull request. Requires approval by default.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const mergePullRequest = factory('mergePullRequest')\n/**\n * Add a comment to a pull request. Requires approval by default.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const addPullRequestComment = factory('addPullRequestComment')\n/**\n * List files changed in a pull request, including diff status and patch content.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const listPullRequestFiles = factory('listPullRequestFiles')\n/**\n * List reviews on a pull request (approvals, change requests, and comments).\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const listPullRequestReviews = factory('listPullRequestReviews')\n/**\n * Submit a pull request review with optional inline comments. Requires approval by default.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const createPullRequestReview = factory('createPullRequestReview')\n/**\n * Fetch pull request details plus files, reviews, and optional CI checks in one call.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const getPullRequestContext = factory('getPullRequestContext')\n/**\n * Fetch an issue plus available label names and recent comments in one call.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const getIssueContext = factory('getIssueContext')\n/**\n * List issues for a GitHub repository (excludes pull requests).\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const listIssues = factory('listIssues')\n/**\n * Get detailed information about a specific issue.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const getIssue = factory('getIssue')\n/**\n * List comments on a GitHub issue. Prefer getIssueContext for the first page when triaging.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const listIssueComments = factory('listIssueComments')\n/**\n * Create a new issue in a GitHub repository. Requires approval by default.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const createIssue = factory('createIssue')\n/**\n * Add a comment to a GitHub issue. Requires approval by default.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const addIssueComment = factory('addIssueComment')\n/**\n * Close an open GitHub issue. Requires approval by default.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const closeIssue = factory('closeIssue')\n/**\n * List labels available in a GitHub repository.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const listLabels = factory('listLabels')\n/**\n * Add labels to an issue or pull request. Requires approval by default.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const addLabels = factory('addLabels')\n/**\n * Remove a label from an issue or pull request. Requires approval by default.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const removeLabel = factory('removeLabel')\n/**\n * Create a label in a GitHub repository. Requires approval by default.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const createLabel = factory('createLabel')\n/**\n * Update a label in a GitHub repository. Requires approval by default.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const updateLabel = factory('updateLabel')\n/**\n * Delete a label from a GitHub repository permanently. Requires approval by default.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const deleteLabel = factory('deleteLabel')\n/**\n * Search for code in GitHub repositories. Use qualifiers like \"repo:owner/name\" to scope the search.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const searchCode = factory('searchCode')\n/**\n * Search for GitHub repositories by keyword, topic, language, or other qualifiers.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const searchRepositories = factory('searchRepositories')\n/**\n * List commits for a GitHub repository. Filter by file path to see commits that touched a file.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const listCommits = factory('listCommits')\n/**\n * Get detailed information about a specific commit, including files changed with additions and deletions.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const getCommit = factory('getCommit')\n/**\n * Line-level git blame for a file at a commit-like ref (branch, tag, or SHA).\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const getBlame = factory('getBlame')\n/**\n * List gists for the authenticated user or a specific user.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const listGists = factory('listGists')\n/**\n * Get a gist by ID, including file contents.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const getGist = factory('getGist')\n/**\n * List comments on a gist.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const listGistComments = factory('listGistComments')\n/**\n * Create a new gist with one or more files. Requires approval by default.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const createGist = factory('createGist')\n/**\n * Update an existing gist. Requires approval by default.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const updateGist = factory('updateGist')\n/**\n * Delete a gist permanently. Requires approval by default.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const deleteGist = factory('deleteGist')\n/**\n * Add a comment to a gist. Requires approval by default.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const createGistComment = factory('createGistComment')\n/**\n * List GitHub Actions workflows in a repository.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const listWorkflows = factory('listWorkflows')\n/**\n * List workflow runs for a repository, optionally filtered by workflow, branch, status, or event.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const listWorkflowRuns = factory('listWorkflowRuns')\n/**\n * Get details of a specific workflow run including status, timing, and trigger info.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const getWorkflowRun = factory('getWorkflowRun')\n/**\n * List jobs for a workflow run, including step-level status and timing.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const listWorkflowJobs = factory('listWorkflowJobs')\n/**\n * Trigger a workflow via workflow_dispatch event. Requires approval by default.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const triggerWorkflow = factory('triggerWorkflow')\n/**\n * Cancel an in-progress workflow run. Requires approval by default.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const cancelWorkflowRun = factory('cancelWorkflowRun')\n/**\n * Re-run a workflow run, optionally only the failed jobs. Requires approval by default.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const rerunWorkflowRun = factory('rerunWorkflowRun')\n/**\n * Diagnose CI failures for a ref — combined status, failing checks, and failed workflow jobs in one call.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const getCiFailureContext = factory('getCiFailureContext')\n/**\n * Fetch a release plus the previous release and tag comparison in one call.\n *\n * @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`\n * instead. See https://github-tools.com/frameworks/eve-extension.\n */\nexport const getReleaseContext = factory('getReleaseContext')\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA0DA,SAAgB,kBAAkB,SAAuD;CACvF,OAAO,4BAA4B,WAAW,CAAC,CAAC;AAClD;AAEA,SAAS,QAAQ,MAAoD;CACnE,QAAQ,YAAoC,uBAAuB,MAAM,OAAO;AAClF;;;;;;;AAQA,MAAa,gBAAgB,QAAQ,eAAe;;;;;;;AAOpD,MAAa,eAAe,QAAQ,cAAc;;;;;;;AAOlD,MAAa,iBAAiB,QAAQ,gBAAgB;;;;;;;AAOtD,MAAa,eAAe,QAAQ,cAAc;;;;;;;AAOlD,MAAa,iBAAiB,QAAQ,gBAAgB;;;;;;;AAOtD,MAAa,mBAAmB,QAAQ,kBAAkB;;;;;;;AAO1D,MAAa,qBAAqB,QAAQ,oBAAoB;;;;;;;AAO9D,MAAa,mBAAmB,QAAQ,kBAAkB;;;;;;;AAO1D,MAAa,iBAAiB,QAAQ,gBAAgB;;;;;;;AAOtD,MAAa,oBAAoB,QAAQ,mBAAmB;;;;;;;AAO5D,MAAa,mBAAmB,QAAQ,kBAAkB;;;;;;;AAO1D,MAAa,wBAAwB,QAAQ,uBAAuB;;;;;;;AAOpE,MAAa,uBAAuB,QAAQ,sBAAsB;;;;;;;AAOlE,MAAa,yBAAyB,QAAQ,wBAAwB;;;;;;;AAOtE,MAAa,0BAA0B,QAAQ,yBAAyB;;;;;;;AAOxE,MAAa,wBAAwB,QAAQ,uBAAuB;;;;;;;AAOpE,MAAa,kBAAk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