Add Vercel eve agent adapter (@executor-js/host-eve)#1114
Conversation
Expose Executor's codemode surface to a Vercel eve agent as two tools, execute and resume, mirroring the MCP host. Backed by the promise execution engine, so the package has no eve runtime dependency: the factory returns plain objects shaped for eve's defineTool. Includes unit tests plus integration tests that drive the adapter against the real execution engine and QuickJS sandbox.
|
wip - taking feedback. |
Greptile SummaryThis PR introduces
Confidence Score: 4/5Safe to merge. The new package is private and isolated with no cross-package side effects; the adapter correctly never throws to the agent and the pause/resume wiring is sound. The adapter is well-structured and the test coverage (unit + real QuickJS integration) is thorough for the core paths. The one notable gap is that
Important Files Changed
Sequence Diagram%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant Model as eve Model
participant ET as execute tool
participant RT as resume tool
participant Engine as ExecutionEngine (Promise)
participant QJS as QuickJS Sandbox
Model->>ET: "execute({ code })"
ET->>Engine: executeWithPause(code)
Engine->>QJS: run code
alt completed
QJS-->>Engine: ExecuteResult
Engine-->>ET: "{ status: completed, result }"
ET-->>Model: "ExecutorToolEnvelope { status: completed, text, data }"
else paused (auth/approval)
QJS-->>Engine: pause (elicitationContext)
Engine-->>ET: "{ status: paused, execution }"
ET-->>Model: "ExecutorToolEnvelope { status: waiting_for_interaction, executionId, text }"
Model->>RT: "resume({ executionId, action, content })"
RT->>Engine: "resume(executionId, { action, content })"
Engine->>QJS: continue from pause
QJS-->>Engine: ExecuteResult
Engine-->>RT: "{ status: completed, result }"
RT-->>Model: "ExecutorToolEnvelope { status: completed, text, data }"
end
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant Model as eve Model
participant ET as execute tool
participant RT as resume tool
participant Engine as ExecutionEngine (Promise)
participant QJS as QuickJS Sandbox
Model->>ET: "execute({ code })"
ET->>Engine: executeWithPause(code)
Engine->>QJS: run code
alt completed
QJS-->>Engine: ExecuteResult
Engine-->>ET: "{ status: completed, result }"
ET-->>Model: "ExecutorToolEnvelope { status: completed, text, data }"
else paused (auth/approval)
QJS-->>Engine: pause (elicitationContext)
Engine-->>ET: "{ status: paused, execution }"
ET-->>Model: "ExecutorToolEnvelope { status: waiting_for_interaction, executionId, text }"
Model->>RT: "resume({ executionId, action, content })"
RT->>Engine: "resume(executionId, { action, content })"
Engine->>QJS: continue from pause
QJS-->>Engine: ExecuteResult
Engine-->>RT: "{ status: completed, result }"
RT-->>Model: "ExecutorToolEnvelope { status: completed, text, data }"
end
|
Expose Executor's codemode surface to a Vercel eve agent as two tools, execute and resume, mirroring the MCP host. Backed by the promise execution engine, so the package has no eve runtime dependency: the factory returns plain objects shaped for eve's defineTool.
Includes unit tests plus integration tests that drive the adapter against the real execution engine and QuickJS sandbox.