const TOOL_NAME = 'execute_code';
export function createExecuteCodeApprovalObservability(clientLogger) {
    return {
        onRequested: (request) => {
            clientLogger.info({
                module: 'tool',
                event: 'tool_approval_requested',
                data: {
                    tool_name: TOOL_NAME,
                    approval_kind: request.payload.kind
                }
            });
        },
        onAccepted: (request, choice) => {
            clientLogger.info({
                module: 'tool',
                event: 'tool_approval_accepted',
                data: {
                    tool_name: TOOL_NAME,
                    approval_kind: request.payload.kind,
                    accept_all: choice === 'Accept All'
                }
            });
        },
        onRejected: (request) => {
            clientLogger.warn({
                module: 'tool',
                event: 'tool_approval_rejected',
                data: {
                    tool_name: TOOL_NAME,
                    approval_kind: request.payload.kind
                }
            });
        },
        onReverted: (request) => {
            clientLogger.info({
                module: 'tool',
                event: 'tool_approval_reverted',
                data: {
                    tool_name: TOOL_NAME,
                    approval_kind: request.payload.kind
                }
            });
        },
        onRevertFailed: (request) => {
            clientLogger.error({
                module: 'tool',
                event: 'tool_approval_revert_failed',
                data: {
                    tool_name: TOOL_NAME,
                    approval_kind: request.payload.kind
                }
            });
        }
    };
}
//# sourceMappingURL=observability.js.map