Skip to content

armgit / eve

Public Imported from GitHub
0

The Open Framework for Building Agents

1.8 KB
Raw Blame

issue: "TBD (maintainer-requested implementation; no matching issue found)" status: implemented last_updated: "2026-10-06"

Automatic tool approval

Authoring API

Add auto({ model?, instructions?, criteria? }) to eve/tools/approval. model accepts any AI SDK Experimental_DecisionModel, including a string resolved through the configured default provider, and defaults to typesafe-ai/jev. instructions and criteria.clear / criteria.caution override the classifier text.

import { defineTool } from "eve/tools";
import { auto } from "eve/tools/approval";

export default defineTool({
  // ...
  approval: auto(),
});

The helper asks one constrained choice question with clear and caution outcomes. clear returns "approved"; caution returns "user-approval". Provider errors, invalid answers, timeouts, oversized input, and non-serializable tool input fail closed to user approval. Cancelling the active turn cancels decision instead of producing a prompt.

Evidence and cancellation

The decision state contains the exact tool name and input. Assistant prose and conversation history are excluded. ApprovalContext adds abortSignal so the helper and custom asynchronous approval policies stop with the active turn.

Policy

The default classifier returns caution for dangerous or unclear effects, including destructive data loss, credential exposure, financial transactions, deployments, public changes, external communication, privilege or system changes, and concealed execution.

auto() is not authorization. Applications must still enforce identity, tenancy, service permissions, allowlists, and other deterministic requirements. Tool input is sent to the selected decision provider, so authors must not use it for inputs the provider is not permitted to receive.