Protected ReadonlypreferenceProtectedsessionIn-memory session overrides (not persisted), per chat
Protected ReadonlytrustClear all session overrides for a specific chat, or all if no chatId is given
OptionalchatId: stringProtectedcomputeCompute the effective default for a given tool, taking the schema-level default, any product-shipped per-tool default, and the confirmAlwaysAllow flag into account.
OptionaltoolRequest: ToolRequest<ToolInvocationContext>Get all tool confirmation settings
Get the confirmation mode for a specific tool, considering session overrides first (per chat).
For tools with confirmAlwaysAllow flag:
The tool identifier
The chat session identifier
OptionaltoolRequest: ToolRequest<ToolInvocationContext>Optional ToolRequest to check for confirmAlwaysAllow flag
Get the global default confirmation mode (used when no tool-specific entry exists).
Read through the trust-aware reader so that an untrusted workspace cannot override the default to a more permissive value.
ProtectedgetRead the schema-level default for the default-confirmation preference. Falls back to CONFIRM if the preference service has not registered the schema yet.
Set the confirmation mode for a specific tool (persisted)
The tool identifier
The confirmation mode to set
OptionaltoolRequest: ToolRequest<ToolInvocationContext>Optional ToolRequest to check for confirmAlwaysAllow flag
Set the global default confirmation mode.
Returns the promise produced by the underlying preference update so callers can
await completion and react to errors (e.g. show a notification on failure).
Set the confirmation mode for a specific tool for this session only (not persisted, per chat)
Utility class to manage tool confirmation settings