Docs
CodeRabbit
Cloudflare
Railway
AG Grid
OpenRouter
Netlify
WorkOS
Clerk
SerpAPI
Prisma
Sentry
Electric
Unkey
CodeRabbit
Cloudflare
Railway
AG Grid
OpenRouter
Netlify
WorkOS
Clerk
SerpAPI
Prisma
Sentry
Electric
Unkey
Class References
Function References
Interface References
Type Alias References
Variable References

ApprovalRequestedEvent

Interface: ApprovalRequestedEvent

Defined in: packages/ai/src/types.ts:1263

Emitted when a server tool requires approval before execution. The agent loop yields this and pauses — structured-output.complete will not fire for that run. The shape is fixed by the orchestrator's tool-approval flow (the agent-loop branch of runStreamingStructuredOutputImpl in activities/chat/index.ts forwards CUSTOM events from TextEngine.run()).

Extends

Indexable

ts
[k: string]: unknown
[k: string]: unknown

Properties

model?

ts
optional model: string;
optional model: string;

Defined in: packages/ai/src/types.ts:1215

Model identifier for multi-model support

Inherited from

CustomEvent.model


name

ts
name: "approval-requested";
name: "approval-requested";

Defined in: packages/ai/src/types.ts:1264

Overrides

ts
CustomEvent.name
CustomEvent.name

value

ts
value: object;
value: object;

Defined in: packages/ai/src/types.ts:1265

approval

ts
approval: object;
approval: object;
approval.id
ts
id: string;
id: string;
approval.needsApproval
ts
needsApproval: true;
needsApproval: true;

input

ts
input: unknown;
input: unknown;

toolCallId

ts
toolCallId: string;
toolCallId: string;

toolName

ts
toolName: string;
toolName: string;

Overrides

ts
CustomEvent.value
CustomEvent.value