Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions .changeset/eve-attribution.md

This file was deleted.

21 changes: 0 additions & 21 deletions .changeset/failed-calls-settle-as-failed.md

This file was deleted.

44 changes: 44 additions & 0 deletions packages/github-tools-eve-extension/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,49 @@
# @github-tools/eve-extension

## 0.14.0

### Minor Changes

- [#270](https://github.com/vercel-labs/github-tools/pull/270) [`052eda9`](https://github.com/vercel-labs/github-tools/commit/052eda9901e4231eaa57068eef576d8604e8e7f4) Thanks [@HugoRCD](https://github.com/HugoRCD)! - Credit the GitHub App on pull requests and commits that run with a person's token.

With `actAs: 'user'`, or `'caller'` and a signed-in user, GitHub records the person as the author of what the agent writes. The extension now credits the App by default:

- `createPullRequest` ends the body with `Generated by [<app>](https://github.com/apps/<app>).`
- `createOrUpdateFile`, `editFiles`, `mergePullRequest` and `enablePullRequestAutoMerge` add the App's bot account to `coAuthors`, as `Co-authored-by: <app>[bot] <id+<app>[bot]@users.noreply.github.com>`.

The App is read from the person's token, so the connector must be backed by a GitHub App. Calls that run as the App add nothing. Turn it off or pick one credit with `attribution`:

```ts
export default githubExtension({
connector: 'github/my-connector',
actAs: 'caller',
attribution: false, // or { footer: true, coAuthor: false }
})
```

`@github-tools/sdk/eve-runtime` exports the pieces: `githubAppBot(token)` reads the App behind a user token, `githubAppBotIdentity(bot)` returns its commit identity, `withGithubAppFooter(body, bot)` adds the footer, and `GITHUB_COMMIT_TOOLS` lists the tools that take `coAuthors`. A user token that GitHub lists no installation to fails with `github_tools.APP_BOT_UNKNOWN`.

### Patch Changes

- [#253](https://github.com/vercel-labs/github-tools/pull/253) [`0d813ba`](https://github.com/vercel-labs/github-tools/commit/0d813bab14a3a7ec6ad28aded643496cdfe21d39) Thanks [@HugoRCD](https://github.com/HugoRCD)! - Report a failed GitHub call as failed in eve.

A tool whose GitHub request failed used to return `{ error }`, so eve recorded the call as `completed`. The tool now throws, and `call.settled` reports `outcome: 'failed'`. For an error from the [catalog](https://github-tools.com/errors), its `error.code` is the catalog code, such as `github_tools.NOT_FOUND`.

What changes for an agent:

- **Evals.** An eval that uses `noFailedCalls()` can start failing where it passed, and a failed tool call's `status` is `failed` where it was `completed`.
- **Hooks and instrumentation.** Code that reads `call.settled` sees the failure without parsing the output. The output is the error's message as a string, where it was `{ error }`.
- **The model.** It still gets a tool result for the call, marked as an error. The text is `Error: ` followed by the same `{ code, message, why, fix, link }` as JSON, without the `{ error }` wrapper. For an error outside the catalog, it is the error's name and message.
- **Labels.** A failed write keeps its start label, such as "Create issue on owner/repo". The "Couldn't create issue on owner/repo" label is gone, because eve doesn't run `label.complete` for a failed call.
- **`toModelOutput` overrides.** eve doesn't run `toModelOutput` for a failed call, so an override no longer receives `{ error }`.
- **Logs.** eve logs each failed call as `tool execution failed`, with the error and, for a catalog error, a `cause` that holds its code and HTTP status. The thrown error holds nothing from the GitHub request, so the log has no URL, headers, or body.

A write that `guardrails` block throws too. `getBlame`, `listDiscussions`, `getDiscussion`, `addDiscussionComment`, `listPullRequestReviewThreads`, and `resolveReviewThread` returned `{ error }` when GitHub had no such repository, discussion, or thread, and now throw in eve with that message. A `dryRun` write still returns its result.

`executeGithubEveTool` from `@github-tools/sdk/eve-runtime` and the tools from the deprecated `@github-tools/sdk/eve` throw the same way. The AI SDK, TanStack, and Workflow tools are unchanged.
- Updated dependencies [[`052eda9`](https://github.com/vercel-labs/github-tools/commit/052eda9901e4231eaa57068eef576d8604e8e7f4), [`0d813ba`](https://github.com/vercel-labs/github-tools/commit/0d813bab14a3a7ec6ad28aded643496cdfe21d39)]:
- @github-tools/sdk@1.23.0

## 0.13.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/github-tools-eve-extension/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@github-tools/eve-extension",
"version": "0.13.0",
"version": "0.14.0",
"description": "GitHub tools for eve, distributed as a mountable eve extension (https://eve.dev/docs/extensions)",
"author": "HugoRCD <hugo.richard@vercel.com>",
"repository": {
Expand Down
42 changes: 42 additions & 0 deletions packages/github-tools/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,47 @@
# @github-tools/sdk

## 1.23.0

### Minor Changes

- [#270](https://github.com/vercel-labs/github-tools/pull/270) [`052eda9`](https://github.com/vercel-labs/github-tools/commit/052eda9901e4231eaa57068eef576d8604e8e7f4) Thanks [@HugoRCD](https://github.com/HugoRCD)! - Credit the GitHub App on pull requests and commits that run with a person's token.

With `actAs: 'user'`, or `'caller'` and a signed-in user, GitHub records the person as the author of what the agent writes. The extension now credits the App by default:

- `createPullRequest` ends the body with `Generated by [<app>](https://github.com/apps/<app>).`
- `createOrUpdateFile`, `editFiles`, `mergePullRequest` and `enablePullRequestAutoMerge` add the App's bot account to `coAuthors`, as `Co-authored-by: <app>[bot] <id+<app>[bot]@users.noreply.github.com>`.

The App is read from the person's token, so the connector must be backed by a GitHub App. Calls that run as the App add nothing. Turn it off or pick one credit with `attribution`:

```ts
export default githubExtension({
connector: 'github/my-connector',
actAs: 'caller',
attribution: false, // or { footer: true, coAuthor: false }
})
```

`@github-tools/sdk/eve-runtime` exports the pieces: `githubAppBot(token)` reads the App behind a user token, `githubAppBotIdentity(bot)` returns its commit identity, `withGithubAppFooter(body, bot)` adds the footer, and `GITHUB_COMMIT_TOOLS` lists the tools that take `coAuthors`. A user token that GitHub lists no installation to fails with `github_tools.APP_BOT_UNKNOWN`.

### Patch Changes

- [#253](https://github.com/vercel-labs/github-tools/pull/253) [`0d813ba`](https://github.com/vercel-labs/github-tools/commit/0d813bab14a3a7ec6ad28aded643496cdfe21d39) Thanks [@HugoRCD](https://github.com/HugoRCD)! - Report a failed GitHub call as failed in eve.

A tool whose GitHub request failed used to return `{ error }`, so eve recorded the call as `completed`. The tool now throws, and `call.settled` reports `outcome: 'failed'`. For an error from the [catalog](https://github-tools.com/errors), its `error.code` is the catalog code, such as `github_tools.NOT_FOUND`.

What changes for an agent:

- **Evals.** An eval that uses `noFailedCalls()` can start failing where it passed, and a failed tool call's `status` is `failed` where it was `completed`.
- **Hooks and instrumentation.** Code that reads `call.settled` sees the failure without parsing the output. The output is the error's message as a string, where it was `{ error }`.
- **The model.** It still gets a tool result for the call, marked as an error. The text is `Error: ` followed by the same `{ code, message, why, fix, link }` as JSON, without the `{ error }` wrapper. For an error outside the catalog, it is the error's name and message.
- **Labels.** A failed write keeps its start label, such as "Create issue on owner/repo". The "Couldn't create issue on owner/repo" label is gone, because eve doesn't run `label.complete` for a failed call.
- **`toModelOutput` overrides.** eve doesn't run `toModelOutput` for a failed call, so an override no longer receives `{ error }`.
- **Logs.** eve logs each failed call as `tool execution failed`, with the error and, for a catalog error, a `cause` that holds its code and HTTP status. The thrown error holds nothing from the GitHub request, so the log has no URL, headers, or body.

A write that `guardrails` block throws too. `getBlame`, `listDiscussions`, `getDiscussion`, `addDiscussionComment`, `listPullRequestReviewThreads`, and `resolveReviewThread` returned `{ error }` when GitHub had no such repository, discussion, or thread, and now throw in eve with that message. A `dryRun` write still returns its result.

`executeGithubEveTool` from `@github-tools/sdk/eve-runtime` and the tools from the deprecated `@github-tools/sdk/eve` throw the same way. The AI SDK, TanStack, and Workflow tools are unchanged.

## 1.22.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/github-tools/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@github-tools/sdk",
"version": "1.22.0",
"version": "1.23.0",
"description": "A typed tool layer for GitHub AI agents, with presets, human approval, and durable execution. Works with eve, the AI SDK, TanStack AI, Vercel Workflow, and Chat SDK",
"author": "HugoRCD <hugo.richard@vercel.com>",
"repository": {
Expand Down