Repository navigation
refactor(api)!: prune internals and unify built-in grep - #5002
Conversation
Bundle + Package Summary:
|
| Area | Metric | Baseline | Current | Delta |
|---|---|---|---|---|
| Package | Packed tarball | 7.68 MB | 7.68 MB | -1.2 kB ✅ |
| Package | Unpacked publish size | 26.96 MB | 26.96 MB | -7.4 kB ✅ |
| Package | Installed footprint | 75.10 MB | 75.09 MB | -7.4 kB ✅ |
| Package | Published files | 4270 | 4274 | +4 |
| Package | Installed files | 8281 | 8285 | +4 |
| Package | Installed package instances | 34 | 34 | 0 |
| Package | Distinct installed package names | 32 | 32 | 0 |
| Package | Installed dependency edges | 51 | 51 | 0 |
| Package | Installed optional peer edges | 9 | 9 | 0 |
| Runtime | Unique function payloads | 2 | 2 | 0 |
| Runtime | Total function bytes | 21.03 MB | 21.03 MB | -2.9 kB ✅ |
| Runtime | Public routes | 17 | 17 | 0 |
Changed function payloads vs api-cleanup/owned-types (6a90b45) (2)
| Function | Status | Baseline | Current | Delta | Route changes |
|---|---|---|---|---|---|
functions/__server.func |
changed | 10.52 MB | 10.51 MB | -1.5 kB ✅ | none |
functions/.well-known/workflow/v1/flow.func |
changed | 10.52 MB | 10.51 MB | -1.5 kB ✅ | none |
eve init install
| Metric | Baseline | Current | Delta |
|---|---|---|---|
| Installed footprint | 113.48 MB | 113.48 MB | -7.4 kB ✅ |
| Installed packages | 97 | 97 | 0 |
| dependencies | 4 | 4 | 0 |
| devDependencies | 2 | 2 | 0 |
| Dependency package bytes | 45.24 MB | 45.23 MB | -7.4 kB ✅ |
| devDependency package bytes | 5.11 MB | 5.11 MB | 0 B ➖ |
Build Metadata
- Preset:
vercel - Nitro:
nitro@3.0.260903-beta - Output directory:
apps/fixtures/weather-agent/.vercel/output - Build metadata timestamp: 2026-10-18T01:55:16.043Z
- Route aliases: 17 public, 1 internal (18 total aliases)
- Vercel routes in config: 20
- Severity legend: 🔴 dominant/large, 🟠 notable, 🟡 watch, ⚪ small
Package Drill-Down
Package Details
- Package:
eve@0.79.2 - Package directory:
packages/eve - Tarball: 7.68 MB (
eve-0.79.2.tgz) - Unpacked payload: 26.96 MB across 4274 published files
- Installed footprint: 75.09 MB across 8285 installed files
- Installed root package: 26.96 MB
- Installed dependencies: 48.14 MB
- Installed package instances: 34
- Distinct installed package names: 32
- Installed dependency edges: 51
- Installed optional peer edges: 9
- Runtime dependencies: 2
- Peer dependencies: 7 (6 optional)
Installed footprint is measured from an isolated temporary npm install of the packed tarball.
Graph metrics read only package.json files in package directories directly beneath a node_modules boundary, including nested boundaries. Each directory is one package instance; distinct names come from those manifests. Dependency edges count each unique name in dependencies or optionalDependencies per instance; optional peer edges count peerDependencies marked optional.
Heavy installed dependencies
eve: 26.96 MB (35.9%)@rolldown/binding-linux-x64-gnu: 19.81 MB (26.4%)ai: 8.24 MB (11.0%)zod: 6.15 MB (8.2%)undici: 3.58 MB (4.8%)
Publish payload breakdown
Published file size
🟠 dist/src/compiled/shadcn-registry/index.js [#####...................] 3.85 MB 14.3%
🟠 dist/src/compiled/@photon-ai/chat-adapter-ime... [###.....................] 2.29 MB 8.5%
🟠 dist/src/compiled/@ai-sdk/code-mode/index.js [#.......................] 1.03 MB 3.8%
🟡 dist/src/compiled/@vercel/blob/index.js [#.......................] 604.9 kB 2.2%
🟡 dist/src/compiled/_chunks/workflow/undici-D-I... [#.......................] 521.9 kB 1.9%
🔴 Other published files [########################] 18.67 MB 69.2%
Installed footprint breakdown
Installed package size
🔴 eve [########################] 26.96 MB 35.9%
🔴 @rolldown/binding-linux-x64-gnu [##################......] 19.81 MB 26.4%
🔴 ai [#######.................] 8.24 MB 11.0%
🔴 zod [#####...................] 6.15 MB 8.2%
🟠 undici [###.....................] 3.58 MB 4.8%
🟠 nitro [##......................] 1.89 MB 2.5%
🔴 Other installed packages [########................] 8.46 MB 11.3%
Runtime dependencies (2)
| Package | Range | Notes |
|---|---|---|
nitro |
3.0.260903-beta |
|
undici |
8.10.2 |
Peer dependencies (7)
| Package | Range | Notes |
|---|---|---|
@opentelemetry/api |
^1.0.0 |
optional peer |
ai |
catalog: |
|
braintrust |
^3.0.0 |
optional peer |
chat |
^4.42.0 |
optional peer |
dd-trace |
^6.13.0 |
optional peer |
just-bash |
^3.1.0 |
optional peer |
microsandbox |
^0.5.0 |
optional peer |
eve init install drill-down
eve init install details
- Command:
eve init my-agent - Package manager:
npm - Installed footprint: 113.48 MB across 10202 installed files
- Installed packages: 97 total (91 transitive-only)
- dependencies: 4 direct packages totaling 45.23 MB
- devDependencies: 2 direct packages totaling 5.11 MB
- Other transitive package files: 63.14 MB
Installed footprint is measured from an isolated temporary eve init my-agent using the current packed eve tarball.
Heavy installed dependencies
@typescript/typescript-linux-x64: 27.95 MB (24.6%)eve: 26.96 MB (23.8%)@rolldown/binding-linux-x64-gnu: 19.81 MB (17.5%)zod: 9.76 MB (8.6%)ai: 8.24 MB (7.3%)
Installed footprint breakdown
Installed package size
🔴 @typescript/typescript-linux-x64 [########################] 27.95 MB 24.6%
🔴 eve [#######################.] 26.96 MB 23.8%
🔴 @rolldown/binding-linux-x64-gnu [#################.......] 19.81 MB 17.5%
🔴 zod [########................] 9.76 MB 8.6%
🔴 ai [#######.................] 8.24 MB 7.3%
🟠 undici [###.....................] 3.58 MB 3.2%
🔴 Other installed packages [###############.........] 17.19 MB 15.1%
dependencies (4)
| Package | Range | Installed size | Share |
|---|---|---|---|
@vercel/connect |
2.5.2 |
276.3 kB | 0.2% |
ai |
^7.0.137 |
8.24 MB | 7.3% |
eve |
file:eve-0.79.2.tgz |
26.96 MB | 23.8% |
zod |
4.5.4 |
9.76 MB | 8.6% |
devDependencies (2)
| Package | Range | Installed size | Share |
|---|---|---|---|
@types/node |
24.x |
2.61 MB | 2.3% |
typescript |
7.0.2 |
2.50 MB | 2.2% |
Function Drill-Down
Payload Size Graph
Unique function payload size and share of total
🔴 functions/.well-known/workflow/v1/flow.func [########################] 10.51 MB 50.0%
🔴 functions/__server.func [########################] 10.51 MB 50.0%
Top Function Payloads
🟠 functions/.well-known/workflow/v1/flow.func • 1 public route • 10.51 MB
| Metric | Value |
|---|---|
| Public routes | /.well-known/workflow/v1/flow |
| Runtime | nodejs24.x |
| Handler | index.mjs |
| Payload | 10.51 MB |
| Function files | 10.51 MB across 126 files |
| Traced dependencies | 0 B |
| Signal | 🟠 Bundled file _chunks/vercel.web.mjs is 2.48 MB (23.6%) |
🟠 🔎 Dependency Analysis
📦 Bundled files:
Bundled file size
🟠 _chunks/vercel.web.mjs [############............] 2.48 MB 23.6%
🟠 _libs/undici.mjs [#####...................] 1.01 MB 9.6%
🟡 _chunks/sandbox3.mjs [####....................] 815.4 kB 7.8%
🟡 _chunks/compiled-artifacts-instrumentation.mjs [####....................] 732.7 kB 7.0%
🟡 _chunks/token-util-Bla5Z0G9.mjs [####....................] 704.7 kB 6.7%
🔴 Other bundled files [########################] 4.78 MB 45.4%
🧾 Vercel Config
{
"handler": "index.mjs",
"launcherType": "Nodejs",
"shouldAddHelpers": false,
"supportsResponseStreaming": true,
"runtime": "nodejs24.x",
"maxDuration": "max",
"experimentalTriggers": [
{
"type": "queue/v2beta",
"topic": "__eve776561746865722d6167656e74_wkf_workflow_*",
"consumer": "default",
"retryAfterSeconds": 5,
"initialDelaySeconds": 0
}
],
"environment": {
"WORKFLOW_PRECONDITION_GUARD": "1"
}
}🟠 functions/__server.func • 16 public routes, 1 internal alias • 10.51 MB
| Metric | Value |
|---|---|
| Public routes | //.well-known/workflow/v1/webhook/[token]/eve/v1/callback/[token]/eve/v1/connections/[name]/callback/[attemptId]/[token]/eve/v1/connections/[name]/callback/[token]/eve/v1/health/eve/v1/info/eve/v1/session/eve/v1/session/[parentSessionId]/subagents/[callId]/[childSessionId]/stream/eve/v1/session/[sessionId]/eve/v1/session/[sessionId]/cancel/eve/v1/session/[sessionId]/clear/eve/v1/session/[sessionId]/compact/eve/v1/session/[sessionId]/reset/eve/v1/session/[sessionId]/stream/eve/v1/session/[sessionId]/stubs |
| Internal aliases | /__server |
| Runtime | nodejs24.x |
| Handler | index.mjs |
| Payload | 10.51 MB |
| Function files | 10.51 MB across 126 files |
| Traced dependencies | 0 B |
| Signal | 🟠 Bundled file _chunks/vercel.web.mjs is 2.48 MB (23.6%) |
🟠 🔎 Dependency Analysis
📦 Bundled files:
Bundled file size
🟠 _chunks/vercel.web.mjs [############............] 2.48 MB 23.6%
🟠 _libs/undici.mjs [#####...................] 1.01 MB 9.6%
🟡 _chunks/sandbox3.mjs [####....................] 815.4 kB 7.8%
🟡 _chunks/compiled-artifacts-instrumentation.mjs [####....................] 732.7 kB 7.0%
🟡 _chunks/token-util-Bla5Z0G9.mjs [####....................] 704.7 kB 6.7%
🔴 Other bundled files [########################] 4.78 MB 45.4%
🧾 Vercel Config
{
"handler": "index.mjs",
"launcherType": "Nodejs",
"shouldAddHelpers": false,
"supportsResponseStreaming": true,
"runtime": "nodejs24.x"
}Build Timing: e2e/fixtures/agent-tools-sandbox
This is an informational timing measurement inside eve build, from preflight through publication. Output-size measurement and profile writing are excluded.
Build mode: deployable Vercel build with sandbox template prewarm included.
- Build pipeline: 2.45 s -> 2.68 s (+229.0 ms) vs
api-cleanup/owned-types (6a90b45). - Timing is informational: shared GitHub runners are too variable for a hard timing budget.
Detailed phase timings vs `api-cleanup/owned-types (6a90b45)`
| Phase | Baseline | Current | Delta |
|---|---|---|---|
extension.check |
14.8 ms | 16.4 ms | +1.6 ms |
project.resolve |
4.3 ms | 0.3 ms | -4.0 ms |
workspace.create |
3.1 ms | 0.4 ms | -2.7 ms |
host.prepare |
577.7 ms | 432.7 ms | -145.0 ms |
vercel.service-prefix.resolve |
0.9 ms | 0.9 ms | 0.0 ms |
nitro.create |
401.0 ms | 416.4 ms | +15.4 ms |
sandbox.prewarm |
228.0 ms | 618.1 ms | +390.1 ms |
nitro.cache.prepare |
0.2 ms | 0.2 ms | 0.0 ms |
nitro.prepare |
0.5 ms | 0.5 ms | 0.0 ms |
nitro.public-assets |
0.6 ms | 0.6 ms | 0.0 ms |
nitro.prerender |
0.3 ms | 0.3 ms | 0.0 ms |
nitro.bundle |
1.09 s | 1.08 s | -3.2 ms |
nitro.cache.write |
0.2 ms | 0.2 ms | 0.0 ms |
vercel.workflow-function.materialize |
69.3 ms | 55.5 ms | -13.8 ms |
agent-summary.emit |
0.4 ms | 0.5 ms | +0.1 ms |
connect-manifest.emit |
0.2 ms | 0.2 ms | 0.0 ms |
nitro.close |
0.1 ms | 0.1 ms | 0.0 ms |
output.publish |
24.3 ms | 12.9 ms | -11.4 ms |
workspace.remove |
1.5 ms | 1.5 ms | 0.0 ms |
| import type { GrepToolInput } from "#tools/provided/grep.js"; | ||
| export type GrepInput = GrepToolInput; | ||
| export type GrepResult = GrepSearchResult; | ||
| export function executeGrepOnSandbox( |
There was a problem hiding this comment.
This adapter now only forwards to executeGrepSearch, and its main consumer, packages/eve/test/grep-tool.test.ts, still tests the old contract. That file isn't touched by this PR and vitest.unit.config.ts still includes it (test/**/*.test.ts). It expects the default --max-count 100 and the 1000 cap. Its fake run also only handles the old ripgrep probe and $HOME probe, so the new realpath calls from resolveInWorkspace go to commandHandler and fail with "could not be resolved" before any search runs. I'd expect the eve unit tier to go red on this head. The PR body says that tier only ran on nine focused files.
Suggested fix: delete this file, point just-bash.scenario.test.ts at executeGrepSearch directly, and rewrite or retire test/grep-tool.test.ts against the new modes and limits.
There was a problem hiding this comment.
Retired the test-only adapter and its obsolete 29-case suite after reading all cases. The canonical 23-case suite covers the new modes/bounds, plus real native and virtual filesystem regressions. just-bash now calls the canonical executor directly.
| parts.push("--count"); | ||
| break; | ||
| case "content": | ||
| parts.push("--line-number", "--with-filename", "--json"); |
There was a problem hiding this comment.
Moving content mode from --null to --json silently drops matches on long lines. Each JSON record carries the whole line, so any match line over the 256 KiB command cap (minified bundles, lockfiles, data dumps) becomes one partial record. The partial-record skip throws it away, and the caller gets a truncated notice with nothing from that file.
I reproduced this locally with rg 15.1 and a stubbed sandbox: a big.js holding one 300 KB line containing needle, plus a small.txt with two matches.
- base (
--null): content returns 3 matches, andbig.js:1:comes back trimmed to the 8 KiB line bound - head (
--json): content returns 2 matches withtruncated: true,big.jsis missing, whilefiles_with_matchesstill lists it
JSON mode also drops rg's -- separators between context groups. That's minor, but it's another drift from the code-extension behavior this PR says it preserves.
One fix: cap each line inside rg (--max-columns with --max-columns-preview) so no single record can exceed the byte cap. Or keep --null framing on native rg and use JSON only where just-bash needs it.
There was a problem hiding this comment.
Fixed confirmed-match loss at the byte cap: a partial JSON record retains a bounded preview and marks unavailable position metadata explicitly. The strengthened long-line case fails on the old parser and passes after repair. Context separators are reconstructed and compared against native NUL output.
| "The directory or file to search in. Defaults to /workspace. " + | ||
| "Must be an absolute path or begin with $HOME/. Omit to use the default.", | ||
| "Directory or file inside the workspace. Defaults to the workspace root. " + | ||
| "Relative paths resolve within the workspace.", |
There was a problem hiding this comment.
Dropping resolveSandboxModelPath means built-in grep no longer accepts the $HOME/ paths that read_file and glob still advertise. For example, $HOME/.agents/skills/<skill> (MODEL_SKILL_ROOT in shared/skill-paths.ts) now goes to sandbox.resolvePath. On Vercel, resolveVercelSandboxPath turns that into /workspace/$HOME/.agents/skills/..., and realpath then fails with an opaque resolution error. Even when the path does resolve, skills under the real home sit outside the workspace, so containment rejects them. On base, the model could grep its skill files.
If workspace-only search is the intent, reject $HOME/ inputs with an error saying grep is limited to the workspace. Otherwise, expand $HOME/ first and allow the skill root explicitly.
There was a problem hiding this comment.
Workspace-only search is intentional. $HOME paths now fail before any command with explicit workspace guidance, and the regression verifies that no sandbox command ran.
| @@ -7,7 +7,6 @@ It ships inside the `eve` package. This private `@eve/code` workspace package is | |||
| - `eve/extensions/code`: the extension | |||
| - `eve/extensions/code/sandbox`: sandbox bootstrap and credential helpers | |||
| - `eve/extensions/code/tools`: `apply_patch` and `grep` (`gh` is a deprecated re-export) | |||
There was a problem hiding this comment.
This line is now stale: eve/extensions/code/tools exports only apply_patch and grep (packages/eve/src/extensions/code/tools.ts), so gh is no longer a re-export. Line 25 of this README also still says code({ github }) contributes code__gh, its GitHub instructions, and code__pr, but the config is now .strict() and rejects github. Both should point readers to eve/extensions/git.
There was a problem hiding this comment.
Removed both stale compatibility claims. The README now directs GitHub contributions to eve/extensions/git and describes only the remaining optional Vercel connector.
| Audience callbacks take `AudienceContext` and its privacy-limited `caller`; `auth`, | ||
| `AudienceInput`, and `AudiencePrincipal` are removed. Event framing records and loader-only | ||
| guards are not public authoring APIs. `JsonValue`, `JsonObject`, `JsonArray`, and `JsonPrimitive` | ||
| have one public home, `eve/events`. |
There was a problem hiding this comment.
This section retires these APIs, but three published pages still document them as supported:
docs/code-extension.mdx:131-133: "Migrate fromcode({ github })" says the option is deprecated and still contributescode__gh, its instructions, andcode__pr. It is now rejected by the strict schema.docs/channels/custom.mdx:486-493: saysAudienceInput<TState>"remains supported" and showsaudience({ auth }). Neither exists after this PR.docs/reference/typescript-api.md:148,185: listsexperimental_chatgptand says it "remains as a deprecated alias".eve/models/openainow exports onlyopenaiandchatgpt.
Update those pages to match, or point them at this section.
There was a problem hiding this comment.
Updated all three published pages. They no longer teach the retired GitHub config, audience auth input, or experimental_chatgpt alias. Docs checks pass.
eve benchmark
ResultsCorrectness
95% CI: paired bootstrap over tasks; tie: the interval includes ±0, so this run cannot separate the row from the winner All harnesses and tasks
Latency
95% CI: paired bootstrap over tasks; tie: the interval includes ±0, so this run cannot separate the row from the winner All harnesses and tasks
Token usage
All harnesses and tasks
Compared inputs
Diagnostics26 trials to inspect
More details on the workflow run |
f5ca687 to
6a90b45
Compare
Signed-off-by: owenkephart <owen.kephart@vercel.com> Co-Authored-By: owenkephart <owen.kephart@vercel.com>
Signed-off-by: owenkephart <owen.kephart@vercel.com> Co-Authored-By: owenkephart <owen.kephart@vercel.com>
Signed-off-by: owenkephart <owen.kephart@vercel.com> Co-Authored-By: owenkephart <owen.kephart@vercel.com>
3ca3341 to
95bf09f
Compare
|
Recovery note: this PR was automatically marked merged when its commits were included in #4855's branch. That consolidation has been unwound. #4855 is v27-only again; this change is independently reviewable in #5144, based on #5143. The original merged state remains historical GitHub metadata. Nothing was merged into main by this recovery. |
Summary
Authoring entries should not promise wire framing, loader recognition, or deprecated extension plumbing. Remove those exports, retire the code extension's GitHub compatibility path, and give authors importable callback and configuration types. Both grep mounts now use one bounded workspace search with explicit output modes. Audience callbacks keep only the privacy-limited caller projection. Related to #4930; stacked on #5000.
The grep default changes from content to matching file paths. Limits now bound returned rows, and paths cannot escape the workspace. Native ripgrep and just-bash use structured content output; native fallback uses its filename delimiter. just-bash now supplies filesystem-backed realpath resolution. Pipeline failures remain failures, including invalid regular expressions.
Disabled-marker types and guards remain public. GitHub credentials move to the git extension; the retired code config is rejected rather than ignored. Internal PR-watch callers supply their GitHub settings explicitly. Shared built-in implementation entries live under
eve/internal/*.Validation
Review follow-through
Fixed the long-line regression: a capped JSON record retains a confirmed match and bounded preview, with an explicit truncated-position marker when needed. The strengthened native case fails before repair and passes afterward; it also compares context separators with native NUL framing. Home-scoped paths now fail immediately with workspace guidance. Retired the obsolete 29-case executor suite and test-only adapter; the canonical 23-case grep suite and two real just-bash filesystem cases pass. Stale code-extension, audience, and model-alias docs are updated. Restacked on reviewed #5000.
Checklist
evepackagegit commit --signoff)