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

ApprovalRequestedEvent

Interface: ApprovalRequestedEvent

Defined in: packages/typescript/ai/src/types.ts:1176

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/typescript/ai/src/types.ts:1128

Model identifier for multi-model support

Inherited from

CustomEvent.model


name

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

Defined in: packages/typescript/ai/src/types.ts:1177

Overrides

ts
CustomEvent.name
CustomEvent.name

value

ts
value: object;
value: object;

Defined in: packages/typescript/ai/src/types.ts:1178

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