You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f4d97e4
Browse filesBrowse the repository at this point in the historyBrowse files
refactor(api)!: prune internals and unify built-in grep
Address verified review findings in this layer while keeping the public API stack independently reviewable.
Signed-off-by: OwenKephart <owen.kephart@vercel.com>
Remove loader-only guards, event framing exports, deprecated code-extension GitHub/computer-use aliases, and legacy audience auth fields. Built-in and code-extension grep now share bounded modes and workspace containment; import named callback/config types from their authoring entries, and move PR-watch imports from `eve/extensions/code/prwatch` to internal `eve/internal/code/prwatch`, passing `{ connector, org }` as `readPullRequestWatchSnapshot`'s second argument.
Copy file name to clipboardExpand all lines: docs/code-extension.mdx
+19-7Lines changed: 19 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -98,7 +98,7 @@ Configure `github` to broker GitHub access through Connect instead. The extensio
98
98
|`github.org`| With `github`| Organization whose repositories the `gh` tool can access |
99
99
|`github.broker`| With `github`|`broker(sandbox, rules)` callback that installs, then removes, the GitHub credential rules |
100
100
|`github.authorize`| No |`authorize({ auth, repository, token })` callback that allows or denies each `gh` tool invocation |
101
-
|`github.attribution`| No |`attribution(ctx)`callback that returns the `{ name, email }` co-author for this turn|
101
+
|`github.attribution`| No |`attribution(ctx)` returns the current turn's `{ name, email }` co-author, or `null`|
102
102
103
103
The `gh` tool requests a token scoped to exactly one repository in `github.org` for each invocation. The sandbox process receives a placeholder `GH_TOKEN`, and the firewall exchanges it on matching GitHub requests. Your `github.broker` callback receives the header-transform rules for the command, then `null` to remove the lease. The callback must preserve your other network rules. GitHub authentication has no command-delivery option.
104
104
@@ -129,22 +129,34 @@ export default git({
129
129
});
130
130
```
131
131
132
-
Commits made by the `gh` tool are authored by the GitHub App. To credit the person a turn works for, return them from `github.attribution`. The callback receives the tool's context, so it can read the verified caller from `ctx.session.auth.current` or resolve their linked accounts with `ctx.getToken`. The `gh` tool then ends every `gh-signed-commit` message, and every `gh pr create` body passed with `--body` or `--body-file`, with `Co-authored-by: <name> <email>`. Return `null` to publish without a co-author. `Co-authored-by` lines the agent writes itself are kept, and the trailer joins their block so they still count. Pull requests created without a body flag, such as with `--fill` or `--template`, and other paths, such as `gh api`, are not attributed.
132
+
### Credit the person behind a turn
133
133
134
-
```ts
135
-
git({
134
+
Commits made by the `gh` tool are authored by the GitHub App. Return a verified user mapping from
135
+
`github.attribution` to add that person's `Co-authored-by` trailer to `gh-signed-commit` messages
136
+
and `gh pr create` bodies passed through `--body` or `--body-file`. The callback receives the tool
137
+
context, including `ctx.session.auth.current` and `ctx.getToken`. Return `null` to omit attribution.
138
+
Existing co-author trailers are preserved; commands without a body flag and direct `gh api` calls
139
+
are not attributed.
140
+
141
+
For example, resolve the author through your application's authenticated user mapping:
`code({ github })` is deprecated. While it is set, the code extension still contributes `code__gh`, its GitHub instructions, and the signed-commit `code__pr` skill. Without it, the code extension contributes no GitHub tool, instructions, or pull request skill. Move the `github` option to `git({ github })`, and import `gh` and the GitHub sandbox helpers from `eve/extensions/git/tools` and `eve/extensions/git/sandbox`.
159
+
`code({ github })` is rejected. Move the `github` option to `git({ github })`, and import `gh` and the GitHub sandbox helpers from `eve/extensions/git/tools` and `eve/extensions/git/sandbox`.
Copy file name to clipboardExpand all lines: docs/concepts/built-in-tools.md
+12-1Lines changed: 12 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -400,7 +400,8 @@ Remove the file to remove the tool. `disableTool()` is unnecessary because `glob
400
400
401
401
### `grep`
402
402
403
-
`grep` searches sandbox file contents with a regular expression. Add it:
403
+
`grep` searches files inside the sandbox workspace. It is also the implementation of the code
404
+
extension's `code__grep` tool. Add it:
404
405
405
406
```sh
406
407
eve add tool/grep
@@ -424,6 +425,16 @@ export default defineTool({
424
425
425
426
Remove the file to remove the tool. `disableTool()` is unnecessary because `grep` is not added by default.
426
427
428
+
Inputs are `pattern`, optional `path`, `glob`, `ignoreCase`, `literal`, `context`, `limit`, and
429
+
`outputMode`. `files_with_matches` is the default and lists paths; `content` returns matching
430
+
lines and `count` returns per-file totals. Identifier-like patterns use literal matching unless
431
+
`literal: false` is explicit. The default limit is 50 rows, capped at 200, with additional byte
432
+
and line bounds. Relative paths resolve inside the workspace; parent traversal and symlinks
433
+
outside it are rejected. Ripgrep respects `.gitignore`; the POSIX fallback does not.
434
+
435
+
Results contain `content`, `matchCount`, `outputMode`, `path`, and `truncated`. Use
436
+
`outputMode: "content"` when migrating a caller that previously expected matching lines.
437
+
427
438
### `no_reply`
428
439
429
440
`no_reply` ends the turn without a reply. Use it when a scheduled check finds nothing to report, or when an action the agent already took is the whole answer. The model calls it with an optional `{ reason }`, which stays in the session history and traces and is never sent. The turn completes without a final message, so channels and schedule sends post nothing, and later turns see that the agent chose to stay quiet. Add it:
Pass another bare OpenAI model slug to override the default. `experimental_chatgpt()` remains as a deprecated alias.
185
+
Pass another bare OpenAI model slug to override the default. The retired `experimental_chatgpt` alias is not exported.
186
186
187
187
`chatgpt()` uses stateless requests (`store: false`). eve retains reasoning summaries and encrypted reasoning in session history and replays them after tool calls and on later turns. You do not need to configure `reasoning.encrypted_content` explicitly.
Copy file name to clipboardExpand all lines: packages/eve-code/AGENTS.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,13 +7,13 @@ Before writing code, read the installed eve package docs for extensions, hooks,
7
7
## Boundaries
8
8
9
9
- Connector UIDs enter through extension config. The authentication hook resolves Vercel app tokens before each turn.
10
-
- GitHub instructions, the `pr` skill, and the `gh` tool belong to `@eve/git` (`eve/extensions/git`). The deprecated`github` config keeps `code__gh`, `code__pr`, and the GitHub instructions through `extension/lib/github-compat.ts`, which imports `eve/extensions/git/sandbox`; add no other GitHub or pull request content here.
10
+
- GitHub instructions, the `pr` skill, and the `gh` tool belong to `@eve/git` (`eve/extensions/git`). The removed`github` config is rejected; do not add GitHub or pull request contributions here.
11
11
- Consumers with non-Connect credentials may call `authenticateGitHub` or `authenticateVercel` directly from their sandbox lifecycle.
12
12
- Broker credentials without placing them in model-authored URLs or arguments.
13
13
- Use real `git`, `gh`, and `vc` CLIs rather than bespoke repository lifecycle tools.
14
14
- Keep `apply_patch` as the only extension-owned file editing primitive.
- Computer use lives in `@eve/computer-use` (`eve/computer-use`). Keep the deprecated computer-use re-exports in `extension/lib/sandbox.ts` until they are removed; do not add computer-use code here.
16
+
- Computer use lives in `@eve/computer-use` (`eve/computer-use`). Import its public helpers directly; do not add computer-use code or re-exports here.
Copy file name to clipboardExpand all lines: packages/eve-code/README.md
+4-5Lines changed: 4 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,8 +6,7 @@ It ships inside the `eve` package. This private `@eve/code` workspace package is
6
6
7
7
-`eve/extensions/code`: the extension
8
8
-`eve/extensions/code/sandbox`: sandbox bootstrap and credential helpers
9
-
-`eve/extensions/code/tools`: `apply_patch` and `grep` (`gh` is a deprecated re-export)
10
-
-`eve/extensions/code/prwatch`: PR-watch primitives for consumer-owned workflow tools
9
+
-`eve/extensions/code/tools`: `apply_patch` and `grep`
11
10
12
11
## Mount
13
12
@@ -21,9 +20,9 @@ export default code({
21
20
});
22
21
```
23
22
24
-
Both connectors are optional; `code({})` mounts without either. The Vercel connector requests an app-subject token. Firewall delivery is the default and keeps tokens outside sandbox processes; without a consumer `broker`, it requires a sandbox provider that exposes `setNetworkPolicy()` and fails otherwise. Use `delivery: "command"` on the Vercel connector for providers without mutable network policy. A top-level `broker(sandbox, rules)` callback lets the consumer merge Vercel credential rules into its own network policy.
23
+
The Vercel connector is optional; `code({})` mounts without it. The Vercel connector requests an app-subject token. Firewall delivery is the default and keeps tokens outside sandbox processes; without a consumer `broker`, it requires a sandbox provider that exposes `setNetworkPolicy()` and fails otherwise. Use `delivery: "command"` on the Vercel connector for providers without mutable network policy. A top-level `broker(sandbox, rules)` callback lets the consumer merge Vercel credential rules into its own network policy.
25
24
26
-
The `github` option is deprecated; configure it on `eve/extensions/git`instead. While it is set here, this extension still contributes `code__gh`, its GitHub instructions, and the signed-commit `code__pr` skill. Without it, this extension contributes no GitHub tool, instructions, or pull request skill.
25
+
The retired `github` option is rejected. Configure `eve/extensions/git`for GitHub tools, instructions, and the pull request skill.
27
26
28
27
The read-only worker subagent defaults to `openai/gpt-5.6-terra-fast` with `xhigh` reasoning. Set `worker: { model, reasoning, openaiReasoningEffort? }` to choose another model; `openaiReasoningEffort` is passed to OpenAI models as `reasoningEffort`.
eve derives the prepared environment generation from the sandbox file and environment options, not from imported helpers, so upgrading eve alone does not rebuild an existing prepared artifact.
50
49
51
-
Computer use lives in `eve/computer-use`. Mount it next to this extension when the sandbox has a desktop. `installComputerUse`, `startComputerUse`, and `COMPUTER_USE_REVALIDATION_KEY` are still re-exported from `eve/extensions/code/sandbox`, and `computer_use` from `eve/extensions/code/tools`, but both are deprecated.
50
+
Computer use lives in its own extension. Import its tools and sandbox helpers directly; the deprecated code re-exports are removed.
52
51
53
52
Preparation ensures `gh`, installs wrappers for `gh`, `vc`, and `gh-signed-commit`, and installs TypeScript diagnostics. With `eve/extensions/git` configured for `github`, repositories requiring verified signatures use `gh-signed-commit` through its `gh` tool.
0 commit comments