Variable: ScopedToolApprovalSchema
Makaio Framework / ai-adapters-core / ScopedToolApprovalSchema
Variable: ScopedToolApprovalSchema
Section titled “Variable: ScopedToolApprovalSchema”
constScopedToolApprovalSchema:object
Defined in: ../../../adapters/core/src/utils/tool-approval.ts:222
Scoped tool approval schema for adapter connector buses.
sessionId is optional here because the connector emits the approval request
before the agent layer has enriched it. The agent’s wireToolApprovalRpc
(or equivalent) injects sessionId from its own context before forwarding
to the global AgentSubjects.toolApprove subject, where sessionId is required.
Adapters with a genuinely different wire format (e.g., gemini-sdk’s callId/name) should define their own schema rather than extending this one.
Type Declaration
Section titled “Type Declaration”request
Section titled “request”request:
ZodObject<{adapterId:ZodString;adapterName:ZodString;adapterSessionId:ZodString;agentId:ZodString;args:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;clientId:ZodOptional<ZodString>;messageId:ZodOptional<ZodString>;occurredAt:ZodOptional<ZodNumber>;providerConfigId:ZodOptional<ZodString>;reasoning:ZodOptional<ZodString>;sessionId:ZodOptional<ZodString>;toolCallId:ZodString;toolName:ZodOptional<ZodString>;turnId:ZodOptional<ZodString>; },$strip>
response
Section titled “response”response:
ZodDiscriminatedUnion<[ZodObject<{action:ZodLiteral<"allow">;updatedInput:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;updatedPermissions:ZodOptional<ZodArray<ZodUnknown>>; },$strip>,ZodObject<{action:ZodLiteral<"deny">;message:ZodString;shouldAbort:ZodOptional<ZodBoolean>; },$strip>],"action"> =AgentToolApproveSchema.response