mirror of
https://github.com/vercel/eve.git
synced 2026-09-20 05:35:39 +08:00
76d4dd84ab
Signed-off-by: Casey Gowrie <ctgowrie@gmail.com>
18 lines
452 B
TypeScript
18 lines
452 B
TypeScript
import { defineTool } from "#public/tools/index.js";
|
|
|
|
export default defineTool({
|
|
description: "Report a guarded value.",
|
|
inputSchema: {
|
|
type: "object",
|
|
properties: { value: { type: "string" } },
|
|
required: ["value"],
|
|
additionalProperties: false,
|
|
},
|
|
approval({ callId, toolInput, toolName }) {
|
|
return callId && toolName && toolInput?.value ? "user-approval" : "denied";
|
|
},
|
|
execute({ value }) {
|
|
return value;
|
|
},
|
|
});
|