feat(tools): add client-side tool helper#664
Conversation
|
@iroiro147 is attempting to deploy a commit to the Vercel Team on Vercel. A member of the Team first needs to authorize it. |
5afce10 to
30e5a10
Compare
|
Rebased onto current |
Signed-off-by: iroiro147 <sarthak.singh@juspay.in>
30e5a10 to
6ab735a
Compare
|
Fixed the failing schema-derivation expectation on the new head. The optional Verified locally under Node 24:
Fresh CI is running on |
|
Curious if this, or something like it, is planned to be merged? We’re integrating Eve into an agent we’re building and need installable tools that can accept Zod-validated structured input, durably pause for a custom user decision, and then resume server-side execution with both the original validated input and the user’s response. A concrete example is a versioned document tool. The model would call it with something like: z.object({
documentId: z.string(),
baseVersion: z.number(),
document: documentSchema,
})Eve would then durably pause and present three possible responses:
The important part is that Save operates on the exact structured input that originally caused the pause, including its document ID and base version. That avoids asking the model or client to reconstruct the document in a separate tool call and allows the server to perform version/conflict checks before writing. Today,
We’d prefer to build this as an installable tool rather than maintain a fork of Eve. If this direction makes sense, is there anything useful we can contribute to help move it forward? If this aligns with Eve’s intended direction, would be happy to build out the post-response execution path on a branch or coordinate with to contribute |
Summary
defineClientToolfor authored tools that park a run throughinput.requestedinstead of executing app-runtime codeinputRequestmetadata through authored normalization, runtime resolution, and harness tool registrationRefs #593.
Tests
PATH="$HOME/Library/pnpm/bin:$PATH" pnpm --filter eve exec vitest run --config vitest.unit.config.ts src/public/definitions/tool-auth.test.ts src/internal/authored-definition/schema-backed.test.ts src/harness/input-extraction.test.ts src/harness/input-requests.test.ts src/harness/tools.test.ts(92 passed)PATH="$HOME/Library/pnpm/bin:$PATH" pnpm --filter eve run test:unit(440 files, 4648 passed, 1 skipped)PATH="$HOME/Library/pnpm/bin:$PATH" pnpm --filter eve run typecheckPATH="$HOME/Library/pnpm/bin:$PATH" pnpm --filter eve run build:jsPATH="$HOME/Library/pnpm/bin:$PATH" pnpm docs:checkPATH="$HOME/Library/pnpm/bin:$PATH" pnpm guard:invariantsPATH="$HOME/Library/pnpm/bin:$PATH" pnpm exec oxfmt --check ...PATH="$HOME/Library/pnpm/bin:$PATH" pnpm exec oxlint --deny-warnings ...PATH="$HOME/Library/pnpm/bin:$PATH" pnpm changeset status --since origin/maingit diff --check